use of com.autentia.tnt.businessobject.Department in project TNTConcept by autentia.
the class DepartmentBean method getParents.
// Getters to list possible values of related entities
/**
* Get the list of all parents
* @return the list of all parents
*/
public List<SelectItem> getParents() {
List<Department> refs = DepartmentManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Department ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Department in project TNTConcept by autentia.
the class DepartmentBean method getParentsWithoutMe.
/* Department - generated by stajanov (do not edit/delete) */
/**
* Get the list of all parents
* @return the list of all parents
*/
public List<SelectItem> getParentsWithoutMe() {
List<Department> refs = null;
if (department != null && department.getId() != null) {
search.setIdDifferentFrom(department.getId());
refs = manager.getAllEntities(search, new SortCriteria("name"));
search.unsetIdDifferentFrom();
} else {
refs = manager.getAllEntities(null, new SortCriteria("name"));
}
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem("", "-- Ninguno --"));
for (Department ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
Aggregations