@Test public void build() throws Exception { List<String> columns = Lists.newArrayList("id2", "user_name", "user_age"); CommonGetAllBuilder b = new CommonGetAllBuilder(columns); assertThat(b.buildSql(), equalTo("select id2, user_name, user_age from #table")); }
@Override public String buildSql() { String s1 = Joiner.on(", ").join(columns); return String.format(SQL, s1, s1); }
CommonGetAllBuilder extends AbstractCommonBuilder { @Override public String buildSql() { String s1 = Joiner.on(", ").join(columns); return String.format(SQL, s1, s1); } }
CommonGetAllBuilder extends AbstractCommonBuilder { @Override public String buildSql() { String s1 = Joiner.on(", ").join(columns); return String.format(SQL, s1, s1); } CommonGetAllBuilder(List<String> cols); }
CommonGetAllBuilder extends AbstractCommonBuilder { @Override public String buildSql() { String s1 = Joiner.on(", ").join(columns); return String.format(SQL, s1, s1); } CommonGetAllBuilder(List<String> cols); @Override String buildSql(); }
CommonGetAllBuilder extends AbstractCommonBuilder { @Override public String buildSql() { String s1 = Joiner.on(", ").join(columns); return String.format(SQL, s1, s1); } CommonGetAllBuilder(List<String> cols); @Override String buildSql();  }