Search in sources :

Example 81 with SortCriteria

use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.

the class OfferBean method getInteractionss.

/**
 * Get the list of all interactionss
 *
 * @return the list of all interactionss
 */
public List<SelectItem> getInteractionss() {
    List<Interaction> refs = InteractionManager.getDefault().getAllEntities(null, new SortCriteria("creationDate"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (Interaction ref : refs) {
        ret.add(new SelectItem(ref, ref.getDescription()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) Interaction(com.autentia.tnt.businessobject.Interaction) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 82 with SortCriteria

use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.

the class RequestHolidayBean method getUserRequests.

// Getters to list possible values of related entities
/**
 * Get the list of all userRequests
 *
 * @return the list of all userRequests
 */
public List<SelectItem> getUserRequests() {
    List<User> refs = UserManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    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 83 with SortCriteria

use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.

the class UserHolidaysStateBean method getAll.

public List<UserHolidaysState> getAll() {
    List<UserHolidaysState> ret = new ArrayList<UserHolidaysState>();
    if (chargeYear == null)
        return ret;
    UserManager userManager = UserManager.getDefault();
    UserSearch searchUser = new UserSearch();
    searchUser.setActive(true);
    List<User> users = userManager.getAllEntities(searchUser, new SortCriteria(sortColumn, sortAscending));
    for (User us : users) {
        ret.add(manager.calculateUserHolidaysState(us, this.getChargeYear()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) User(com.autentia.tnt.businessobject.User) UserManager(com.autentia.tnt.manager.admin.UserManager) ArrayList(java.util.ArrayList) UserHolidaysState(com.autentia.tnt.businessobject.UserHolidaysState) UserSearch(com.autentia.tnt.dao.search.UserSearch)

Example 84 with SortCriteria

use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.

the class TagBean method getOrganizationTagss.

/**
 * Get the list of all organizationTagss
 *
 * @return the list of all organizationTagss
 */
public List<SelectItem> getOrganizationTagss() {
    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 85 with SortCriteria

use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.

the class OfferBean method getRoless.

/**
 * Get the list of all roless
 *
 * @return the list of all roless
 */
public List<SelectItem> getRoless() {
    List<OfferRole> refs = OfferRoleManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (OfferRole 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) OfferRole(com.autentia.tnt.businessobject.OfferRole)

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