01: /*
02: * Copyright 2006-2007 The Kuali Foundation.
03: *
04: * Licensed under the Educational Community License, Version 1.0 (the "License");
05: * you may not use this file except in compliance with the License.
06: * You may obtain a copy of the License at
07: *
08: * http://www.opensource.org/licenses/ecl1.php
09: *
10: * Unless required by applicable law or agreed to in writing, software
11: * distributed under the License is distributed on an "AS IS" BASIS,
12: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13: * See the License for the specific language governing permissions and
14: * limitations under the License.
15: */
16: package org.kuali.module.chart.dao.ojb;
17:
18: import java.util.Collection;
19:
20: import org.apache.ojb.broker.query.Criteria;
21: import org.apache.ojb.broker.query.Query;
22: import org.apache.ojb.broker.query.QueryFactory;
23: import org.kuali.core.dao.ojb.PlatformAwareDaoBaseOjb;
24: import org.kuali.module.chart.bo.codes.BalanceTyp;
25: import org.kuali.module.chart.dao.BalanceTypeDao;
26:
27: /**
28: * This class implements the {@link BalanceTypeDao} data access methods using Ojb
29: */
30: public class BalanceTypeDaoOjb extends PlatformAwareDaoBaseOjb
31: implements BalanceTypeDao {
32: private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
33: .getLogger(BalanceTypeDaoOjb.class);
34:
35: /**
36: * @see org.kuali.module.chart.dao.BalanceTypeDao#getEncumbranceBalanceTypes()
37: * @return a list of {@link BalanceTyp} that hare tied to encumbrances
38: */
39: public Collection getEncumbranceBalanceTypes() {
40: LOG.debug("getEncumbranceBalanceTypes() started");
41:
42: Criteria criteria = new Criteria();
43: criteria.addEqualTo("finBalanceTypeEncumIndicator", true);
44:
45: Query q = QueryFactory.newQuery(BalanceTyp.class, criteria);
46: return getPersistenceBrokerTemplate().getCollectionByQuery(q);
47: }
48: }
|