001: /*
002: * Copyright 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.cg.bo;
017:
018: import java.util.LinkedHashMap;
019:
020: import org.kuali.core.bo.PersistableBusinessObjectBase;
021: import org.kuali.module.kra.routingform.bo.ResearchRiskType;
022:
023: /**
024: * Represents a relationship between a {@link Proposal} and a {@link ResearchRisk}.
025: */
026: public class ProposalResearchRisk extends PersistableBusinessObjectBase {
027:
028: private String researchRiskTypeCode;
029: private Long proposalNumber;
030: private boolean researchRiskTypeIndicator;
031:
032: private Proposal proposal;
033: private ResearchRiskType researchRiskType;
034:
035: /**
036: * Default constructor.
037: */
038: public ProposalResearchRisk() {
039: super ();
040: }
041:
042: @Override
043: protected LinkedHashMap toStringMapper() {
044:
045: LinkedHashMap m = new LinkedHashMap();
046: m.put("proposalNumber", proposalNumber);
047: m.put("researchRiskTypeCode", researchRiskTypeCode);
048: m.put("researchRiskTypeIndicator", Boolean
049: .toString(researchRiskTypeIndicator));
050:
051: return m;
052: }
053:
054: /**
055: * Gets the {@link Proposal}.
056: *
057: * @return
058: */
059: public Proposal getProposal() {
060: return proposal;
061: }
062:
063: /**
064: * Sets the {@link Proposal}.
065: *
066: * @param proposal
067: */
068: public void setProposal(Proposal proposal) {
069: this .proposal = proposal;
070: }
071:
072: /**
073: * Gets the {@link ResearchRiskType} of the risk associated with the {@link Proposal}.
074: *
075: * @return the {@link ResearchRiskType}.
076: */
077: public ResearchRiskType getResearchRiskType() {
078: return researchRiskType;
079: }
080:
081: /**
082: * Sets the {@link ResearchRiskType} associated with the {@link Proposal}.
083: *
084: * @param researchRiskType
085: */
086: public void setResearchRiskType(ResearchRiskType researchRiskType) {
087: this .researchRiskType = researchRiskType;
088: }
089:
090: /**
091: * Not sure what this is.
092: *
093: * @return true or false
094: */
095: public boolean isResearchRiskTypeIndicator() {
096: return researchRiskTypeIndicator;
097: }
098:
099: /**
100: * Not sure what this is.
101: *
102: * @param researchRiskTypeIndicator
103: */
104: public void setResearchRiskTypeIndicator(
105: boolean researchRiskTypeIndicator) {
106: this .researchRiskTypeIndicator = researchRiskTypeIndicator;
107: }
108:
109: /**
110: * Gets the key of the {@link Proposal} related to the {@link ResearchRisk}.
111: *
112: * @return the id of the {@link Proposal} related to the {@link ResearchRisk}.
113: */
114: public Long getProposalNumber() {
115: return proposalNumber;
116: }
117:
118: /**
119: * Sets the key of the {@link Proposal} related to the {@link ResearchRisk}.
120: *
121: * @param the id of the {@link Proposal} related to the {@link ResearchRisk}.
122: */
123: public void setProposalNumber(Long proposalNumber) {
124: this .proposalNumber = proposalNumber;
125: }
126:
127: /**
128: * Gets the code of the {@link ResearchRiskType} associated to the {@link Proposal}.
129: *
130: * @return the code of the {@link ResearchRiskType} associated to the {@link Proposal}.
131: */
132: public String getResearchRiskTypeCode() {
133: return researchRiskTypeCode;
134: }
135:
136: /**
137: * Gets the code of the {@link ResearchRiskType} associated to the {@link Proposal}.
138: *
139: * @param the code of the type of the {@link ResearchRiskType} associated to the {@link Proposal}.
140: */
141: public void setResearchRiskTypeCode(String researchRiskTypeCode) {
142: this.researchRiskTypeCode = researchRiskTypeCode;
143: }
144:
145: }
|