1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.coa.dataaccess.impl;
17
18 import java.util.Collection;
19
20 import org.apache.ojb.broker.query.Criteria;
21 import org.apache.ojb.broker.query.QueryByCriteria;
22 import org.apache.ojb.broker.query.QueryFactory;
23 import org.kuali.ole.coa.businessobject.IndirectCostRecoveryRateDetail;
24 import org.kuali.ole.coa.dataaccess.IndirectCostRecoveryRateDetailDao;
25 import org.kuali.ole.sys.OLEPropertyConstants;
26 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
27
28
29
30
31 public class IndirectCostRecoveryRateDetailDaoOjb extends PlatformAwareDaoBaseOjb implements IndirectCostRecoveryRateDetailDao {
32 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(IndirectCostRecoveryRateDetailDaoOjb.class);
33
34
35
36
37
38 public Collection<IndirectCostRecoveryRateDetail> getActiveRateDetailsByRate(Integer universityFiscalYear, String financialIcrSeriesIdentifier) {
39 LOG.debug("getEntriesBySeries() started");
40
41 Criteria crit = new Criteria();
42 crit.addEqualTo(OLEPropertyConstants.UNIVERSITY_FISCAL_YEAR, universityFiscalYear);
43 crit.addEqualTo(OLEPropertyConstants.FINANCIAL_ICR_SERIES_IDENTIFIER, financialIcrSeriesIdentifier);
44 crit.addEqualTo(OLEPropertyConstants.ACTIVE, Boolean.TRUE);
45
46 QueryByCriteria qbc = QueryFactory.newQuery(IndirectCostRecoveryRateDetail.class, crit);
47 qbc.addOrderByAscending(OLEPropertyConstants.AWARD_INDR_COST_RCVY_ENTRY_NBR);
48
49 return getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
50 }
51 }