class BankService {

        public Pagination<Bank> search(BankSearch bankSearch, BindingResult errors) {
            
            try {
                
                List<Bank> banks = new ArrayList<>();
                banks.add(bankSearch);
                validate(banks, Constants.ACTION_SEARCH, errors);
    
                if (errors.hasErrors()) {
                    throw new CustomBindException(errors);
                }
            
            } catch (CustomBindException e) {
    
                throw new CustomBindException(errors);
            }
    
            return bankRepository.search(bankSearch);
        }

}