class FundRepository {

	public Pagination<Fund> search(FundSearch domain) {
		if (!financialConfigurationService.fetchDataFrom().isEmpty()
				&& financialConfigurationService.fetchDataFrom().equalsIgnoreCase("es")) {
			FundSearchContract fundSearchContract = new FundSearchContract();
			ModelMapper mapper = new ModelMapper();
			mapper.map(domain, fundSearchContract);
			return fundESRepository.search(fundSearchContract);
		} else {
			return fundJdbcRepository.search(domain);
		}

	}

	@Autowired public  FundRepository(FundJdbcRepository fundJdbcRepository, MastersQueueRepository fundQueueRepository,
			FinancialConfigurationService financialConfigurationService, FundESRepository fundESRepository,
			@Value("${persist.through.kafka}") String persistThroughKafka);

}