class ChartOfAccountDetailService {

        public Pagination<ChartOfAccountDetail> search(ChartOfAccountDetailSearch chartOfAccountDetailSearch, BindingResult errors) {
            
            try {
                
                List<ChartOfAccountDetail> chartOfAccountDetails = new ArrayList<>();
                chartOfAccountDetails.add(chartOfAccountDetailSearch);
                validate(chartOfAccountDetails, Constants.ACTION_SEARCH, errors);
    
                if (errors.hasErrors()) {
                    throw new CustomBindException(errors);
                }
            
            } catch (CustomBindException e) {
    
                throw new CustomBindException(errors);
            }
    
            return chartOfAccountDetailRepository.search(chartOfAccountDetailSearch);
        }

}