class BankRepository {

	public Pagination<Bank> search(BankSearch domain) {

		if (!financialConfigurationService.fetchDataFrom().isEmpty()
				&& financialConfigurationService.fetchDataFrom().equalsIgnoreCase("es")) {
			BankSearchContract bankSearchContract = new BankSearchContract();
			ModelMapper mapper = new ModelMapper();
			mapper.map(domain, bankSearchContract);
			return bankESRepository.search(bankSearchContract);
		} else {
			return bankJdbcRepository.search(domain);
		}
	}

	@Autowired public  BankRepository(BankJdbcRepository bankJdbcRepository, MastersQueueRepository bankQueueRepository,
			FinancialConfigurationService financialConfigurationService, BankESRepository bankESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka);

}