Search in sources :

Example 1 with FinancialRatio

use of com.autentia.tnt.businessobject.FinancialRatio in project TNTConcept by autentia.

the class FinancialRatioBean method getFinancialRatios.

/**
 * Get the list of all Financial Ratios
 * @return the list of all Financial Ratios
 */
public List<SelectItem> getFinancialRatios() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    if (this.getId() != null) {
        search.setDifferentId(this.getId());
    }
    List<FinancialRatio> refs = manager.getAllEntities(search, new SortCriteria(sortColumn, sortAscending));
    for (FinancialRatio ref : refs) {
        ret.add(new SelectItem(ref, ref.getTitle()));
    }
    search.unsetDifferentId();
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) FinancialRatio(com.autentia.tnt.businessobject.FinancialRatio)

Example 2 with FinancialRatio

use of com.autentia.tnt.businessobject.FinancialRatio in project TNTConcept by autentia.

the class FinancialRatioBean method getFinancialRatiosWithNull.

/**
 * Get the list of all Financial Ratios
 * @return the list of all Financial Ratios
 */
public List<SelectItem> getFinancialRatiosWithNull() {
    ArrayList<SelectItem> ret = new ArrayList<SelectItem>();
    if (this.getId() != null) {
        search.setDifferentId(this.getId());
    }
    List<FinancialRatio> refs = manager.getAllEntities(search, new SortCriteria(sortColumn, sortAscending));
    for (FinancialRatio ref : refs) {
        ret.add(new SelectItem(ref, ref.getTitle()));
    }
    ret.add(0, new SelectItem("-- NINGUNO --"));
    search.unsetDifferentId();
    return ret;
}
Also used : SortCriteria(com.autentia.tnt.dao.SortCriteria) SelectItem(javax.faces.model.SelectItem) ArrayList(java.util.ArrayList) FinancialRatio(com.autentia.tnt.businessobject.FinancialRatio)

Aggregations

FinancialRatio (com.autentia.tnt.businessobject.FinancialRatio)2 SortCriteria (com.autentia.tnt.dao.SortCriteria)2 ArrayList (java.util.ArrayList)2 SelectItem (javax.faces.model.SelectItem)2