BrightSide Workbench Full Report + Source Code
org.turro.erp.aptitude.AptitudeCombobox Class Reference
Inheritance diagram for org.turro.erp.aptitude.AptitudeCombobox:
Collaboration diagram for org.turro.erp.aptitude.AptitudeCombobox:

Public Member Functions

void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (Aptitude 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 34 of file AptitudeCombobox.java.

Member Function Documentation

◆ getTextFromObject()

String org.turro.erp.aptitude.AptitudeCombobox.getTextFromObject ( Aptitude  value)

Definition at line 61 of file AptitudeCombobox.java.

61  {
62  return value.getName();
63  }
Here is the call graph for this function:

◆ populateList()

void org.turro.erp.aptitude.AptitudeCombobox.populateList ( String  value,
LinkedList  list,
int  nRows 
)

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

Definition at line 37 of file AptitudeCombobox.java.

37  {
38  EntityManager em = new ErpPU().getEntityManager();
39  try {
40  WhereClause wc = SQLHelper.getWhereClause(new String[]{
41  "apt.name"
42  }, value);
43  Query q = em.createQuery(
44  "select apt from Aptitude apt " +
45  "where 1=1 " +
46  wc.getClause() +
47  " order by apt.name"
48  );
49  q.setMaxResults(nRows);
50  wc.setNamedParameters(q);
51  List<Aptitude> l = q.getResultList();
52  for(Object o : l) {
53  list.add(((Aptitude) o).getName());
54  }
55  } finally {
56  em.close();
57  }
58  }
Here is the call graph for this function:

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