Search in sources :

Example 1 with InvoiceFrequency

use of edu.cornell.kfs.module.cg.businessobject.InvoiceFrequency in project cu-kfs by CU-CommunityApps.

the class InvoiceFrequencyValuesFinder method getKeyValues.

public List<KeyValue> getKeyValues() {
    KeyValuesService boService = SpringContext.getBean(KeyValuesService.class);
    Collection<InvoiceFrequency> invoiceFrequencyCodes = boService.findAll(InvoiceFrequency.class);
    List<KeyValue> invoiceFrequencyKeyLabels = new ArrayList<KeyValue>();
    for (Iterator<InvoiceFrequency> iter = invoiceFrequencyCodes.iterator(); iter.hasNext(); ) {
        InvoiceFrequency element = (InvoiceFrequency) iter.next();
        if (element.isActive()) {
            // only show active invoice types
            invoiceFrequencyKeyLabels.add(new ConcreteKeyValue(element.getInvoiceFrequencyCode(), element.getInvoiceFrequencyCode()));
        }
    }
    return invoiceFrequencyKeyLabels;
}
Also used : KeyValuesService(org.kuali.kfs.krad.service.KeyValuesService) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) KeyValue(org.kuali.rice.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.rice.core.api.util.ConcreteKeyValue) InvoiceFrequency(edu.cornell.kfs.module.cg.businessobject.InvoiceFrequency) ArrayList(java.util.ArrayList)

Aggregations

InvoiceFrequency (edu.cornell.kfs.module.cg.businessobject.InvoiceFrequency)1 ArrayList (java.util.ArrayList)1 KeyValuesService (org.kuali.kfs.krad.service.KeyValuesService)1 ConcreteKeyValue (org.kuali.rice.core.api.util.ConcreteKeyValue)1 KeyValue (org.kuali.rice.core.api.util.KeyValue)1