@Test public void testGenerateSelectClause() throws Exception { Assert.assertTrue("select *".equals( generator.generateSelectClause(null))); Assert.assertTrue("select col1,col2,col3".equals( generator.generateSelectClause(fieldNames))); }
protected String generateSelectClause(String[] fieldNames) { StringBuilder builder = new StringBuilder("select "); if (fieldNames == null) { builder.append("*"); } else { builder.append(StringUtils.join(fieldNames, ',')); } return builder.toString(); }
DefaultSqlGenerator implements SqlGenerator { protected String generateSelectClause(String[] fieldNames) { StringBuilder builder = new StringBuilder("select "); if (fieldNames == null) { builder.append("*"); } else { builder.append(StringUtils.join(fieldNames, ',')); } return builder.toString(); } }
DefaultSqlGenerator implements SqlGenerator { protected String generateSelectClause(String[] fieldNames) { StringBuilder builder = new StringBuilder("select "); if (fieldNames == null) { builder.append("*"); } else { builder.append(StringUtils.join(fieldNames, ',')); } return builder.toString(); } DefaultSqlGenerator(); }
DefaultSqlGenerator implements SqlGenerator { protected String generateSelectClause(String[] fieldNames) { StringBuilder builder = new StringBuilder("select "); if (fieldNames == null) { builder.append("*"); } else { builder.append(StringUtils.join(fieldNames, ',')); } return builder.toString(); } DefaultSqlGenerator(); SqlStatement generateSelect(Topic topic, CompositeCriteria searchCriteria,
			String[] fieldNames); }
DefaultSqlGenerator implements SqlGenerator { protected String generateSelectClause(String[] fieldNames) { StringBuilder builder = new StringBuilder("select "); if (fieldNames == null) { builder.append("*"); } else { builder.append(StringUtils.join(fieldNames, ',')); } return builder.toString(); } DefaultSqlGenerator(); SqlStatement generateSelect(Topic topic, CompositeCriteria searchCriteria,
			String[] fieldNames);  }