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

Public Member Functions

boolean isOnlyActive ()
 
void setOnlyActive (boolean onlyActive)
 
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 33 of file ProviderCombobox.java.

Member Function Documentation

◆ getTextFromObject()

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

Definition at line 64 of file ProviderCombobox.java.

64  {
65  return value.getName();
66  }
Here is the call graph for this function:

◆ isOnlyActive()

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

Definition at line 37 of file ProviderCombobox.java.

37  {
38  return onlyActive;
39  }

◆ populateList()

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

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

Definition at line 46 of file ProviderCombobox.java.

46  {
47  Dao dao = new FinancialsPU();
48  WhereClause wc = new WhereClause();
49  wc.addClause("select distinct contract from Contract as contract");
50  wc.addClause("left join contract.contractPreferences cp");
51  wc.addClause("where (contract.contractDefinition.id = 48 or contract.contractDefinition.id = 55)");
52  wc.addLikeFields(new String[] { "contract.name" }, value);
53  wc.addClause("order by contract.name");
54  List<Contract> l = dao.getResultList(wc, nRows);
55  if(onlyActive) {
56  ContractWrapper.clearInactives(l);
57  }
58  for(Object o : l) {
59  list.add((Contract) o);
60  }
61  }
Here is the call graph for this function:

◆ setOnlyActive()

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

Definition at line 41 of file ProviderCombobox.java.

41  {
42  this.onlyActive = onlyActive;
43  }

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