01: /*
02: * Copyright 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: /*
17: * Created on Aug 19, 2004
18: */
19: package org.kuali.module.pdp.dao.ojb;
20:
21: import org.apache.ojb.broker.query.Criteria;
22: import org.apache.ojb.broker.query.QueryByCriteria;
23: import org.kuali.core.dao.ojb.PlatformAwareDaoBaseOjb;
24: import org.kuali.module.pdp.bo.AchAccountNumber;
25: import org.kuali.module.pdp.dao.AchAccountNumberDao;
26:
27: /**
28: * @author HSTAPLET
29: */
30: public class AchAccountNumberDaoOjb extends PlatformAwareDaoBaseOjb
31: implements AchAccountNumberDao {
32: private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger
33: .getLogger(AchAccountNumberDaoOjb.class);
34:
35: public AchAccountNumber get(Integer id) {
36: LOG.debug("get(id) started");
37:
38: Criteria criteria = new Criteria();
39: criteria.addEqualTo("id", id);
40:
41: return (AchAccountNumber) getPersistenceBrokerTemplate()
42: .getObjectByQuery(
43: new QueryByCriteria(AchAccountNumber.class,
44: criteria));
45: }
46:
47: public void delete(AchAccountNumber achAccountNumber) {
48: LOG.debug("delete() enter method");
49: getPersistenceBrokerTemplate().delete(achAccountNumber);
50: }
51: }
|