BrightSide Workbench Full Report + Source Code
org.turro.jpa.input.JpaCombobox< V > Class Template Referenceabstract
Inheritance diagram for org.turro.jpa.input.JpaCombobox< V >:
Collaboration diagram for org.turro.jpa.input.JpaCombobox< V >:

Public Member Functions

 JpaCombobox ()
 
 JpaCombobox (Dao dao, String query)
 
 JpaCombobox (Dao dao, WhereClause wc)
 
Dao getDao ()
 
void setDao (Dao dao)
 
String getQuery ()
 
void setQuery (String query)
 
void populateList (String value, LinkedList list, int nRows)
 
- 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 JpaCombobox.java.

Constructor & Destructor Documentation

◆ JpaCombobox() [1/3]

Definition at line 37 of file JpaCombobox.java.

37  {
38  super();
39  }

◆ JpaCombobox() [2/3]

org.turro.jpa.input.JpaCombobox< V >.JpaCombobox ( Dao  dao,
String  query 
)

Definition at line 41 of file JpaCombobox.java.

41  {
42  this.dao = dao;
43  this.query = query;
44  this.wc = null;
45  }

◆ JpaCombobox() [3/3]

Definition at line 47 of file JpaCombobox.java.

47  {
48  this.dao = dao;
49  this.query = null;
50  this.wc = wc;
51  }

Member Function Documentation

◆ getDao()

Definition at line 53 of file JpaCombobox.java.

53  {
54  return dao;
55  }

◆ getQuery()

String org.turro.jpa.input.JpaCombobox< V >.getQuery ( )

Definition at line 61 of file JpaCombobox.java.

61  {
62  return query;
63  }

◆ populateList()

void org.turro.jpa.input.JpaCombobox< V >.populateList ( String  value,
LinkedList  list,
int  nRows 
)

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

Reimplemented in org.turro.jpa.input.JpaLabelCombobox< V >.

Definition at line 70 of file JpaCombobox.java.

70  {
71  if(wc != null) {
72  wc.addNamedValue("value", SQLHelper.convertToPartialLike(value));
73  list.addAll(dao.getResultList(wc, nRows));
74  } else {
75  if(query.contains("?")) {
76  list.addAll(dao.getResultList(query, new Object[] { SQLHelper.convertToPartialLike(value) }, nRows));
77  } else {
78  list.addAll(dao.getResultList(query));
79  }
80  }
81  }
void addNamedValue(String name, Object value)
Here is the call graph for this function:

◆ setDao()

void org.turro.jpa.input.JpaCombobox< V >.setDao ( Dao  dao)

Definition at line 57 of file JpaCombobox.java.

57  {
58  this.dao = dao;
59  }

◆ setQuery()

void org.turro.jpa.input.JpaCombobox< V >.setQuery ( String  query)

Definition at line 65 of file JpaCombobox.java.

65  {
66  this.query = query;
67  }

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