/*
 * Copyright 2006 The Kuali Foundation.
 * 
 * Licensed under the Educational Community License, Version 1.0 (the "License");
 * you may not use this file except in compliance with the License.
 * You may obtain a copy of the License at
 * 
 * http://www.opensource.org/licenses/ecl1.php
 * 
 * Unless required by applicable law or agreed to in writing, software
 * distributed under the License is distributed on an "AS IS" BASIS,
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 * See the License for the specific language governing permissions and
 * limitations under the License.
 */
package org.kuali.module.chart.dao.ojb;

import java.util.Collection;

import org.apache.ojb.broker.query.Criteria;
import org.apache.ojb.broker.query.QueryByCriteria;
import org.apache.ojb.broker.query.QueryFactory;
import org.kuali.core.dao.ojb.PlatformAwareDaoBaseOjb;
import org.kuali.module.chart.bo.IcrAutomatedEntry;
import org.kuali.module.chart.dao.IcrAutomatedEntryDao;

public class IcrAutomatedEntryDaoOjb extends PlatformAwareDaoBaseOjb implements IcrAutomatedEntryDao {
    private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(IcrAutomatedEntryDaoOjb.class);

    public Collection getEntriesBySeries(Integer universityFiscalYear, String financialIcrSeriesIdentifier, String balanceTypeCode) {
        LOG.debug("getEntriesBySeries() started");

        Criteria crit = new Criteria();
        crit.addEqualTo("universityFiscalYear", universityFiscalYear);
        crit.addEqualTo("financialIcrSeriesIdentifier", financialIcrSeriesIdentifier);
        crit.addEqualTo("balanceTypeCode", balanceTypeCode);

        QueryByCriteria qbc = QueryFactory.newQuery(IcrAutomatedEntry.class, crit);
        qbc.addOrderByAscending("awardIndrCostRcvyEntryNbr");

        return getPersistenceBrokerTemplate().getCollectionByQuery(qbc);
    }
}

@@ -885,16 +885,59 @@
 aseOjb;%0A
+import org.kuali.kfs.KFSPropertyConstants;%0A
 import o
@@ -1510,30 +1510,51 @@
 lTo(
-%22universityFiscalYear%22
+KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR
 , un
@@ -1602,38 +1602,60 @@
 lTo(
-%22financialIcrSeriesIdentifier%22
+KFSPropertyConstants.FINANCIAL_ICR_SERIES_IDENTIFIER
 , fi
@@ -1711,25 +1711,46 @@
 lTo(
-%22balanceTypeCode%22
+KFSPropertyConstants.BALANCE_TYPE_CODE
 , ba
@@ -1886,35 +1886,59 @@
 ing(
-%22awardIndr
+KFSProperty
 Co
+n
 st
-RcvyEntryNbr%22
+ants.AWARD_INDR_COST_RCVY_ENTRY_NBR
 );%0A%0A

Use property constants