Search in sources :

Example 46 with SortCriteria

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

the class InteractionBean 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().getOpenProjects(new SortCriteria("name"));
    for (Project proy : refs) {
        ret.add(new SelectItem(proy, proy.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 47 with SortCriteria

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

the class InteractionBean method restoreOffer.

public void restoreOffer() {
    final OfferBean offerBean = (OfferBean) FacesUtils.getBean("offerBean");
    final OrganizationSearch orgSearch = new OrganizationSearch();
    orgSearch.setName(offerBean.getOrganization().getName());
    offerBean.setOrganization(OrganizationManager.getDefault().getAllEntities(orgSearch, new SortCriteria("id")).get(0));
    interaction = null;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) OrganizationSearch(com.autentia.tnt.dao.search.OrganizationSearch)

Example 48 with SortCriteria

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

the class OfferBean method getContactsBySelectedOrganization.

/**
 * Selected organization *
 */
public List<SelectItem> getContactsBySelectedOrganization() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    ContactSearch cs = new ContactSearch();
    cs.setOrganization(getOrganization());
    List<Contact> refs = ContactManager.getDefault().getAllEntities(cs, new SortCriteria("name"));
    for (Contact ref : refs) {
        ret.add(new SelectItem(ref, ref.getName()));
    }
    // AƱadiendo el campo vacio
    ret.add(0, new SelectItem(""));
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) ContactSearch(com.autentia.tnt.dao.search.ContactSearch) Contact(com.autentia.tnt.businessobject.Contact)

Example 49 with SortCriteria

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

the class OfferBean method getOrganizations.

/* Offer - generated by stajanov (do not edit/delete) */
/**
 * 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()));
    }
    ret.add(0, new SelectItem(""));
    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 50 with SortCriteria

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

the class OfferBean method getOfferRejectReasons.

/**
 * Get the list of all offerRejectReasons
 *
 * @return the list of all offerRejectReasons
 */
public List<SelectItem> getOfferRejectReasons() {
    List<OfferRejectReason> refs = OfferRejectReasonManager.getDefault().getAllEntities(null, new SortCriteria("title"));
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    for (OfferRejectReason ref : refs) {
        ret.add(new SelectItem(ref, ref.getTitle()));
    }
    // AƱadiendo el campo vacio
    ret.add(0, new SelectItem(""));
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) OfferRejectReason(com.autentia.tnt.businessobject.OfferRejectReason) 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