@Test public void no_input_test() { final MeterStatusQueryBuilder meterStatusQueryBuilder = new MeterStatusQueryBuilder(); final MeterStatusGetRequest meterStatusGetRequest = new MeterStatusGetRequest(); final Map<String, Object> preparedStatementValues = new HashMap<>(); assertEquals("Select ms.id as ms_id,ms.code as ms_code," + "ms.status as ms_status,ms.active as ms_active,ms.description as ms_description,ms.createdby as" + " ms_createdby,ms.createddate as ms_createddate,ms.lastmodifiedby as ms_" + "lastmodifiedby,ms.lastmodifieddate as ms_lastmodifieddate,ms.tenantid as" + " ms_tenantid FROM egwtr_meterstatus ms ORDER BY ms.id DESC", meterStatusQueryBuilder.getQuery(meterStatusGetRequest, preparedStatementValues)); }
public String getQuery(final MeterStatusGetRequest meterStatusGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder queryString = new StringBuilder(BASE_QUERY); addWhereClause(meterStatusGetRequest, preparedStatementValues, queryString); addOrderByClause(meterStatusGetRequest, queryString); return queryString.toString(); }
MeterStatusQueryBuilder { public String getQuery(final MeterStatusGetRequest meterStatusGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder queryString = new StringBuilder(BASE_QUERY); addWhereClause(meterStatusGetRequest, preparedStatementValues, queryString); addOrderByClause(meterStatusGetRequest, queryString); return queryString.toString(); } }
MeterStatusQueryBuilder { public String getQuery(final MeterStatusGetRequest meterStatusGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder queryString = new StringBuilder(BASE_QUERY); addWhereClause(meterStatusGetRequest, preparedStatementValues, queryString); addOrderByClause(meterStatusGetRequest, queryString); return queryString.toString(); }  }
MeterStatusQueryBuilder { public String getQuery(final MeterStatusGetRequest meterStatusGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder queryString = new StringBuilder(BASE_QUERY); addWhereClause(meterStatusGetRequest, preparedStatementValues, queryString); addOrderByClause(meterStatusGetRequest, queryString); return queryString.toString(); }  String getCreateMeterStatusQuery(); String getUpdateMeterStatusQuery(); String getQuery(final MeterStatusGetRequest meterStatusGetRequest, final Map<String, Object> preparedStatementValues); }
MeterStatusQueryBuilder { public String getQuery(final MeterStatusGetRequest meterStatusGetRequest, final Map<String, Object> preparedStatementValues) { final StringBuilder queryString = new StringBuilder(BASE_QUERY); addWhereClause(meterStatusGetRequest, preparedStatementValues, queryString); addOrderByClause(meterStatusGetRequest, queryString); return queryString.toString(); }  String getCreateMeterStatusQuery(); String getUpdateMeterStatusQuery(); String getQuery(final MeterStatusGetRequest meterStatusGetRequest, final Map<String, Object> preparedStatementValues); static final String BASE_QUERY; }