use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class CommissioningBean method getAllRevisers.
// Getters to list possible values of related entities
/**
* Get the list of all revisers
*
* @return the list of all revisers
*/
public List<SelectItem> getAllRevisers() {
List<User> refs = UserManager.getDefault().getAllEntities(null, new SortCriteria("name", true));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (User ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class ContactBean method getAllDepartmentsOfCompany.
public List<SelectItem> getAllDepartmentsOfCompany() {
final Set<Organization> organizations = new LinkedHashSet<Organization>();
organizations.add(this.getSelectedOrganization());
final DepartmentSearch departmentSearch = new DepartmentSearch();
departmentSearch.setOrganization(this.getSelectedOrganization());
final List<Department> refs = DepartmentManager.getDefault().getAllEntities(departmentSearch, new SortCriteria("name"));
final List<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem(null, FacesUtils.getMessage("contact.selectOneDepartment")));
for (Department ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class ContactBean method getOrganizations.
// Getters to list possible values of related entities
/**
* Get the list of all organizations
*
* @return the list of all organizations
*/
public List<SelectItem> getOrganizations() {
List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Organization ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class InteractionBean method getProjects.
// Getters to list possible values of related entities
/**
* Get the list of all projects
* @return the list of all projects
*/
public List<SelectItem> getProjects() {
List<Project> refs = ProjectManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Project ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class InteractionBean method getOffers.
/**
* Get the list of all offers
* @return the list of all offers
*/
public List<SelectItem> getOffers() {
List<Offer> refs = OfferManager.getDefault().getAllEntities(null, new SortCriteria("title"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Offer ref : refs) {
ret.add(new SelectItem(ref, ref.getTitle()));
}
return ret;
}
Aggregations