class ChartOfAccountDetailRepository {

    public Pagination<ChartOfAccountDetail> search(ChartOfAccountDetailSearch domain) {

        if (!financialConfigurationService.fetchDataFrom().isEmpty()
                && financialConfigurationService.fetchDataFrom().equalsIgnoreCase("es")) {
            ChartOfAccountDetailSearchContract chartOfAccountDetailSearchContract = new ChartOfAccountDetailSearchContract();
            ModelMapper mapper = new ModelMapper();
            mapper.map(domain, chartOfAccountDetailSearchContract);
            return chartOfAccountDetailESRepository.search(chartOfAccountDetailSearchContract);
        } else {
            return chartOfAccountDetailJdbcRepository.search(domain);
        }

    }

}