001: /*
002: * Copyright 2006-2007 The Kuali Foundation.
003: *
004: * Licensed under the Educational Community License, Version 1.0 (the "License");
005: * you may not use this file except in compliance with the License.
006: * You may obtain a copy of the License at
007: *
008: * http://www.opensource.org/licenses/ecl1.php
009: *
010: * Unless required by applicable law or agreed to in writing, software
011: * distributed under the License is distributed on an "AS IS" BASIS,
012: * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
013: * See the License for the specific language governing permissions and
014: * limitations under the License.
015: */
016: package org.kuali.module.purap.bo;
017:
018: import java.util.LinkedHashMap;
019:
020: import org.kuali.core.bo.PersistableBusinessObjectBase;
021: import org.kuali.kfs.KFSPropertyConstants;
022: import org.kuali.module.purap.document.AssignContractManagerDocument;
023: import org.kuali.module.purap.document.RequisitionDocument;
024: import org.kuali.module.vendor.bo.ContractManager;
025:
026: /**
027: * Assign Contract Manager Detail Business Object. Defines attributes in Assign Contract Manager tab.
028: */
029: public class AssignContractManagerDetail extends
030: PersistableBusinessObjectBase {
031:
032: private String documentNumber;
033: private Integer requisitionIdentifier;
034: private Integer contractManagerCode;
035:
036: private RequisitionDocument requisition;
037: private ContractManager contractManager;
038: private AssignContractManagerDocument assignContractManagerDocument;
039:
040: /**
041: * Default constructor.
042: */
043: public AssignContractManagerDetail() {
044:
045: }
046:
047: /**
048: * Constructs a AssignContractManagerDetail object from an existing AssignContractManagerDocument object.
049: *
050: * @param acmDocument the AssignContractManagerDocument to copy from.
051: * @param requisitionDocument reference to the related requisition document.
052: */
053: public AssignContractManagerDetail(
054: AssignContractManagerDocument acmDocument,
055: RequisitionDocument requisitionDocument) {
056: this .documentNumber = acmDocument.getDocumentNumber();
057: this .assignContractManagerDocument = acmDocument;
058: this .requisition = requisitionDocument;
059: this .requisitionIdentifier = requisitionDocument
060: .getPurapDocumentIdentifier();
061: }
062:
063: public String getDocumentNumber() {
064: return documentNumber;
065: }
066:
067: public void setDocumentNumber(String documentNumber) {
068: this .documentNumber = documentNumber;
069: }
070:
071: public Integer getRequisitionIdentifier() {
072: return requisitionIdentifier;
073: }
074:
075: public void setRequisitionIdentifier(Integer requisitionIdentifier) {
076: this .requisitionIdentifier = requisitionIdentifier;
077: }
078:
079: public Integer getContractManagerCode() {
080: return contractManagerCode;
081: }
082:
083: public void setContractManagerCode(Integer contractManagerCode) {
084: this .contractManagerCode = contractManagerCode;
085: }
086:
087: public ContractManager getContractManager() {
088: return contractManager;
089: }
090:
091: /**
092: * @deprecated
093: */
094: public void setContractManager(ContractManager contractManager) {
095: this .contractManager = contractManager;
096: }
097:
098: public RequisitionDocument getRequisition() {
099: return requisition;
100: }
101:
102: /**
103: * @deprecated
104: */
105: public void setRequisition(RequisitionDocument requisition) {
106: this .requisition = requisition;
107: }
108:
109: public AssignContractManagerDocument getAssignContractManagerDocument() {
110: return assignContractManagerDocument;
111: }
112:
113: public void setAssignContractManagerDocument(
114: AssignContractManagerDocument assignContractManagerDocument) {
115: this .assignContractManagerDocument = assignContractManagerDocument;
116: }
117:
118: /**
119: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
120: */
121: protected LinkedHashMap toStringMapper() {
122: LinkedHashMap m = new LinkedHashMap();
123: m
124: .put(KFSPropertyConstants.DOCUMENT_NUMBER,
125: this .documentNumber);
126: if (this .requisitionIdentifier != null) {
127: m.put("requisitionIdentifier", this.requisitionIdentifier
128: .toString());
129: }
130: return m;
131: }
132: }
|