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 package org.kuali.kfs.module.cam.businessobject; 017 018 import java.sql.Timestamp; 019 import java.util.LinkedHashMap; 020 021 import org.kuali.kfs.sys.businessobject.Building; 022 import org.kuali.kfs.sys.businessobject.Room; 023 import org.kuali.kfs.sys.context.SpringContext; 024 import org.kuali.rice.kns.bo.Campus; 025 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 026 import org.kuali.rice.kns.service.KualiModuleService; 027 028 /** 029 * Class for the barcode inventory error detail 030 */ 031 public class BarcodeInventoryErrorDetail extends PersistableBusinessObjectBase { 032 private static final org.apache.log4j.Logger LOG = org.apache.log4j.Logger.getLogger(BarcodeInventoryErrorDetail.class); 033 034 private String documentNumber; 035 private Long uploadRowNumber; 036 private String errorCorrectionStatusCode; 037 private String correctorUniversalIdentifier; 038 private Timestamp inventoryCorrectionTimestamp; 039 private String assetTagNumber; 040 private boolean uploadScanIndicator; 041 private Timestamp uploadScanTimestamp; 042 private String campusCode; 043 private String buildingCode; 044 private String buildingRoomNumber; 045 private String buildingSubRoomNumber; 046 private String assetConditionCode; 047 048 // References 049 private Campus campus; 050 private Room buildingRoom; 051 private Building building; 052 private AssetCondition condition; 053 054 // error description. This field is not being saved in any table. 055 private String errorDescription; 056 057 private boolean rowSelected; 058 059 /** 060 * Default constructor. 061 */ 062 public BarcodeInventoryErrorDetail() { 063 064 } 065 066 /** 067 * Gets the documentNumber attribute. 068 * 069 * @return Returns the documentNumber 070 */ 071 public String getDocumentNumber() { 072 return documentNumber; 073 } 074 075 /** 076 * Sets the documentNumber attribute. 077 * 078 * @param documentNumber The documentNumber to set. 079 */ 080 public void setDocumentNumber(String documentNumber) { 081 this.documentNumber = documentNumber; 082 } 083 084 085 /** 086 * Gets the uploadRowNumber attribute. 087 * 088 * @return Returns the uploadRowNumber 089 */ 090 public Long getUploadRowNumber() { 091 return uploadRowNumber; 092 } 093 094 /** 095 * Sets the uploadRowNumber attribute. 096 * 097 * @param uploadRowNumber The uploadRowNumber to set. 098 */ 099 public void setUploadRowNumber(Long uploadRowNumber) { 100 this.uploadRowNumber = uploadRowNumber; 101 } 102 103 104 /** 105 * Gets the errorCorrectionStatusCode attribute. 106 * 107 * @return Returns the errorCorrectionStatusCode 108 */ 109 public String getErrorCorrectionStatusCode() { 110 return errorCorrectionStatusCode; 111 } 112 113 /** 114 * Sets the errorCorrectionStatusCode attribute. 115 * 116 * @param errorCorrectionStatusCode The errorCorrectionStatusCode to set. 117 */ 118 public void setErrorCorrectionStatusCode(String errorCorrectionStatusCode) { 119 this.errorCorrectionStatusCode = errorCorrectionStatusCode; 120 } 121 122 123 /** 124 * Gets the correctorUniversalIdentifier attribute. 125 * 126 * @return Returns the correctorUniversalIdentifier 127 */ 128 public String getCorrectorUniversalIdentifier() { 129 return correctorUniversalIdentifier; 130 } 131 132 /** 133 * Sets the correctorUniversalIdentifier attribute. 134 * 135 * @param correctorUniversalIdentifier The correctorUniversalIdentifier to set. 136 */ 137 public void setCorrectorUniversalIdentifier(String correctorUniversalIdentifier) { 138 this.correctorUniversalIdentifier = correctorUniversalIdentifier; 139 } 140 141 142 /** 143 * Gets the inventoryCorrectionTimestamp attribute. 144 * 145 * @return Returns the inventoryCorrectionTimestamp 146 */ 147 public Timestamp getInventoryCorrectionTimestamp() { 148 return inventoryCorrectionTimestamp; 149 } 150 151 /** 152 * Sets the inventoryCorrectionTimestamp attribute. 153 * 154 * @param inventoryCorrectionTimestamp The inventoryCorrectionTimestamp to set. 155 */ 156 public void setInventoryCorrectionTimestamp(Timestamp inventoryCorrectionTimestamp) { 157 this.inventoryCorrectionTimestamp = inventoryCorrectionTimestamp; 158 } 159 160 161 /** 162 * Gets the assetTagNumber attribute. 163 * 164 * @return Returns the assetTagNumber 165 */ 166 public String getAssetTagNumber() { 167 return assetTagNumber; 168 } 169 170 /** 171 * Sets the assetTagNumber attribute. 172 * 173 * @param assetTagNumber The assetTagNumber to set. 174 */ 175 public void setAssetTagNumber(String assetTagNumber) { 176 this.assetTagNumber = assetTagNumber; 177 } 178 179 180 /** 181 * Gets the uploadScanIndicator attribute. 182 * 183 * @return Returns the uploadScanIndicator 184 */ 185 public boolean isUploadScanIndicator() { 186 return uploadScanIndicator; 187 } 188 189 /** 190 * Sets the uploadScanIndicator attribute. 191 * 192 * @param uploadScanIndicator The uploadScanIndicator to set. 193 */ 194 public void setUploadScanIndicator(boolean uploadScanIndicator) { 195 this.uploadScanIndicator = uploadScanIndicator; 196 } 197 198 199 /** 200 * Gets the uploadScanTimestamp attribute. 201 * 202 * @return Returns the uploadScanTimestamp 203 */ 204 public Timestamp getUploadScanTimestamp() { 205 return uploadScanTimestamp; 206 } 207 208 /** 209 * Sets the uploadScanTimestamp attribute. 210 * 211 * @param uploadScanTimestamp The uploadScanTimestamp to set. 212 */ 213 public void setUploadScanTimestamp(Timestamp uploadScanTimestamp) { 214 this.uploadScanTimestamp = uploadScanTimestamp; 215 } 216 217 218 /** 219 * Gets the campusCode attribute. 220 * 221 * @return Returns the campusCode 222 */ 223 public String getCampusCode() { 224 return campusCode; 225 } 226 227 /** 228 * Sets the campusCode attribute. 229 * 230 * @param campusCode The campusCode to set. 231 */ 232 public void setCampusCode(String campusCode) { 233 this.campusCode = campusCode; 234 } 235 236 237 /** 238 * Gets the buildingCode attribute. 239 * 240 * @return Returns the buildingCode 241 */ 242 public String getBuildingCode() { 243 return buildingCode; 244 } 245 246 /** 247 * Sets the buildingCode attribute. 248 * 249 * @param buildingCode The buildingCode to set. 250 */ 251 public void setBuildingCode(String buildingCode) { 252 this.buildingCode = buildingCode; 253 } 254 255 256 /** 257 * Gets the buildingRoomNumber attribute. 258 * 259 * @return Returns the buildingRoomNumber 260 */ 261 public String getBuildingRoomNumber() { 262 return buildingRoomNumber; 263 } 264 265 /** 266 * Sets the buildingRoomNumber attribute. 267 * 268 * @param buildingRoomNumber The buildingRoomNumber to set. 269 */ 270 public void setBuildingRoomNumber(String buildingRoomNumber) { 271 this.buildingRoomNumber = buildingRoomNumber; 272 } 273 274 275 /** 276 * Gets the buildingSubRoomNumber attribute. 277 * 278 * @return Returns the buildingSubRoomNumber 279 */ 280 public String getBuildingSubRoomNumber() { 281 return buildingSubRoomNumber; 282 } 283 284 /** 285 * Sets the buildingSubRoomNumber attribute. 286 * 287 * @param buildingSubRoomNumber The buildingSubRoomNumber to set. 288 */ 289 public void setBuildingSubRoomNumber(String buildingSubRoomNumber) { 290 this.buildingSubRoomNumber = buildingSubRoomNumber; 291 } 292 293 294 /** 295 * Gets the assetConditionCode attribute. 296 * 297 * @return Returns the assetConditionCode 298 */ 299 public String getAssetConditionCode() { 300 return assetConditionCode; 301 } 302 303 /** 304 * Sets the assetConditionCode attribute. 305 * 306 * @param assetConditionCode The assetConditionCode to set. 307 */ 308 public void setAssetConditionCode(String assetConditionCode) { 309 this.assetConditionCode = assetConditionCode; 310 } 311 312 /** 313 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 314 */ 315 protected LinkedHashMap toStringMapper() { 316 LinkedHashMap m = new LinkedHashMap(); 317 m.put("documentNumber", this.documentNumber); 318 if (this.uploadRowNumber != null) { 319 m.put("uploadRowNumber", this.uploadRowNumber.toString()); 320 } 321 322 m.put("assetTagNumber", this.assetTagNumber); 323 m.put("buildingRoomNumber", this.buildingRoomNumber); 324 m.put("errorCorrectionStatusCode", this.getErrorCorrectionStatusCode()); 325 return m; 326 } 327 328 /** 329 * Gets the campus code reference object 330 * 331 * @return Campus 332 */ 333 public Campus getCampus() { 334 return campus = (Campus) SpringContext.getBean(KualiModuleService.class).getResponsibleModuleService(Campus.class).retrieveExternalizableBusinessObjectIfNecessary(this, campus, "campus"); 335 } 336 337 /** 338 * sets the campus code reference object 339 * 340 * @param campus 341 */ 342 public void setCampus(Campus campus) { 343 this.campus = campus; 344 } 345 346 /** 347 * Gets the building room reference object 348 * 349 * @return Room 350 */ 351 public Room getBuildingRoom() { 352 return buildingRoom; 353 } 354 355 /** 356 * Sets the bulding room reference object 357 * 358 * @param buildingRoom 359 */ 360 public void setBuildingRoom(Room buildingRoom) { 361 this.buildingRoom = buildingRoom; 362 } 363 364 /** 365 * Gets the building reference object 366 * 367 * @return Building 368 */ 369 public Building getBuilding() { 370 return building; 371 } 372 373 /** 374 * Sets the building reference object 375 * 376 * @param building 377 */ 378 public void setBuilding(Building building) { 379 this.building = building; 380 } 381 382 /** 383 * Gets the condition code reference object 384 * 385 * @return AssetCondition 386 */ 387 public AssetCondition getCondition() { 388 return condition; 389 } 390 391 /** 392 * sets the condition code reference object 393 * 394 * @param condition 395 */ 396 public void setCondition(AssetCondition condition) { 397 this.condition = condition; 398 } 399 400 /** 401 * Gets the error description of an asset 402 * 403 * @return String 404 */ 405 public String getErrorDescription() { 406 return errorDescription; 407 } 408 409 /** 410 * sets the field that will hold the error description of an asset 411 * 412 * @param errorDescription 413 */ 414 public void setErrorDescription(String errorDescription) { 415 this.errorDescription = errorDescription; 416 } 417 }