class BankBranchService {

        public Pagination<BankBranch> search(BankBranchSearch bankBranchSearch, BindingResult errors) {
            
            try {
                
                List<BankBranch> bankBranches = new ArrayList<>();
                bankBranches.add(bankBranchSearch);
                validate(bankBranches, Constants.ACTION_SEARCH, errors);
    
                if (errors.hasErrors()) {
                    throw new CustomBindException(errors);
                }
            
            } catch (CustomBindException e) {
    
                throw new CustomBindException(errors);
            }
    
            return bankBranchRepository.search(bankBranchSearch);
        }

}