class ChartOfAccountService {

        public Pagination<ChartOfAccount> search(ChartOfAccountSearch chartOfAccountSearch, BindingResult errors) {
            
            try {
                
                List<ChartOfAccount> chartOfAccounts = new ArrayList<>();
                chartOfAccounts.add(chartOfAccountSearch);
                validate(chartOfAccounts, Constants.ACTION_SEARCH, errors);
    
                if (errors.hasErrors()) {
                    throw new CustomBindException(errors);
                }
            
            } catch (CustomBindException e) {
    
                throw new CustomBindException(errors);
            }
    
            return chartOfAccountRepository.search(chartOfAccountSearch);
        }

}