use of com.autentia.tnt.businessobject.Account 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;
}
use of com.autentia.tnt.businessobject.Account in project TNTConcept by autentia.
the class PeriodicalAccountEntryBean 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;
}
use of com.autentia.tnt.businessobject.Account in project TNTConcept by autentia.
the class PeriodicalAccountEntryBean method getAccounts.
// Getters to list possible values of related entities
/**
* Get the list of all accounts
* @return the list of all accounts
*/
public List<SelectItem> getAccounts() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
List<Account> refs = AccountManager.getDefault().getAllEntities(null, new SortCriteria("name"));
for (Account ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Account in project TNTConcept by autentia.
the class AccountEntryBean method getAccounts.
// Getters to list possible values of related (one-to-one or many-to-many)
// entities
/**
* Get the list of all accounts
*
* @return the list of all accounts
*/
public List<SelectItem> getAccounts() {
ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
List<Account> refs = AccountManager.getDefault().getAllEntities(null, new SortCriteria("name"));
for (Account ref : refs) {
ret.add(new SelectItem(ref, ref.getName()));
}
return ret;
}
use of com.autentia.tnt.businessobject.Account in project TNTConcept by autentia.
the class ReportBean method getAccounts.
public ArrayList<SelectItem> getAccounts() {
final ArrayList<SelectItem> reto = new ArrayList<SelectItem>();
final List<Account> refs = accountDAO.search(new SortCriteria("name"));
for (Account ref : refs) {
reto.add(new SelectItem(ref.getId().toString(), ref.getName()));
}
return reto;
}
Aggregations