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.LaborPropertyConstants;
24: import org.kuali.module.labor.bo.LaborOriginEntry;
25: import org.kuali.module.labor.util.ObjectUtil;
26:
27: /**
28: * This class...
29: */
30: public class LaborOriginEntryForTesting extends LaborOriginEntry {
31: private List<String> keyValueList;
32:
33: @Override
34: public boolean equals(Object otherOriginEntry) {
35: return ObjectUtil.compareObject(this , otherOriginEntry, this
36: .getKeyValueList());
37: }
38:
39: public Map getKeyValueMap() {
40: return ObjectUtil
41: .buildPropertyMap(this , this .getKeyValueList());
42: }
43:
44: public List<String> getDefaultKeyValueList() {
45: List<String> keyValueList = new ArrayList<String>();
46: keyValueList.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
47: keyValueList.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
48: keyValueList.add(KFSPropertyConstants.ACCOUNT_NUMBER);
49: keyValueList.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
50:
51: keyValueList.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
52: keyValueList
53: .add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
54: keyValueList
55: .add(KFSPropertyConstants.FINANCIAL_BALANCE_TYPE_CODE);
56: keyValueList
57: .add(KFSPropertyConstants.FINANCIAL_OBJECT_TYPE_CODE);
58:
59: keyValueList
60: .add(KFSPropertyConstants.UNIVERSITY_FISCAL_PERIOD_CODE);
61: keyValueList
62: .add(KFSPropertyConstants.FINANCIAL_DOCUMENT_TYPE_CODE);
63: keyValueList
64: .add(KFSPropertyConstants.FINANCIAL_SYSTEM_ORIGINATION_CODE);
65: keyValueList.add(KFSPropertyConstants.DOCUMENT_NUMBER);
66: keyValueList
67: .add(KFSPropertyConstants.TRANSACTION_ENTRY_SEQUENCE_NUMBER);
68:
69: keyValueList
70: .add(KFSPropertyConstants.TRANSACTION_DEBIT_CREDIT_CODE);
71: keyValueList
72: .add(KFSPropertyConstants.TRANSACTION_LEDGER_ENTRY_AMOUNT);
73: keyValueList.add(KFSPropertyConstants.POSITION_NUMBER);
74: keyValueList.add(LaborPropertyConstants.RUN_IDENTIFIER);
75: keyValueList.add(KFSPropertyConstants.EMPLID);
76: return keyValueList;
77: }
78:
79: /**
80: * Gets the keyValueList attribute.
81: *
82: * @return Returns the keyValueList.
83: */
84: public List<String> getKeyValueList() {
85: if (keyValueList == null) {
86: keyValueList = this .getDefaultKeyValueList();
87: }
88: return keyValueList;
89: }
90:
91: /**
92: * Sets the keyValueList attribute value.
93: *
94: * @param keyValueList The keyValueList to set.
95: */
96: public void setKeyValueList(List<String> keyValueList) {
97: this.keyValueList = keyValueList;
98: }
99: }
|