19 package org.turro.crm.zul.customer;
21 import java.util.Collection;
22 import java.util.List;
23 import org.turro.crm.db.CrmPU;
24 import org.turro.crm.entity.Customer;
25 import org.turro.elephant.context.Application;
26 import org.turro.elephant.db.WhereClause;
27 import org.turro.jpa.Dao;
28 import org.turro.plugin.filter.IFilterValue;
29 import org.turro.vendor.VendorUtil;
30 import org.turro.zkoss.filter.Filter;
45 return dao.getResultList(wc);
48 private WhereClause createCriteria(List<IFilterValue> values) {
50 wc.
addClause(
"select distinct cust from Customer as cust");
51 wc.
addClause(
"left join cust.activitySectors actsec");
52 wc.
addClause(
"left join cust.technologies tech");
53 wc.
addClause(
"left join cust.customerSectors cussec");
55 wc.
addClause(
"left join cust.customerOwners custown");
56 wc.
addClause(
"where custown.vendor = :vendorlim");
61 for(IFilterValue v : values) {
Collection< Customer > getObjectValues(List< IFilterValue > values)
boolean isInRole(String role)
static Application getApplication()
void addClause(String clause)
void addNamedValue(String name, Object value)
static Vendor getCurrent()