@Test public void testSearchSelectQueryWithTenantId() { List<Object> preparedStatementValues = new ArrayList<>(); MarriageDocumentTypeSearchCriteria marriageDocType = MarriageDocumentTypeSearchCriteria.builder() .tenantId("ap.kurnool").build(); String expectedQuery = "SELECT * FROM egmr_marriage_document_type WHERE tenantid=? ;"; String actualQuery = mdtQueryBuilder.getSelectQuery(marriageDocType, preparedStatementValues); List<Object> expectedPSV = new ArrayList<>(); expectedPSV.add("ap.kurnool"); assertEquals(expectedPSV, preparedStatementValues); assertEquals(expectedQuery, actualQuery); }
public String getSelectQuery(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria, List<Object> preparedStatementValues) { selectQuery = new StringBuilder(BASEQUERY); addWhereClause(marriageDocumentTypeSearchCriteria, preparedStatementValues); log.info(selectQuery.toString()); return selectQuery.toString(); }
MarriageDocumentTypeQueryBuilder { public String getSelectQuery(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria, List<Object> preparedStatementValues) { selectQuery = new StringBuilder(BASEQUERY); addWhereClause(marriageDocumentTypeSearchCriteria, preparedStatementValues); log.info(selectQuery.toString()); return selectQuery.toString(); } }
MarriageDocumentTypeQueryBuilder { public String getSelectQuery(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria, List<Object> preparedStatementValues) { selectQuery = new StringBuilder(BASEQUERY); addWhereClause(marriageDocumentTypeSearchCriteria, preparedStatementValues); log.info(selectQuery.toString()); return selectQuery.toString(); }  }
MarriageDocumentTypeQueryBuilder { public String getSelectQuery(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria, List<Object> preparedStatementValues) { selectQuery = new StringBuilder(BASEQUERY); addWhereClause(marriageDocumentTypeSearchCriteria, preparedStatementValues); log.info(selectQuery.toString()); return selectQuery.toString(); }  String getSelectQuery(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria,
			List<Object> preparedStatementValues); String getIdNextValForMarriageDocType(); }
MarriageDocumentTypeQueryBuilder { public String getSelectQuery(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria, List<Object> preparedStatementValues) { selectQuery = new StringBuilder(BASEQUERY); addWhereClause(marriageDocumentTypeSearchCriteria, preparedStatementValues); log.info(selectQuery.toString()); return selectQuery.toString(); }  String getSelectQuery(MarriageDocumentTypeSearchCriteria marriageDocumentTypeSearchCriteria,
			List<Object> preparedStatementValues); String getIdNextValForMarriageDocType(); final static String BATCH_INSERT_QUERY; final static String BATCH_UPDATE_QUERY; final String BASEQUERY; }