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.Date; 019 import java.util.LinkedHashMap; 020 import java.util.List; 021 022 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 023 import org.kuali.rice.kns.util.KualiDecimal; 024 import org.kuali.rice.kns.util.TypedArrayList; 025 026 /** 027 * @author Kuali Nervous System Team (kualidev@oncourse.iu.edu) 028 */ 029 public class AssetComponent extends PersistableBusinessObjectBase { 030 031 private Long capitalAssetNumber; 032 private Integer componentNumber; 033 private String componentDescription; 034 private String componentContactPhoneNumber; 035 private String componentConditionCode; 036 private Integer componentEstimatedLifetimeLimit; 037 private String componentManufacturerName; 038 private String componentManufacturerModelNumber; 039 private String componentSerialNumber; 040 private String componentOrganizationTagNumber; 041 private String componentOrganizationText; 042 private KualiDecimal componentReplacementAmount; 043 private String componentVendorName; 044 private String componentWarrantyNumber; 045 private String componentWarrantyPhoneNumber; 046 private String componentWarrantyContactName; 047 private String componentWarrantyPurchaseOrderNumber; 048 private Date componentWarrantyBeginningDate; 049 private Date componentWarrantyEndingDate; 050 private String componentWarrantyText; 051 private String governmentTagNumber; 052 private String nationalStockNumber; 053 054 private Asset asset; 055 private AssetCondition componentCondition; 056 057 /** 058 * Default constructor. 059 */ 060 public AssetComponent() { 061 } 062 063 /** 064 * Gets the capitalAssetNumber attribute. 065 * 066 * @return Returns the capitalAssetNumber 067 * 068 */ 069 public Long getCapitalAssetNumber() { 070 return capitalAssetNumber; 071 } 072 073 /** 074 * Sets the capitalAssetNumber attribute. 075 * 076 * @param capitalAssetNumber The capitalAssetNumber to set. 077 * 078 */ 079 public void setCapitalAssetNumber(Long capitalAssetNumber) { 080 this.capitalAssetNumber = capitalAssetNumber; 081 } 082 083 084 /** 085 * Gets the componentNumber attribute. 086 * 087 * @return Returns the componentNumber 088 * 089 */ 090 public Integer getComponentNumber() { 091 return componentNumber; 092 } 093 094 /** 095 * Sets the componentNumber attribute. 096 * 097 * @param componentNumber The componentNumber to set. 098 * 099 */ 100 public void setComponentNumber(Integer componentNumber) { 101 this.componentNumber = componentNumber; 102 } 103 104 105 /** 106 * Gets the componentDescription attribute. 107 * 108 * @return Returns the componentDescription 109 * 110 */ 111 public String getComponentDescription() { 112 return componentDescription; 113 } 114 115 /** 116 * Sets the componentDescription attribute. 117 * 118 * @param componentDescription The componentDescription to set. 119 * 120 */ 121 public void setComponentDescription(String componentDescription) { 122 this.componentDescription = componentDescription; 123 } 124 125 126 /** 127 * Gets the componentContactPhoneNumber attribute. 128 * 129 * @return Returns the componentContactPhoneNumber 130 * 131 */ 132 public String getComponentContactPhoneNumber() { 133 return componentContactPhoneNumber; 134 } 135 136 /** 137 * Sets the componentContactPhoneNumber attribute. 138 * 139 * @param componentContactPhoneNumber The componentContactPhoneNumber to set. 140 * 141 */ 142 public void setComponentContactPhoneNumber(String componentContactPhoneNumber) { 143 this.componentContactPhoneNumber = componentContactPhoneNumber; 144 } 145 146 147 /** 148 * Gets the componentConditionCode attribute. 149 * 150 * @return Returns the componentConditionCode 151 * 152 */ 153 public String getComponentConditionCode() { 154 return componentConditionCode; 155 } 156 157 /** 158 * Sets the componentConditionCode attribute. 159 * 160 * @param componentConditionCode The componentConditionCode to set. 161 * 162 */ 163 public void setComponentConditionCode(String componentConditionCode) { 164 this.componentConditionCode = componentConditionCode; 165 } 166 167 168 /** 169 * Gets the componentEstimatedLifetimeLimit attribute. 170 * 171 * @return Returns the componentEstimatedLifetimeLimit 172 * 173 */ 174 public Integer getComponentEstimatedLifetimeLimit() { 175 return componentEstimatedLifetimeLimit; 176 } 177 178 /** 179 * Sets the componentEstimatedLifetimeLimit attribute. 180 * 181 * @param componentEstimatedLifetimeLimit The componentEstimatedLifetimeLimit to set. 182 * 183 */ 184 public void setComponentEstimatedLifetimeLimit(Integer componentEstimatedLifetimeLimit) { 185 this.componentEstimatedLifetimeLimit = componentEstimatedLifetimeLimit; 186 } 187 188 189 /** 190 * Gets the componentManufacturerName attribute. 191 * 192 * @return Returns the componentManufacturerName 193 * 194 */ 195 public String getComponentManufacturerName() { 196 return componentManufacturerName; 197 } 198 199 /** 200 * Sets the componentManufacturerName attribute. 201 * 202 * @param componentManufacturerName The componentManufacturerName to set. 203 * 204 */ 205 public void setComponentManufacturerName(String componentManufacturerName) { 206 this.componentManufacturerName = componentManufacturerName; 207 } 208 209 210 /** 211 * Gets the componentManufacturerModelNumber attribute. 212 * 213 * @return Returns the componentManufacturerModelNumber 214 * 215 */ 216 public String getComponentManufacturerModelNumber() { 217 return componentManufacturerModelNumber; 218 } 219 220 /** 221 * Sets the componentManufacturerModelNumber attribute. 222 * 223 * @param componentManufacturerModelNumber The componentManufacturerModelNumber to set. 224 * 225 */ 226 public void setComponentManufacturerModelNumber(String componentManufacturerModelNumber) { 227 this.componentManufacturerModelNumber = componentManufacturerModelNumber; 228 } 229 230 231 /** 232 * Gets the componentSerialNumber attribute. 233 * 234 * @return Returns the componentSerialNumber 235 * 236 */ 237 public String getComponentSerialNumber() { 238 return componentSerialNumber; 239 } 240 241 /** 242 * Sets the componentSerialNumber attribute. 243 * 244 * @param componentSerialNumber The componentSerialNumber to set. 245 * 246 */ 247 public void setComponentSerialNumber(String componentSerialNumber) { 248 this.componentSerialNumber = componentSerialNumber; 249 } 250 251 252 /** 253 * Gets the componentOrganizationTagNumber attribute. 254 * 255 * @return Returns the componentOrganizationTagNumber 256 * 257 */ 258 public String getComponentOrganizationTagNumber() { 259 return componentOrganizationTagNumber; 260 } 261 262 /** 263 * Sets the componentOrganizationTagNumber attribute. 264 * 265 * @param componentOrganizationTagNumber The componentOrganizationTagNumber to set. 266 * 267 */ 268 public void setComponentOrganizationTagNumber(String componentOrganizationTagNumber) { 269 this.componentOrganizationTagNumber = componentOrganizationTagNumber; 270 } 271 272 273 /** 274 * Gets the componentOrganizationText attribute. 275 * 276 * @return Returns the componentOrganizationText 277 * 278 */ 279 public String getComponentOrganizationText() { 280 return componentOrganizationText; 281 } 282 283 /** 284 * Sets the componentOrganizationText attribute. 285 * 286 * @param componentOrganizationText The componentOrganizationText to set. 287 * 288 */ 289 public void setComponentOrganizationText(String componentOrganizationText) { 290 this.componentOrganizationText = componentOrganizationText; 291 } 292 293 294 /** 295 * Gets the componentReplacementAmount attribute. 296 * 297 * @return Returns the componentReplacementAmount 298 * 299 */ 300 public KualiDecimal getComponentReplacementAmount() { 301 return componentReplacementAmount; 302 } 303 304 /** 305 * Sets the componentReplacementAmount attribute. 306 * 307 * @param componentReplacementAmount The componentReplacementAmount to set. 308 * 309 */ 310 public void setComponentReplacementAmount(KualiDecimal componentReplacementAmount) { 311 this.componentReplacementAmount = componentReplacementAmount; 312 } 313 314 315 /** 316 * Gets the componentVendorName attribute. 317 * 318 * @return Returns the componentVendorName 319 * 320 */ 321 public String getComponentVendorName() { 322 return componentVendorName; 323 } 324 325 /** 326 * Sets the componentVendorName attribute. 327 * 328 * @param componentVendorName The componentVendorName to set. 329 * 330 */ 331 public void setComponentVendorName(String componentVendorName) { 332 this.componentVendorName = componentVendorName; 333 } 334 335 336 /** 337 * Gets the componentWarrantyNumber attribute. 338 * 339 * @return Returns the componentWarrantyNumber 340 * 341 */ 342 public String getComponentWarrantyNumber() { 343 return componentWarrantyNumber; 344 } 345 346 /** 347 * Sets the componentWarrantyNumber attribute. 348 * 349 * @param componentWarrantyNumber The componentWarrantyNumber to set. 350 * 351 */ 352 public void setComponentWarrantyNumber(String componentWarrantyNumber) { 353 this.componentWarrantyNumber = componentWarrantyNumber; 354 } 355 356 357 /** 358 * Gets the componentWarrantyPhoneNumber attribute. 359 * 360 * @return Returns the componentWarrantyPhoneNumber 361 * 362 */ 363 public String getComponentWarrantyPhoneNumber() { 364 return componentWarrantyPhoneNumber; 365 } 366 367 /** 368 * Sets the componentWarrantyPhoneNumber attribute. 369 * 370 * @param componentWarrantyPhoneNumber The componentWarrantyPhoneNumber to set. 371 * 372 */ 373 public void setComponentWarrantyPhoneNumber(String componentWarrantyPhoneNumber) { 374 this.componentWarrantyPhoneNumber = componentWarrantyPhoneNumber; 375 } 376 377 378 /** 379 * Gets the componentWarrantyContactName attribute. 380 * 381 * @return Returns the componentWarrantyContactName 382 * 383 */ 384 public String getComponentWarrantyContactName() { 385 return componentWarrantyContactName; 386 } 387 388 /** 389 * Sets the componentWarrantyContactName attribute. 390 * 391 * @param componentWarrantyContactName The componentWarrantyContactName to set. 392 * 393 */ 394 public void setComponentWarrantyContactName(String componentWarrantyContactName) { 395 this.componentWarrantyContactName = componentWarrantyContactName; 396 } 397 398 399 /** 400 * Gets the componentWarrantyPurchaseOrderNumber attribute. 401 * 402 * @return Returns the componentWarrantyPurchaseOrderNumber 403 * 404 */ 405 public String getComponentWarrantyPurchaseOrderNumber() { 406 return componentWarrantyPurchaseOrderNumber; 407 } 408 409 /** 410 * Sets the componentWarrantyPurchaseOrderNumber attribute. 411 * 412 * @param componentWarrantyPurchaseOrderNumber The componentWarrantyPurchaseOrderNumber to set. 413 * 414 */ 415 public void setComponentWarrantyPurchaseOrderNumber(String componentWarrantyPurchaseOrderNumber) { 416 this.componentWarrantyPurchaseOrderNumber = componentWarrantyPurchaseOrderNumber; 417 } 418 419 420 /** 421 * Gets the componentWarrantyBeginningDate attribute. 422 * 423 * @return Returns the componentWarrantyBeginningDate 424 * 425 */ 426 public Date getComponentWarrantyBeginningDate() { 427 return componentWarrantyBeginningDate; 428 } 429 430 /** 431 * Sets the componentWarrantyBeginningDate attribute. 432 * 433 * @param componentWarrantyBeginningDate The componentWarrantyBeginningDate to set. 434 * 435 */ 436 public void setComponentWarrantyBeginningDate(Date componentWarrantyBeginningDate) { 437 this.componentWarrantyBeginningDate = componentWarrantyBeginningDate; 438 } 439 440 441 /** 442 * Gets the componentWarrantyEndingDate attribute. 443 * 444 * @return Returns the componentWarrantyEndingDate 445 * 446 */ 447 public Date getComponentWarrantyEndingDate() { 448 return componentWarrantyEndingDate; 449 } 450 451 /** 452 * Sets the componentWarrantyEndingDate attribute. 453 * 454 * @param componentWarrantyEndingDate The componentWarrantyEndingDate to set. 455 * 456 */ 457 public void setComponentWarrantyEndingDate(Date componentWarrantyEndingDate) { 458 this.componentWarrantyEndingDate = componentWarrantyEndingDate; 459 } 460 461 462 /** 463 * Gets the componentWarrantyText attribute. 464 * 465 * @return Returns the componentWarrantyText 466 * 467 */ 468 public String getComponentWarrantyText() { 469 return componentWarrantyText; 470 } 471 472 /** 473 * Sets the componentWarrantyText attribute. 474 * 475 * @param componentWarrantyText The componentWarrantyText to set. 476 * 477 */ 478 public void setComponentWarrantyText(String componentWarrantyText) { 479 this.componentWarrantyText = componentWarrantyText; 480 } 481 482 /** 483 * Gets the governmentTagNumber attribute. 484 * 485 * @return Returns the governmentTagNumber. 486 */ 487 public String getGovernmentTagNumber() { 488 return governmentTagNumber; 489 } 490 491 /** 492 * Sets the governmentTagNumber attribute value. 493 * 494 * @param governmentTagNumber The governmentTagNumber to set. 495 */ 496 public void setGovernmentTagNumber(String governmentTagNumber) { 497 this.governmentTagNumber = governmentTagNumber; 498 } 499 500 /** 501 * Gets the nationalStockNumber attribute. 502 * 503 * @return Returns the nationalStockNumber. 504 */ 505 public String getNationalStockNumber() { 506 return nationalStockNumber; 507 } 508 509 /** 510 * Sets the nationalStockNumber attribute value. 511 * 512 * @param nationalStockNumber The nationalStockNumber to set. 513 */ 514 public void setNationalStockNumber(String nationalStockNumber) { 515 this.nationalStockNumber = nationalStockNumber; 516 } 517 518 /** 519 * Gets the asset attribute. 520 * 521 * @return Returns the asset 522 * 523 */ 524 public Asset getAsset() { 525 return asset; 526 } 527 528 /** 529 * Sets the asset attribute. 530 * 531 * @param asset The asset to set. 532 * @deprecated 533 */ 534 public void setAsset(Asset asset) { 535 this.asset = asset; 536 } 537 538 /** 539 * Gets the componentCondition attribute. 540 * 541 * @return Returns the componentCondition 542 * 543 */ 544 public AssetCondition getComponentCondition() { 545 return componentCondition; 546 } 547 548 /** 549 * Sets the componentCondition attribute. 550 * 551 * @param componentCondition The componentCondition to set. 552 * @deprecated 553 */ 554 public void setComponentCondition(AssetCondition componentCondition) { 555 this.componentCondition = componentCondition; 556 } 557 558 /** 559 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 560 */ 561 protected LinkedHashMap toStringMapper() { 562 LinkedHashMap m = new LinkedHashMap(); 563 if (this.capitalAssetNumber != null) { 564 m.put("capitalAssetNumber", this.capitalAssetNumber.toString()); 565 } 566 if (this.componentNumber != null) { 567 m.put("componentNumber", this.componentNumber.toString()); 568 } 569 return m; 570 } 571 }