class AccountDetailKeyService {

	public Pagination<AccountDetailKey> search(AccountDetailKeySearch accountDetailKeySearch, BindingResult errors) {

		try {

			List<AccountDetailKey> accountDetailKeys = new ArrayList<>();
			accountDetailKeys.add(accountDetailKeySearch);
			validate(accountDetailKeys, Constants.ACTION_SEARCH, errors);

			if (errors.hasErrors()) {
				throw new CustomBindException(errors);
			}

		} catch (CustomBindException e) {

			throw new CustomBindException(errors);
		}

		return accountDetailKeyRepository.search(accountDetailKeySearch);
	}

}