use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class BillBean method getProjects.
/**
* Get the list of all projects
*
* @return the list of all projects
*/
public List<SelectItem> getProjects() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
List<Project> refs = ProjectManager.getDefault().getAllEntities(null, new SortCriteria("name"));
for (Project 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 CreditTitleBean method getBillss.
/**
* Get the list of all billss
* @return the list of all billss
*/
public List<SelectItem> getBillss() {
List<Bill> refs = BillManager.getDefault().getAllEntities(null, new SortCriteria("name"));
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
for (Bill 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 CreditTitleBean method getOrganizations.
// Getters to list possible values of related entities
/**
* 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;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class AccountEntryBean method getAll.
/**
* List accountEntrys. Order depends on Faces parameter sort.
*
* @return the list of all accountEntrys sorted by requested criterion
*/
public List<AccountEntry> getAll() {
if (year == ALL_YEARS) {
search.unsetYear();
} else {
search.setYear(year);
}
search.setHideInitialEntry(hideInitialEntry);
if (accountSelected != ALL_ACCOUNTS) {
search.setAccount(AccountManager.getDefault().getEntityById(accountSelected));
} else {
search.unsetAccount();
}
List<AccountEntry> res = manager.getAllEntities(search, new SortCriteria(sortColumn, sortAscending));
calcTotals(res);
return res;
}
use of com.autentia.tnt.dao.SortCriteria in project TNTConcept by autentia.
the class AccountEntryBean method getAllAccounts.
public List<SelectItem> getAllAccounts() {
FacesContext context = FacesContext.getCurrentInstance();
Locale locale = context.getViewRoot().getLocale();
ResourceBundle bundle = ResourceBundle.getBundle("com.autentia.tnt.resources.messages", locale);
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
ret.add(new SelectItem(Integer.valueOf(ALL_ACCOUNTS), bundle.getString("accountEntry.allaccounts")));
List<Account> refs = AccountManager.getDefault().getAllEntities(null, new SortCriteria("name"));
for (Account ref : refs) {
ret.add(new SelectItem(ref.getId(), ref.getName()));
}
return ret;
}
Aggregations