1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16 package org.kuali.ole.gl.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.gl.businessobject.OriginEntrySource;
24 import org.kuali.ole.gl.dataaccess.OriginEntrySourceDao;
25 import org.kuali.rice.core.framework.persistence.ojb.dao.PlatformAwareDaoBaseOjb;
26
27
28
29
30 public class OriginEntrySourceDaoOjb extends PlatformAwareDaoBaseOjb implements OriginEntrySourceDao {
31
32 private static final String FINANCIAL_DOCUMENT_REVERSAL_DATE = "financialDocumentReversalDate";
33 private static final String UNIVERSITY_FISCAL_YEAR = "universityFiscalYear";
34 private static final String CHART_OF_ACCOUNTS_CODE = "chartOfAccountsCode";
35 private static final String ACCOUNT_NUMBER = "accountNumber";
36 private static final String SUB_ACCOUNT_NUMBER = "subAccountNumber";
37 private static final String FINANCIAL_OBJECT_CODE = "financialObjectCode";
38 private static final String FINANCIAL_SUB_OBJECT_CODE = "financialSubObjectCode";
39 private static final String FINANCIAL_BALANCE_TYPE_CODE = "financialBalanceTypeCode";
40 private static final String FINANCIAL_OBJECT_TYPE_CODE = "financialObjectTypeCode";
41 private static final String UNIVERSITY_FISCAL_PERIOD_CODE = "universityFiscalPeriodCode";
42 private static final String FINANCIAL_DOCUMENT_TYPE_CODE = "financialDocumentTypeCode";
43 private static final String FINANCIAL_SYSTEM_ORIGINATION_CODE = "financialSystemOriginationCode";
44 private static final String TRANSACTION_LEDGER_ENTRY_SEQUENCE_NUMBER = "transactionLedgerEntrySequenceNumber";
45
46
47
48
49 public OriginEntrySourceDaoOjb() {
50 super();
51 }
52
53
54
55
56
57
58
59 public Collection findAll() {
60 QueryByCriteria query = QueryFactory.newQuery(OriginEntrySource.class, (Criteria) null);
61
62 Collection thawed = getPersistenceBrokerTemplate().getCollectionByQuery(query);
63
64 return thawed;
65 }
66
67
68
69
70
71
72
73
74 public OriginEntrySource findBySourceCode(String code) {
75 Criteria criteria = new Criteria();
76 criteria.addEqualTo("code", code);
77 QueryByCriteria query = QueryFactory.newQuery(OriginEntrySource.class, criteria);
78 return (OriginEntrySource) getPersistenceBrokerTemplate().getObjectByQuery(query);
79 }
80
81 }