◆ DocumentByContractVM()
org.turro.financials.model.document.contract.DocumentByContractVM.DocumentByContractVM |
( |
| ) |
|
◆ getContract()
Contract org.turro.financials.model.document.contract.DocumentByContractVM.getContract |
( |
| ) |
|
◆ getContractModel()
Collection<Contract> org.turro.financials.model.document.contract.DocumentByContractVM.getContractModel |
( |
| ) |
|
Definition at line 90 of file DocumentByContractVM.java.
91 IContact contact = Authentication.getIContact();
92 if(contact !=
null && contact.isWebUser()) {
93 WhereClause wc =
new WhereClause();
94 wc.addClause(
"select distinct ctc from Contract ctc");
95 wc.addClause(
"left join ctc.participants par");
96 wc.addClause(
"where ctc.active = TRUE");
97 wc.addClause(
"and ctc.contractDefinition.id in (48, 55, 56)");
98 if(!contact.isAdmin()) {
99 wc.addClause(
"and (ctc.contractor = :contractor");
100 wc.addNamedValue(
"contractor", contact.getId());
101 for(ContractInterventionType cit : ContractInterventionType.values()) {
102 if(cit.isShowDocuments()) {
103 wc.addClause(
"or (par.interventionType = :cit" + cit.toString());
104 wc.addNamedValue(
"cit" + cit.toString(), cit);
105 wc.addClause(
"and par.idContact = :con" + cit.toString() +
")");
106 wc.addNamedValue(
"con" + cit.toString(), contact.getId());
111 wc.addClause(
"order by ctc.name");
112 return new FinancialsPU().getResultList(wc);
114 return Collections.EMPTY_LIST;
◆ getFrom()
Date org.turro.financials.model.document.contract.DocumentByContractVM.getFrom |
( |
| ) |
|
◆ getLabel()
String org.turro.financials.model.document.contract.DocumentByContractVM.getLabel |
( |
String |
label | ) |
|
◆ getModel()
List<DocumentPortfolio> org.turro.financials.model.document.contract.DocumentByContractVM.getModel |
( |
| ) |
|
Definition at line 80 of file DocumentByContractVM.java.
81 if(contract !=
null && from !=
null && to !=
null) {
82 documents =
new DocumentByContractList();
83 ContractPortfolioList cpl =
new ContractPortfolioList(documents,
null, contract, from, to);
84 return new ArrayList(cpl);
86 return Collections.EMPTY_LIST;
◆ getTo()
Date org.turro.financials.model.document.contract.DocumentByContractVM.getTo |
( |
| ) |
|
◆ setContract()
void org.turro.financials.model.document.contract.DocumentByContractVM.setContract |
( |
Contract |
contract | ) |
|
◆ setFrom()
void org.turro.financials.model.document.contract.DocumentByContractVM.setFrom |
( |
Date |
from | ) |
|
◆ setTo()
void org.turro.financials.model.document.contract.DocumentByContractVM.setTo |
( |
Date |
to | ) |
|
◆ update()
void org.turro.financials.model.document.contract.DocumentByContractVM.update |
( |
| ) |
|
The documentation for this class was generated from the following file: