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 org.apache.ojb.broker.query.Criteria;
19 import org.apache.ojb.broker.query.QueryByCriteria;
20 import org.apache.ojb.broker.query.QueryFactory;
21 import org.kuali.ole.coa.businessobject.A21SubAccount;
22 import org.kuali.ole.coa.dataaccess.A21SubAccountDao;
23 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
24
25
26
27
28 public class A21SubAccountDaoOjb extends PlatformAwareDaoBaseOjb implements A21SubAccountDao {
29 private static org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(A21SubAccountDaoOjb.class);
30
31 public A21SubAccountDaoOjb() {
32 super();
33 }
34
35
36
37
38 public A21SubAccount getByPrimaryKey(String chartOfAccountsCode, String accountNumber, String subAccountNumber) {
39 LOG.debug("getByPrimaryKey() started");
40
41 Criteria crit = new Criteria();
42 crit.addEqualTo("chartOfAccountsCode", chartOfAccountsCode);
43 crit.addEqualTo("accountNumber", accountNumber);
44 crit.addEqualTo("subAccountNumber", subAccountNumber);
45
46 QueryByCriteria qbc = QueryFactory.newQuery(A21SubAccount.class, crit);
47 return (A21SubAccount) getPersistenceBrokerTemplate().getObjectByQuery(qbc);
48 }
49 }