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.kra.routingform.bo;
017:
018: import java.util.LinkedHashMap;
019:
020: import org.kuali.core.bo.PersistableBusinessObjectBase;
021:
022: public class RoutingFormPurpose extends PersistableBusinessObjectBase {
023:
024: private String documentNumber;
025: private String purposeCode;
026:
027: private Purpose purpose;
028:
029: /**
030: * Default constructor.
031: */
032: public RoutingFormPurpose() {
033:
034: }
035:
036: /**
037: * Constructs a RoutingFormPurpose.
038: *
039: * @param documentNumber
040: * @param purpose
041: */
042: public RoutingFormPurpose(String documentNumber, Purpose purpose) {
043: this ();
044: this .documentNumber = documentNumber;
045: this .purposeCode = purpose.getPurposeCode();
046: this .purpose = purpose;
047: }
048:
049: /**
050: * Gets the documentNumber attribute.
051: *
052: * @return Returns the documentNumber
053: */
054: public String getDocumentNumber() {
055: return documentNumber;
056: }
057:
058: /**
059: * Sets the documentNumber attribute.
060: *
061: * @param documentNumber The documentNumber to set.
062: */
063: public void setDocumentNumber(String documentNumber) {
064: this .documentNumber = documentNumber;
065: }
066:
067: /**
068: * Gets the purposeCode attribute.
069: *
070: * @return Returns the purposeCode
071: */
072: public String getPurposeCode() {
073: return purposeCode;
074: }
075:
076: /**
077: * Sets the purposeCode attribute.
078: *
079: * @param purposeCode The purposeCode to set.
080: */
081: public void setPurposeCode(String purposeCode) {
082: this .purposeCode = purposeCode;
083: }
084:
085: /**
086: * Gets the purpose attribute.
087: *
088: * @return Returns the purpose
089: */
090: public Purpose getPurpose() {
091: return purpose;
092: }
093:
094: /**
095: * Sets the purpose attribute.
096: *
097: * @param purpose The purpose to set.
098: */
099: public void setPurpose(Purpose purpose) {
100: this .purpose = purpose;
101: }
102:
103: /**
104: * @see org.kuali.core.bo.BusinessObjectBase#toStringMapper()
105: */
106: protected LinkedHashMap toStringMapper() {
107: LinkedHashMap m = new LinkedHashMap();
108: m.put("documentNumber", this .documentNumber);
109: m.put("purposeCode", this.purposeCode);
110: return m;
111: }
112: }
|