View Javadoc
1   /*
2    * Copyright 2007 The Kuali Foundation
3    * 
4    * Licensed under the Educational Community License, Version 2.0 (the "License");
5    * you may not use this file except in compliance with the License.
6    * You may obtain a copy of the License at
7    * 
8    * http://www.opensource.org/licenses/ecl2.php
9    * 
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.ole.module.cg.businessobject;
17  
18  import java.util.LinkedHashMap;
19  
20  import org.kuali.rice.core.api.mo.common.active.MutableInactivatable;
21  import org.kuali.rice.krad.bo.PersistableBusinessObjectBase;
22  
23  /**
24   * Represents a relationship between a {@link Proposal} and a {@link ResearchRisk}.
25   */
26  public class ProposalResearchRisk extends PersistableBusinessObjectBase implements MutableInactivatable {
27  
28      private String researchRiskTypeCode;
29      private Long proposalNumber;
30      private boolean active;
31  
32      private Proposal proposal;
33      private ResearchRiskType researchRiskType;
34  
35      /**
36       * Default constructor.
37       */
38      public ProposalResearchRisk() {
39          super();
40      }
41  
42      
43      protected LinkedHashMap toStringMapper_RICE20_REFACTORME() {
44  
45          LinkedHashMap m = new LinkedHashMap();
46          m.put("proposalNumber", proposalNumber);
47          m.put("researchRiskTypeCode", researchRiskTypeCode);
48          m.put("active", Boolean.toString(active));
49  
50          return m;
51      }
52  
53      /**
54       * Gets the {@link Proposal}.
55       * 
56       * @return
57       */
58      public Proposal getProposal() {
59          return proposal;
60      }
61  
62      /**
63       * Sets the {@link Proposal}.
64       * 
65       * @param proposal
66       */
67      public void setProposal(Proposal proposal) {
68          this.proposal = proposal;
69      }
70  
71      /**
72       * Gets the {@link ResearchRiskType} of the risk associated with the {@link Proposal}.
73       * 
74       * @return the {@link ResearchRiskType}.
75       */
76      public ResearchRiskType getResearchRiskType() {
77          return researchRiskType;
78      }
79  
80      /**
81       * Sets the {@link ResearchRiskType} associated with the {@link Proposal}.
82       * 
83       * @param researchRiskType
84       */
85      public void setResearchRiskType(ResearchRiskType researchRiskType) {
86          this.researchRiskType = researchRiskType;
87      }
88  
89      /**
90       * Returns whether or not this object is active.
91       * 
92       * @return true or false
93       */
94      public boolean isActive() {
95          return active;
96      }
97  
98      /**
99       * Sets the active indicator for this object.
100      * 
101      * @param active
102      */
103     public void setActive(boolean active) {
104         this.active = active;
105     }
106 
107     /**
108      * Gets the key of the {@link Proposal} related to the {@link ResearchRisk}.
109      * 
110      * @return the id of the {@link Proposal} related to the {@link ResearchRisk}.
111      */
112     public Long getProposalNumber() {
113         return proposalNumber;
114     }
115 
116     /**
117      * Sets the key of the {@link Proposal} related to the {@link ResearchRisk}.
118      * 
119      * @param the id of the {@link Proposal} related to the {@link ResearchRisk}.
120      */
121     public void setProposalNumber(Long proposalNumber) {
122         this.proposalNumber = proposalNumber;
123     }
124 
125     /**
126      * Gets the code of the {@link ResearchRiskType} associated to the {@link Proposal}.
127      * 
128      * @return the code of the {@link ResearchRiskType} associated to the {@link Proposal}.
129      */
130     public String getResearchRiskTypeCode() {
131         return researchRiskTypeCode;
132     }
133 
134     /**
135      * Gets the code of the {@link ResearchRiskType} associated to the {@link Proposal}.
136      * 
137      * @param the code of the type of the {@link ResearchRiskType} associated to the {@link Proposal}.
138      */
139     public void setResearchRiskTypeCode(String researchRiskTypeCode) {
140         this.researchRiskTypeCode = researchRiskTypeCode;
141     }
142 
143 }