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.core.document;
17:
18: import java.util.LinkedHashMap;
19:
20: import org.kuali.RicePropertyConstants;
21: import org.kuali.core.bo.PersistableBusinessObjectBase;
22:
23: /**
24: * List of business objects that this maintenance document is locking (prevents two documents from being routed trying to update the same object)
25: * Most maintenance documents have only one lock, but globals have many
26: */
27: public class MaintenanceLock extends PersistableBusinessObjectBase {
28: private String lockingRepresentation;
29: private String documentNumber;
30:
31: public String getLockingRepresentation() {
32: return lockingRepresentation;
33: }
34:
35: public void setLockingRepresentation(String lockingRepresentation) {
36: this .lockingRepresentation = lockingRepresentation;
37: }
38:
39: public String getDocumentNumber() {
40: return documentNumber;
41: }
42:
43: public void setDocumentNumber(String documentNumber) {
44: this .documentNumber = documentNumber;
45: }
46:
47: /**
48: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
49: */
50: protected LinkedHashMap toStringMapper() {
51: LinkedHashMap m = new LinkedHashMap();
52: m.put("lockingRepresentation", this.lockingRepresentation);
53: m.put(RicePropertyConstants.DOCUMENT_NUMBER,
54: getDocumentNumber());
55: return m;
56: }
57: }
|