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

Public Member Functions

boolean isOnlyActive ()
 
void setOnlyActive (boolean onlyActive)
 
void populateList (String value, LinkedList list, int nRows)
 
String getTextFromObject (OwnedAptitude 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 OwnedAptitudeCombobox.java.

Member Function Documentation

◆ getTextFromObject()

String org.turro.erp.humanres.OwnedAptitudeCombobox.getTextFromObject ( OwnedAptitude  value)

Definition at line 72 of file OwnedAptitudeCombobox.java.

72  {
73  return value.getName();
74  }
Here is the call graph for this function:

◆ isOnlyActive()

boolean org.turro.erp.humanres.OwnedAptitudeCombobox.isOnlyActive ( )

Definition at line 38 of file OwnedAptitudeCombobox.java.

38  {
39  return onlyActive;
40  }

◆ populateList()

void org.turro.erp.humanres.OwnedAptitudeCombobox.populateList ( String  value,
LinkedList  list,
int  nRows 
)

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

Definition at line 47 of file OwnedAptitudeCombobox.java.

47  {
48  EntityManager em = new ErpPU().getEntityManager();
49  try {
50  WhereClause wc = SQLHelper.getWhereClause(new String[]{
51  "res.humanResource.name"
52  }, value);
53  Query q = em.createQuery(
54  "select res from OwnedAptitude res " +
55  "where res.humanResource.active = :active " +
56  wc.getClause() +
57  " order by res.humanResource.name"
58  );
59  wc.addNamedValue("active", onlyActive);
60  q.setMaxResults(nRows);
61  wc.setNamedParameters(q);
62  List<OwnedAptitude> l = q.getResultList();
63  for(Object o : l) {
64  list.add(((OwnedAptitude) o).getName());
65  }
66  } finally {
67  em.close();
68  }
69  }
Here is the call graph for this function:

◆ setOnlyActive()

void org.turro.erp.humanres.OwnedAptitudeCombobox.setOnlyActive ( boolean  onlyActive)

Definition at line 42 of file OwnedAptitudeCombobox.java.

42  {
43  this.onlyActive = onlyActive;
44  }

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