001 /*
002 * Copyright 2011 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 */
016
017 package org.kuali.kfs.sys.businessobject;
018
019 import java.util.LinkedHashMap;
020
021 import org.kuali.kfs.sys.context.SpringContext;
022 import org.kuali.rice.kns.bo.Campus;
023 import org.kuali.rice.kns.bo.Inactivateable;
024 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase;
025 import org.kuali.rice.kns.service.KualiModuleService;
026
027 /**
028 *
029 */
030 public class Room extends PersistableBusinessObjectBase implements Inactivateable {
031
032 private String campusCode;
033 private String buildingCode;
034 private String buildingRoomNumber;
035 private String buildingRoomType;
036 private String buildingRoomDepartment;
037 private String buildingRoomDescription;
038 private boolean active;
039
040 private Campus campus;
041 private Building building;
042
043 /**
044 * Default constructor.
045 */
046 public Room() {
047
048 }
049
050 /**
051 * Gets the campusCode attribute.
052 *
053 * @return Returns the campusCode
054 */
055 public String getCampusCode() {
056 return campusCode;
057 }
058
059 /**
060 * Sets the campusCode attribute.
061 *
062 * @param campusCode The campusCode to set.
063 */
064 public void setCampusCode(String campusCode) {
065 this.campusCode = campusCode;
066 }
067
068
069 /**
070 * Gets the buildingCode attribute.
071 *
072 * @return Returns the buildingCode
073 */
074 public String getBuildingCode() {
075 return buildingCode;
076 }
077
078 /**
079 * Sets the buildingCode attribute.
080 *
081 * @param buildingCode The buildingCode to set.
082 */
083 public void setBuildingCode(String buildingCode) {
084 this.buildingCode = buildingCode;
085 }
086
087
088 /**
089 * Gets the buildingRoomNumber attribute.
090 *
091 * @return Returns the buildingRoomNumber
092 */
093 public String getBuildingRoomNumber() {
094 return buildingRoomNumber;
095 }
096
097 /**
098 * Sets the buildingRoomNumber attribute.
099 *
100 * @param buildingRoomNumber The buildingRoomNumber to set.
101 */
102 public void setBuildingRoomNumber(String buildingRoomNumber) {
103 this.buildingRoomNumber = buildingRoomNumber;
104 }
105
106
107 /**
108 * Gets the buildingRoomType attribute.
109 *
110 * @return Returns the buildingRoomType
111 */
112 public String getBuildingRoomType() {
113 return buildingRoomType;
114 }
115
116 /**
117 * Sets the buildingRoomType attribute.
118 *
119 * @param buildingRoomType The buildingRoomType to set.
120 */
121 public void setBuildingRoomType(String buildingRoomType) {
122 this.buildingRoomType = buildingRoomType;
123 }
124
125
126 /**
127 * Gets the buildingRoomDepartment attribute.
128 *
129 * @return Returns the buildingRoomDepartment
130 */
131 public String getBuildingRoomDepartment() {
132 return buildingRoomDepartment;
133 }
134
135 /**
136 * Sets the buildingRoomDepartment attribute.
137 *
138 * @param buildingRoomDepartment The buildingRoomDepartment to set.
139 */
140 public void setBuildingRoomDepartment(String buildingRoomDepartment) {
141 this.buildingRoomDepartment = buildingRoomDepartment;
142 }
143
144
145 /**
146 * Gets the buildingRoomDescription attribute.
147 *
148 * @return Returns the buildingRoomDescription
149 */
150 public String getBuildingRoomDescription() {
151 return buildingRoomDescription;
152 }
153
154 /**
155 * Sets the buildingRoomDescription attribute.
156 *
157 * @param buildingRoomDescription The buildingRoomDescription to set.
158 */
159 public void setBuildingRoomDescription(String buildingRoomDescription) {
160 this.buildingRoomDescription = buildingRoomDescription;
161 }
162
163
164 /**
165 * Gets the campus attribute.
166 *
167 * @return Returns the campus
168 */
169 public Campus getCampus() {
170 return campus = (Campus) SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(Campus.class).retrieveExternalizableBusinessObjectIfNecessary(this, campus, "campus");
171 }
172
173 /**
174 * Sets the campus attribute.
175 *
176 * @param campus The campus to set.
177 * @deprecated
178 */
179 public void setCampus(Campus campus) {
180 this.campus = campus;
181 }
182
183 /**
184 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper()
185 */
186 protected LinkedHashMap toStringMapper() {
187 LinkedHashMap m = new LinkedHashMap();
188 m.put("campusCode", this.campusCode);
189 m.put("buildingCode", this.buildingCode);
190 m.put("buildingRoomNumber", this.buildingRoomNumber);
191 return m;
192 }
193
194 /**
195 * Gets the building attribute.
196 *
197 * @return Returns the building
198 */
199 public Building getBuilding() {
200 return building;
201 }
202
203 /**
204 * Sets the building attribute.
205 *
206 * @param building The building to set.
207 * @deprecated
208 */
209 public void setBuilding(Building building) {
210 this.building = building;
211 }
212
213 /**
214 * Gets the active attribute.
215 *
216 * @return Returns the active
217 *
218 */
219 public boolean isActive() {
220 return active;
221 }
222
223 /**
224 * Sets the active attribute.
225 *
226 * @param active The active to set.
227 *
228 */
229 public void setActive(boolean active) {
230 this.active = active;
231 }
232 }