19 package org.turro.contacts.www;
21 import java.util.Collection;
22 import java.util.List;
23 import org.turro.string.Strings;
24 import org.turro.action.IMyContact;
25 import org.turro.annotation.MyContact;
26 import org.turro.contacts.Contact;
27 import org.turro.contacts.db.ContactsPU;
28 import org.turro.elephant.context.IConstructor;
29 import org.turro.elephant.db.WhereClause;
30 import org.turro.i18n.I_;
31 import org.turro.jpa.Dao;
32 import org.turro.plugin.contacts.ContactSortedSet;
33 import org.turro.plugin.contacts.IContact;
45 if(!Strings.isBlank(search)) {
46 if(constructor.
isInRole(
"contact:all") || constructor.
isInRole(
"contact:list-all")) {
48 for(
Contact c : (List<Contact>) dao.getResultList(createCriteria(search))) {
62 wc.
addClause(
"select distinct c from Contact as c");
63 wc.
addClause(
"left join c.connectors as o");
65 wc.
addLikeFields(
new String[] {
"c.name",
"o.value" }, search);
void addClause(String clause)
void addLikeFields(String[] fields, String value)
static I18nApiWrapper api()
boolean isInRole(String role)