@SuppressWarnings("unchecked") @Test public void testSearch() { MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria = new MarriageDocumentTypeSearchCriteria(); marriageDocumentTypeSearchCriteria.setApplicationType(ApplicationType.REGISTRATION.toString()); marriageDocumentTypeSearchCriteria.setIsActive(true); marriageDocumentTypeSearchCriteria.setTenantId("ap.kurnool"); List<MarriageDocumentType> marriageDocumentTypes = getMarriageDocumentTypes(); when(marriageDocumentTypeQueryBuilder.getSelectQuery(any(MarriageDocumentTypeSearchCriteria.class), any(List.class))).thenReturn(getQueryGenerator()); when(jdbcTemplate.query(any(String.class), Matchers.<Object[]>any(), any(MarriageDocumentTypeRowMapper.class))) .thenReturn(marriageDocumentTypes); marriageDocumentTypeRepository.search(marriageDocumentTypeSearchCriteria); }
public List<MarriageDocumentType> search(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String query = marriageDocumentTypeQueryBuilder.getSelectQuery(marriageDocumentTypeSearchCriteria, preparedStatementValues); List<MarriageDocumentType> marriageDocumentTypesList = jdbcTemplate.query(query, preparedStatementValues.toArray(), rowMapper); log.info(marriageDocumentTypesList.toString()); return marriageDocumentTypesList; }
MarriageDocumentTypeRepository { public List<MarriageDocumentType> search(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String query = marriageDocumentTypeQueryBuilder.getSelectQuery(marriageDocumentTypeSearchCriteria, preparedStatementValues); List<MarriageDocumentType> marriageDocumentTypesList = jdbcTemplate.query(query, preparedStatementValues.toArray(), rowMapper); log.info(marriageDocumentTypesList.toString()); return marriageDocumentTypesList; } }
MarriageDocumentTypeRepository { public List<MarriageDocumentType> search(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String query = marriageDocumentTypeQueryBuilder.getSelectQuery(marriageDocumentTypeSearchCriteria, preparedStatementValues); List<MarriageDocumentType> marriageDocumentTypesList = jdbcTemplate.query(query, preparedStatementValues.toArray(), rowMapper); log.info(marriageDocumentTypesList.toString()); return marriageDocumentTypesList; }  }
MarriageDocumentTypeRepository { public List<MarriageDocumentType> search(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String query = marriageDocumentTypeQueryBuilder.getSelectQuery(marriageDocumentTypeSearchCriteria, preparedStatementValues); List<MarriageDocumentType> marriageDocumentTypesList = jdbcTemplate.query(query, preparedStatementValues.toArray(), rowMapper); log.info(marriageDocumentTypesList.toString()); return marriageDocumentTypesList; }  List<MarriageDocumentType> search(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria); void create(List<MarriageDocumentType> marriageDocumentTypes); void update(List<MarriageDocumentType> marriageDocumentTypes); List<Long> getIds(List<MarriageDocumentType> marriageDocumentTypeList); }
MarriageDocumentTypeRepository { public List<MarriageDocumentType> search(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria) { List<Object> preparedStatementValues = new ArrayList<>(); String query = marriageDocumentTypeQueryBuilder.getSelectQuery(marriageDocumentTypeSearchCriteria, preparedStatementValues); List<MarriageDocumentType> marriageDocumentTypesList = jdbcTemplate.query(query, preparedStatementValues.toArray(), rowMapper); log.info(marriageDocumentTypesList.toString()); return marriageDocumentTypesList; }  List<MarriageDocumentType> search(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria); void create(List<MarriageDocumentType> marriageDocumentTypes); void update(List<MarriageDocumentType> marriageDocumentTypes); List<Long> getIds(List<MarriageDocumentType> marriageDocumentTypeList);  }