use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class UserBean method getProvinces.
/**
* Get the list of all provinces
*
* @return the list of all provinces
*/
public List<SelectItem> getProvinces() {
List<Province> refs = ProvinceManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Province 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 UserBean method getDepartments.
/**
* Get the list of all departments
*
* @return the list of all departments
*/
public List<SelectItem> getDepartments() {
List<Department> refs = DepartmentManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Department 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 UserBean method getAgreements.
/**
* Get the list of all agreements
*
* @return the list of all agreements
*/
public List<SelectItem> getAgreements() {
List<WorkingAgreement> refs = WorkingAgreementManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (WorkingAgreement 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 UserBean method getCategorys.
/**
* Get the list of all categorys
*
* @return the list of all categorys
*/
public List<SelectItem> getCategorys() {
List<UserCategory> refs = UserCategoryManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (UserCategory 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 BillBean method loadIVAReasons.
private void loadIVAReasons() {
List<IVAReason> refs = IVAReasonManager.getDefault().getAllEntities(new SortCriteria("id"));
exemptReasons = new ArrayList<>();
noExemptReasons = new ArrayList<>();
for (IVAReason ref : refs) {
SelectItem selectItem = new SelectItem(ref, ref.getCode() + " - " + ref.getReason());
if (ref.isExempt()) {
this.exemptReasons.add(selectItem);
} else {
this.noExemptReasons.add(selectItem);
}
}
}
Aggregations