001/* 002 * Copyright 2007 The Kuali Foundation 003 * 004 * Licensed under the Educational Community License, Version 2.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/ecl2.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 */ 016package org.kuali.ole.module.cg.businessobject; 017 018import java.util.LinkedHashMap; 019 020import org.kuali.rice.core.api.mo.common.active.MutableInactivatable; 021import org.kuali.rice.krad.bo.PersistableBusinessObjectBase; 022 023/** 024 * Represents a relationship between a {@link Proposal} and a {@link ResearchRisk}. 025 */ 026public class ProposalResearchRisk extends PersistableBusinessObjectBase implements MutableInactivatable { 027 028 private String researchRiskTypeCode; 029 private Long proposalNumber; 030 private boolean active; 031 032 private Proposal proposal; 033 private ResearchRiskType researchRiskType; 034 035 /** 036 * Default constructor. 037 */ 038 public ProposalResearchRisk() { 039 super(); 040 } 041 042 043 protected LinkedHashMap toStringMapper_RICE20_REFACTORME() { 044 045 LinkedHashMap m = new LinkedHashMap(); 046 m.put("proposalNumber", proposalNumber); 047 m.put("researchRiskTypeCode", researchRiskTypeCode); 048 m.put("active", Boolean.toString(active)); 049 050 return m; 051 } 052 053 /** 054 * Gets the {@link Proposal}. 055 * 056 * @return 057 */ 058 public Proposal getProposal() { 059 return proposal; 060 } 061 062 /** 063 * Sets the {@link Proposal}. 064 * 065 * @param proposal 066 */ 067 public void setProposal(Proposal proposal) { 068 this.proposal = proposal; 069 } 070 071 /** 072 * Gets the {@link ResearchRiskType} of the risk associated with the {@link Proposal}. 073 * 074 * @return the {@link ResearchRiskType}. 075 */ 076 public ResearchRiskType getResearchRiskType() { 077 return researchRiskType; 078 } 079 080 /** 081 * Sets the {@link ResearchRiskType} associated with the {@link Proposal}. 082 * 083 * @param researchRiskType 084 */ 085 public void setResearchRiskType(ResearchRiskType researchRiskType) { 086 this.researchRiskType = researchRiskType; 087 } 088 089 /** 090 * Returns whether or not this object is active. 091 * 092 * @return true or false 093 */ 094 public boolean isActive() { 095 return active; 096 } 097 098 /** 099 * 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}