Search in sources :

Example 31 with SortCriteria

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;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) AccountEntryGroup(com.autentia.tnt.businessobject.AccountEntryGroup)

Example 32 with SortCriteria

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;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) User(com.autentia.tnt.businessobject.User) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 33 with SortCriteria

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;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) Inventary(com.autentia.tnt.businessobject.Inventary)

Example 34 with SortCriteria

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;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) Inventary(com.autentia.tnt.businessobject.Inventary)

Example 35 with SortCriteria

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;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) ProjectRoleSearch(com.autentia.tnt.dao.search.ProjectRoleSearch) ProjectRole(com.autentia.tnt.businessobject.ProjectRole)

Aggregations

SortCriteria (com.autentia.tnt.dao.SortCriteria)136 ArrayList (java.util.ArrayList)114 SelectItem (javax.faces.model.SelectItem)107 Organization (com.autentia.tnt.businessobject.Organization)15 User (com.autentia.tnt.businessobject.User)15 Department (com.autentia.tnt.businessobject.Department)9 Project (com.autentia.tnt.businessobject.Project)9 Position (com.autentia.tnt.businessobject.Position)7 Calendar (java.util.Calendar)7 GregorianCalendar (java.util.GregorianCalendar)7 Activity (com.autentia.tnt.businessobject.Activity)6 ProjectRole (com.autentia.tnt.businessobject.ProjectRole)6 ActivitySearch (com.autentia.tnt.dao.search.ActivitySearch)6 PositionSearch (com.autentia.tnt.dao.search.PositionSearch)6 Account (com.autentia.tnt.businessobject.Account)5 Contact (com.autentia.tnt.businessobject.Contact)5 Bill (com.autentia.tnt.businessobject.Bill)4 Inventary (com.autentia.tnt.businessobject.Inventary)4 AccountEntryType (com.autentia.tnt.businessobject.AccountEntryType)3 ExternalActivity (com.autentia.tnt.businessobject.ExternalActivity)3