class BankAccountService {

	public Pagination<BankAccount> search(BankAccountSearch bankAccountSearch, BindingResult errors) {

		try {

			List<BankAccount> bankAccounts = new ArrayList<>();
			bankAccounts.add(bankAccountSearch);
			validate(bankAccounts, Constants.ACTION_SEARCH, errors);

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

		} catch (CustomBindException e) {

			throw new CustomBindException(errors);
		}

		return bankAccountRepository.search(bankAccountSearch);
	}

}