use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class OfferBean method getCostss.
/**
* Get the list of all costss
*
* @return the list of all costss
*/
public List<SelectItem> getCostss() {
List<OfferCost> refs = OfferCostManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (OfferCost ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class OrganizationBean method create.
/**
* Go to create page
* @return forward to CREATE page
*/
public String create() {
organization = new Organization();
// se inserta el departamento 'Indefinido' en caso de existir
final DepartmentSearch departmentSearch = new DepartmentSearch();
departmentSearch.setName("Indefinido");
List<Department> departments = DepartmentManager.getDefault().getAllEntities(departmentSearch, new SortCriteria("name", true));
Set<Department> departmentsSet = new HashSet<Department>();
for (Department department : departments) {
departmentsSet.add(department);
}
organization.setDepartments(departmentsSet);
return NavigationResults.CREATE;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class OrganizationBean method getTypes.
// Getters to list possible values of related entities
/**
* Get the list of all types
* @return the list of all types
*/
public List<SelectItem> getTypes() {
List<OrganizationType> refs = OrganizationTypeManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (OrganizationType ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class OrganizationBean method getOrganizationDocCategories.
/**
* Get the list of all countries
* @return a list with all countries
*/
public List<SelectItem> getOrganizationDocCategories() {
List<OrganizationDocCategory> refs = OrganizationDocCategoryManager.getDefault().getAllEntities(new SortCriteria("id"));
ArrayList<SelectItem> ret = new ArrayList<>();
for (OrganizationDocCategory ref : refs) {
ret.add(new SelectItem(ref, ref.getCode() + " - " + ref.getName()));
}
return ret;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class OrganizationBean method getCountries.
/**
* Get the list of all countries
* @return a list with all countries
*/
public List<SelectItem> getCountries() {
List<Country> refs = CountryManager.getDefault().getAllEntities(new SortCriteria("id"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Country ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
Aggregations