18 package org.turro.financials.document.contract;
20 import java.util.Collection;
21 import org.turro.elephant.db.WhereClause;
22 import org.turro.financials.db.FinancialsPU;
23 import org.turro.financials.entity.Contract;
24 import org.turro.financials.entity.ContractInterventionType;
25 import org.turro.plugin.contacts.IContact;
26 import org.turro.zkoss.input.CollectionListbox;
37 this.contact = contact;
48 private Collection<Contract> getContracts() {
50 wc.
addClause(
"select distinct ctc from Contract ctc");
51 wc.
addClause(
"left join ctc.participants par");
52 wc.
addClause(
"where ctc.contractor = :contractor");
55 wc.
addClause(
"and ctc.contractDefinition.id in (48, 55, 56)");
57 if(cit.isShowDocuments()) {
58 wc.
addClause(
"or (par.interventionType = :cit" + cit.toString());
60 wc.
addClause(
"and par.idContact = :con" + cit.toString() +
")");
64 return new FinancialsPU().getResultList(wc);
void addClause(String clause)
void addNamedValue(String name, Object value)
String convertToString(Contract v)
void setContact(IContact contact)
String getFullDescription()