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.bo.LedgerBalance;
24: import org.kuali.module.labor.util.ObjectUtil;
25:
26: public class LedgerBalanceForTesting extends LedgerBalance {
27:
28: @Override
29: public boolean equals(Object otherLedgerBalance) {
30: return ObjectUtil.compareObject(this , otherLedgerBalance,
31: getPrimaryKeyList());
32: }
33:
34: public Map getPrimaryKeyMap() {
35: return ObjectUtil.buildPropertyMap(this , this
36: .getPrimaryKeyList());
37: }
38:
39: public List<String> getPrimaryKeyList() {
40: List<String> primaryKeyList = new ArrayList<String>();
41: primaryKeyList.add(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR);
42: primaryKeyList.add(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE);
43: primaryKeyList.add(KFSPropertyConstants.ACCOUNT_NUMBER);
44: primaryKeyList.add(KFSPropertyConstants.SUB_ACCOUNT_NUMBER);
45: primaryKeyList.add(KFSPropertyConstants.FINANCIAL_OBJECT_CODE);
46: primaryKeyList
47: .add(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE);
48: primaryKeyList
49: .add(KFSPropertyConstants.FINANCIAL_BALANCE_TYPE_CODE);
50: primaryKeyList
51: .add(KFSPropertyConstants.FINANCIAL_OBJECT_TYPE_CODE);
52: primaryKeyList.add(KFSPropertyConstants.POSITION_NUMBER);
53: primaryKeyList.add(KFSPropertyConstants.EMPLID);
54: return primaryKeyList;
55: }
56: }
|