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

Public Member Functions

boolean isOnlyStores ()
 
void setOnlyStores (boolean onlyStores)
 
void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (ContractDefinition 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 31 of file ContractDefinitionCombobox.java.

Member Function Documentation

◆ getTextFromObject()

String org.turro.financials.contract.ContractDefinitionCombobox.getTextFromObject ( ContractDefinition  value)

Definition at line 58 of file ContractDefinitionCombobox.java.

58  {
59  return value.getName();
60  }
Here is the call graph for this function:

◆ isOnlyStores()

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

Definition at line 35 of file ContractDefinitionCombobox.java.

35  {
36  return onlyStores;
37  }

◆ populateList()

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

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

Definition at line 44 of file ContractDefinitionCombobox.java.

44  {
45  Dao dao = new FinancialsPU();
46  WhereClause wc = new WhereClause();
47  wc.addClause("select contractDefinition from ContractDefinition as contractDefinition");
48  wc.addClause("where 1=1");
49  if(onlyStores) {
50  wc.addClause("and (contractDefinition.stock = TRUE or contractDefinition.cash = TRUE)");
51  }
52  wc.addLikeFields(new String[] { "contractDefinition.name" }, value);
53  wc.addClause("order by contractDefinition.name");
54  list.addAll(dao.getResultList(wc, nRows));
55  }
Here is the call graph for this function:

◆ setOnlyStores()

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

Definition at line 39 of file ContractDefinitionCombobox.java.

39  {
40  this.onlyStores = onlyStores;
41  }
Here is the caller graph for this function:

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