BrightSide Workbench Full Report + Source Code
org.turro.financials.contract.ContractCombobox Class Reference
Inheritance diagram for org.turro.financials.contract.ContractCombobox:
Collaboration diagram for org.turro.financials.contract.ContractCombobox:

Public Member Functions

boolean isOnlyActive ()
 
void setOnlyActive (boolean onlyActive)
 
boolean isOnlyStores ()
 
void setOnlyStores (boolean onlyStores)
 
void setContractDefinition (ContractDefinition contractDefinition)
 
void setDocumentDefinition (DocumentDefinition documentDefinition)
 
void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (Contract value)
 
- Public Member Functions inherited from org.turro.zkoss.input.GenericCombobox< V >
 GenericCombobox ()
 
getObjectValue ()
 
void setObjectValue (V value)
 
boolean isAllowNotInModelValues ()
 
void setAllowNotInModelValues (boolean allowNotInModelValues)
 
void refreshModel ()
 
abstract String getTextFromObject (V value)
 
Object getRelatedEntity ()
 
void setRelatedEntity (Object relatedEntity)
 
void render (Comboitem item, Object data, int index) throws Exception
 

Detailed Description

Author
Lluis TurrĂ³ Cutiller lluis.nosp@m.@tur.nosp@m.ro.or.nosp@m.g

Definition at line 35 of file ContractCombobox.java.

Member Function Documentation

◆ getTextFromObject()

String org.turro.financials.contract.ContractCombobox.getTextFromObject ( Contract  value)

Definition at line 95 of file ContractCombobox.java.

95  {
96  return value.getName();
97  }
Here is the call graph for this function:

◆ isOnlyActive()

boolean org.turro.financials.contract.ContractCombobox.isOnlyActive ( )

Definition at line 41 of file ContractCombobox.java.

41  {
42  return onlyActive;
43  }

◆ isOnlyStores()

boolean org.turro.financials.contract.ContractCombobox.isOnlyStores ( )

Definition at line 49 of file ContractCombobox.java.

49  {
50  return onlyStores;
51  }

◆ populateList()

void org.turro.financials.contract.ContractCombobox.populateList ( String  value,
LinkedList  list,
int  nRows 
)

Reimplemented from org.turro.zkoss.input.GenericCombobox< V >.

Definition at line 66 of file ContractCombobox.java.

66  {
67  Dao dao = new FinancialsPU();
68  WhereClause wc = new WhereClause();
69  wc.addClause("select contract from Contract as contract");
70  wc.addClause("where 1=1");
71  if(onlyStores) {
72  wc.addClause("and contract.stock = TRUE");
73  }
74  if(contractDefinition != null) {
75  wc.addClause("and contract.contractDefinition = :ctcdef");
76  wc.addNamedValue("ctcdef", contractDefinition);
77  }
78  if(documentDefinition != null) {
79  wc.addClause("and exists (");
80  wc.addClause(" select reldoc from contract.contractDefinition.relatedDocuments as reldoc");
81  wc.addClause(" where reldoc.documentDefinition = :docdef");
82  wc.addClause(")");
83  wc.addNamedValue("docdef", documentDefinition);
84  }
85  wc.addLikeFields(new String[] { "contract.name" }, value);
86  wc.addClause("order by contract.name");
87  List<Contract> l = dao.getResultList(wc, nRows);
88  if(onlyActive) {
89  ContractWrapper.clearInactives(l);
90  }
91  list.addAll(l);
92  }
Here is the call graph for this function:

◆ setContractDefinition()

void org.turro.financials.contract.ContractCombobox.setContractDefinition ( ContractDefinition  contractDefinition)

Definition at line 57 of file ContractCombobox.java.

57  {
58  this.contractDefinition = contractDefinition;
59  }

◆ setDocumentDefinition()

void org.turro.financials.contract.ContractCombobox.setDocumentDefinition ( DocumentDefinition  documentDefinition)

Definition at line 61 of file ContractCombobox.java.

61  {
62  this.documentDefinition = documentDefinition;
63  }
Here is the caller graph for this function:

◆ setOnlyActive()

void org.turro.financials.contract.ContractCombobox.setOnlyActive ( boolean  onlyActive)

Definition at line 45 of file ContractCombobox.java.

45  {
46  this.onlyActive = onlyActive;
47  }
Here is the caller graph for this function:

◆ setOnlyStores()

void org.turro.financials.contract.ContractCombobox.setOnlyStores ( boolean  onlyStores)

Definition at line 53 of file ContractCombobox.java.

53  {
54  this.onlyStores = onlyStores;
55  }

The documentation for this class was generated from the following file: