use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class AccountEntryTypeBean method getGroups.
// Getters to list possible values of related entities
/**
* Get the list of all groups
* @return the list of all groups
*/
public List<SelectItem> getGroups() {
List<AccountEntryGroup> refs = AccountEntryGroupManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (AccountEntryGroup 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 ReportBean method getUsers.
public ArrayList<SelectItem> getUsers() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
List<User> refs = userDAO.search(new SortCriteria("name"));
for (User ref : refs) {
ret.add(new SelectItem(ref.getId().toString(), ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class ReportBean method getProvider.
public ArrayList<SelectItem> getProvider() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem("allItemsSelected", "-"));
List<Inventary> refs = inventoryDAO.search(new SortCriteria("provider"));
for (Inventary ref : refs) {
ret.add(new SelectItem(ref.getProvider(), ref.getProvider()));
}
ret = (ArrayList<SelectItem>) ReportUtil.removeDuplicates(ret);
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class ReportBean method getModels.
public ArrayList<SelectItem> getModels() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem("allItemsSelected", "-"));
List<Inventary> refs = inventoryDAO.search(new SortCriteria("model"));
for (Inventary ref : refs) {
ret.add(new SelectItem(ref.getModel(), ref.getModel()));
}
ret = (ArrayList<SelectItem>) ReportUtil.removeDuplicates(ret);
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class ReportBean method getRoles.
public ArrayList<SelectItem> getRoles() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ProjectRoleSearch projectRoleSearch = new ProjectRoleSearch();
projectRoleSearch.setProject(getSelectedProject());
List<ProjectRole> projectRoles = projectRoleDAO.getDefault().search(projectRoleSearch, new SortCriteria("name"));
for (ProjectRole projectRole : projectRoles) {
ret.add(new SelectItem(projectRole.getId().toString(), projectRole.getName()));
}
return ret;
}
Aggregations