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: package org.kuali.module.labor.util.testobject;
17:
18: import java.util.ArrayList;
19: import java.util.List;
20: import java.util.Map;
21:
22: import org.kuali.kfs.KFSPropertyConstants;
23: import org.kuali.module.labor.LaborConstants;
24: import org.kuali.module.labor.bo.LaborGeneralLedgerEntry;
25: import org.kuali.module.labor.util.ObjectUtil;
26:
27: public class LaborGeneralLedgerEntryForTesting extends
28: LaborGeneralLedgerEntry {
29:
30: @Override
31: public boolean equals(Object otherEntry) {
32: return ObjectUtil.compareObject(this , otherEntry,
33: LaborConstants.consolidationAttributesOfOriginEntry());
34: }
35:
36: public Map getPrimaryKeyMap() {
37: return ObjectUtil.buildPropertyMap(this , this
38: .getPrimaryKeyList());
39: }
40:
41: public List<String> getPrimaryKeyList() {
42: List<String> primaryKeyList = new ArrayList<String>();
43: primaryKeyList.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
44: primaryKeyList.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
45: primaryKeyList.add(KFSPropertyConstants.ACCOUNT_NUMBER);
46: primaryKeyList.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
47: primaryKeyList.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
48: primaryKeyList
49: .add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
50: primaryKeyList
51: .add(KFSPropertyConstants.FINANCIAL_BALANCE_TYPE_CODE);
52: primaryKeyList
53: .add(KFSPropertyConstants.FINANCIAL_OBJECT_TYPE_CODE);
54: primaryKeyList
55: .add(KFSPropertyConstants.UNIVERSITY_FISCAL_PERIOD_CODE);
56: primaryKeyList
57: .add(KFSPropertyConstants.FINANCIAL_DOCUMENT_TYPE_CODE);
58: primaryKeyList
59: .add(KFSPropertyConstants.FINANCIAL_SYSTEM_ORIGINATION_CODE);
60: primaryKeyList.add(KFSPropertyConstants.DOCUMENT_NUMBER);
61: primaryKeyList
62: .add(KFSPropertyConstants.TRANSACTION_ENTRY_SEQUENCE_NUMBER);
63: return primaryKeyList;
64: }
65: }
|