19 package org.turro.contacts.filter;
21 import java.util.Date;
22 import java.util.List;
23 import org.turro.string.Strings;
24 import org.turro.contacts.db.ContactsPU;
25 import org.turro.elephant.db.SQLHelper;
26 import org.turro.elephant.db.WhereClause;
27 import org.turro.zkoss.filter.FilterField;
28 import org.turro.zkoss.filter.FilterFieldOperator;
81 super(
label,
operator);
86 String inClause = getInClause();
87 if(!Strings.isBlank(inClause)) {
98 private String getInClause() {
100 wc.
addClause(
"select distinct contact.id from Contact as contact");
101 wc.
addClause(
"left join contact.addresses address");
102 wc.
addClause(
"left join contact.connectors connector");
103 wc.
addClause(
"left join contact.comments comment");
106 List<String> list =
new ContactsPU().getResultList(wc);
108 if(!Strings.isBlank(inClause)) {
109 return "(" + inClause +
")";
static String convertToIn(Collection collection)
void addClause(String clause)
void doAddConstraint(WhereClause wc, String field)