Search in sources :

Example 21 with SortCriteria

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

the class PeriodicalAccountEntryBean method getTypes.

/**
 * Get the list of all types
 * @return the list of all types
 */
public List<SelectItem> getTypes() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    List<AccountEntryType> refs = AccountEntryTypeManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    for (AccountEntryType ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    ret.add(0, new SelectItem(""));
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) AccountEntryType(com.autentia.tnt.businessobject.AccountEntryType)

Example 22 with SortCriteria

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

the class BillBean method getBillRegimes.

public List<SelectItem> getBillRegimes() {
    List<BillRegime> refs = BillRegimeManager.getDefault().getAllEntities(new SortCriteria("id"));
    BillType billType = bill.getBillType();
    ArrayList<SelectItem> ret = new ArrayList<>();
    for (BillRegime ref : refs) {
        if (ref.getAssociatedBillType().equals(billType)) {
            ret.add(new SelectItem(ref, ref.getCode() + " - " + ref.getName()));
        }
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 23 with SortCriteria

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

the class BillBean method getOrganizations.

/**
 * Get the list of all organizations
 *
 * @return the list of all organizations
 */
public List<SelectItem> getOrganizations() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    List<Organization> refs = OrganizationManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    for (Organization 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)

Example 24 with SortCriteria

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

the class BillBean method getEntriess.

/**
 * Get the list of all categoriass
 *
 * @return the list of all categoriass
 */
public List<SelectItem> getEntriess() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    List<AccountEntry> refs = AccountEntryManager.getDefault().getAllEntities(null, new SortCriteria("concept"));
    for (AccountEntry ref : refs) {
        ret.add(new SelectItem(ref, ref.getConcept()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList)

Example 25 with SortCriteria

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

the class BillBean method getOpenprojects.

/**
 * Get the list of all projects
 *
 * @return the list of all projects
 */
public List<SelectItem> getOpenprojects() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    List<Project> refs = ProjectManager.getDefault().getAllEntities(null, new SortCriteria("name"));
    for (Project proy : refs) {
        ret.add(new SelectItem(proy, proy.getName()));
    }
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) 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