Search in sources :

Example 6 with PositionSearch

use of com.autentia.tnt.dao.search.PositionSearch in project TNTConcept by autentia.

the class DepartmentBean method getAllPositions.

public List<SelectItem> getAllPositions() {
    final PositionSearch notDeletedSearch = new PositionSearch();
    notDeletedSearch.setDeleted(false);
    final List<Position> refs = PositionManager.getDefault().getAllEntities(notDeletedSearch, new SortCriteria("name"));
    final List<SelectItem> ret = new ArrayList<SelectItem>();
    for (Position ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    return ret;
}
Also used : PositionSearch(com.autentia.tnt.dao.search.PositionSearch) SortCriteria(com.autentia.tnt.dao.SortCriteria) Position(com.autentia.tnt.businessobject.Position) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Aggregations

SortCriteria (com.autentia.tnt.dao.SortCriteria)6 PositionSearch (com.autentia.tnt.dao.search.PositionSearch)6 Position (com.autentia.tnt.businessobject.Position)5 ArrayList (java.util.ArrayList)3 SelectItem (javax.faces.model.SelectItem)3 Department (com.autentia.tnt.businessobject.Department)2 ContactInfo (com.autentia.tnt.businessobject.ContactInfo)1 DepartmentSearch (com.autentia.tnt.dao.search.DepartmentSearch)1 ContactPosition (com.autentia.tnt.manager.contacts.advancedsearch.ContactPosition)1 HashSet (java.util.HashSet)1