Search in sources :

Example 71 with SortCriteria

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

Example 72 with SortCriteria

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

Example 73 with SortCriteria

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

Example 74 with SortCriteria

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

Example 75 with SortCriteria

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

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