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.LaborLedgerPendingEntry;
24: import org.kuali.module.labor.util.ObjectUtil;
25:
26: public class PendingLedgerEntryForTesting extends
27: LaborLedgerPendingEntry {
28:
29: @Override
30: public boolean equals(Object otherPendingLedgerEntry) {
31: return ObjectUtil.compareObject(this , otherPendingLedgerEntry,
32: getPrimaryKeyList());
33: }
34:
35: public Map getPrimaryKeyMap() {
36: return ObjectUtil.buildPropertyMap(this , this
37: .getPrimaryKeyList());
38: }
39:
40: public List<String> getPrimaryKeyList() {
41: List<String> primaryKeyList = new ArrayList<String>();
42: primaryKeyList
43: .add(KFSPropertyConstants.FINANCIAL_SYSTEM_ORIGINATION_CODE);
44: primaryKeyList.add(KFSPropertyConstants.DOCUMENT_NUMBER);
45: primaryKeyList
46: .add(KFSPropertyConstants.TRANSACTION_ENTRY_SEQUENCE_NUMBER);
47: return primaryKeyList;
48: }
49: }
|