Search in sources :

Example 1 with AgencyOrigin

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

the class AgencyOriginValuesFinder method getKeyValues.

@Override
public List<KeyValue> getKeyValues() {
    Collection<AgencyOrigin> agencyOrigins = keyValuesService.findAllOrderBy(AgencyOrigin.class, KFSPropertyConstants.CODE, false);
    List<KeyValue> keyValues = new ArrayList<>();
    keyValues.add(new ConcreteKeyValue(KFSConstants.EMPTY_STRING, KFSConstants.EMPTY_STRING));
    agencyOrigins.stream().map(agencyOrigin -> new ConcreteKeyValue(agencyOrigin.getCode(), agencyOrigin.getName())).forEach(keyValues::add);
    return keyValues;
}
Also used : ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) List(java.util.List) KeyValue(org.kuali.kfs.core.api.util.KeyValue) KeyValuesBase(org.kuali.kfs.krad.keyvalues.KeyValuesBase) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) Collection(java.util.Collection) KFSPropertyConstants(org.kuali.kfs.sys.KFSPropertyConstants) AgencyOrigin(edu.cornell.kfs.module.cg.businessobject.AgencyOrigin) KFSConstants(org.kuali.kfs.sys.KFSConstants) KeyValuesService(org.kuali.kfs.krad.service.KeyValuesService) ArrayList(java.util.ArrayList) KeyValue(org.kuali.kfs.core.api.util.KeyValue) ConcreteKeyValue(org.kuali.kfs.core.api.util.ConcreteKeyValue) AgencyOrigin(edu.cornell.kfs.module.cg.businessobject.AgencyOrigin) ArrayList(java.util.ArrayList)

Aggregations

AgencyOrigin (edu.cornell.kfs.module.cg.businessobject.AgencyOrigin)1 ArrayList (java.util.ArrayList)1 Collection (java.util.Collection)1 List (java.util.List)1 ConcreteKeyValue (org.kuali.kfs.core.api.util.ConcreteKeyValue)1 KeyValue (org.kuali.kfs.core.api.util.KeyValue)1 KeyValuesBase (org.kuali.kfs.krad.keyvalues.KeyValuesBase)1 KeyValuesService (org.kuali.kfs.krad.service.KeyValuesService)1 KFSConstants (org.kuali.kfs.sys.KFSConstants)1 KFSPropertyConstants (org.kuali.kfs.sys.KFSPropertyConstants)1