View Javadoc

1   package org.kuali.ole.patron.keyvalue;
2   
3   import org.kuali.ole.patron.bill.OleFeeType;
4   import org.kuali.ole.patron.bill.OlePaymentStatus;
5   import org.kuali.rice.core.api.util.ConcreteKeyValue;
6   import org.kuali.rice.core.api.util.KeyValue;
7   import org.kuali.rice.krad.keyvalues.KeyValuesBase;
8   import org.kuali.rice.krad.service.KRADServiceLocator;
9   
10  import java.util.ArrayList;
11  import java.util.Collection;
12  import java.util.List;
13  
14  /**
15   * Created with IntelliJ IDEA.
16   * User: ?
17   * Date: 10/11/12
18   * Time: 3:32 PM
19   * To change this template use File | Settings | File Templates.
20   */
21  public class OlePaymentStatusKeyValues extends KeyValuesBase {
22  
23      @Override
24      public List getKeyValues() {
25          List<KeyValue> keyValues = new ArrayList<KeyValue>();
26          Collection<OlePaymentStatus> olePaymentStatus = KRADServiceLocator.getBusinessObjectService().findAll(OlePaymentStatus.class);
27          keyValues.add(new ConcreteKeyValue("", ""));
28          for (OlePaymentStatus paymentStatus : olePaymentStatus) {
29              keyValues.add(new ConcreteKeyValue(paymentStatus.getPaymentStatusId(),paymentStatus.getPaymentStatusName()));
30          }
31          return keyValues;
32      }
33  }