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;
}
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;
}
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;
}
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;
}
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;
}
Aggregations