@Test public void no_input_test() { final MeterCostQueryBuilder meterCostQueryBuilder = new MeterCostQueryBuilder(); final MeterCostGetRequest meterCostGetRequest = new MeterCostGetRequest(); final Map<String, Object> preparedStatementValues = new HashMap<>(); assertEquals( "Select wmc.id as wmc_id,wmc.code as wmc_code," + "wmc.metermake as wmc_metermake,wmc.amount as wmc_amount," + "wmc.active as wmc_active,wmc.createdby as wmc_createdby,wmc.createddate as wmc_createddate," + "wmc.lastmodifiedby as wmc_lastmodifiedby,wmc.lastmodifieddate as wmc_lastmodifieddate," + "wmc.tenantid as wmc_tenantid from egwtr_metercost wmc ORDER BY wmc.metermake ASC", meterCostQueryBuilder.getQuery(meterCostGetRequest, preparedStatementValues)); }
@SuppressWarnings("rawtypes") public String getQuery(final MeterCostGetRequest meterCostGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder selectQuery = new StringBuilder(BASE_QUERY); addWhereClause(selectQuery, meterCostGetRequest, preparedStatementValues); addOrderByClause(selectQuery, meterCostGetRequest); return selectQuery.toString(); }
MeterCostQueryBuilder { @SuppressWarnings("rawtypes") public String getQuery(final MeterCostGetRequest meterCostGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder selectQuery = new StringBuilder(BASE_QUERY); addWhereClause(selectQuery, meterCostGetRequest, preparedStatementValues); addOrderByClause(selectQuery, meterCostGetRequest); return selectQuery.toString(); } }
MeterCostQueryBuilder { @SuppressWarnings("rawtypes") public String getQuery(final MeterCostGetRequest meterCostGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder selectQuery = new StringBuilder(BASE_QUERY); addWhereClause(selectQuery, meterCostGetRequest, preparedStatementValues); addOrderByClause(selectQuery, meterCostGetRequest); return selectQuery.toString(); }  }
MeterCostQueryBuilder { @SuppressWarnings("rawtypes") public String getQuery(final MeterCostGetRequest meterCostGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder selectQuery = new StringBuilder(BASE_QUERY); addWhereClause(selectQuery, meterCostGetRequest, preparedStatementValues); addOrderByClause(selectQuery, meterCostGetRequest); return selectQuery.toString(); }  @SuppressWarnings("rawtypes") String getQuery(final MeterCostGetRequest meterCostGetRequest, final Map<String, Object> preparedStatementValues); String insertMeterCostQuery(); String updateMeterCostQuery(); String selectMeterCostByNameAndTenantIdQuery(); String selectMeterCostByNameTenantIdAndCodeNotInQuery(); }
MeterCostQueryBuilder { @SuppressWarnings("rawtypes") public String getQuery(final MeterCostGetRequest meterCostGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder selectQuery = new StringBuilder(BASE_QUERY); addWhereClause(selectQuery, meterCostGetRequest, preparedStatementValues); addOrderByClause(selectQuery, meterCostGetRequest); return selectQuery.toString(); }  @SuppressWarnings("rawtypes") String getQuery(final MeterCostGetRequest meterCostGetRequest, final Map<String, Object> preparedStatementValues); String insertMeterCostQuery(); String updateMeterCostQuery(); String selectMeterCostByNameAndTenantIdQuery(); String selectMeterCostByNameTenantIdAndCodeNotInQuery(); static final String BASE_QUERY; }