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.module.bc.businessobject; 018 019 import java.math.BigDecimal; 020 import java.text.MessageFormat; 021 import java.util.HashMap; 022 import java.util.LinkedHashMap; 023 import java.util.List; 024 import java.util.Map; 025 026 import org.apache.ojb.broker.PersistenceBroker; 027 import org.apache.ojb.broker.PersistenceBrokerException; 028 import org.kuali.kfs.coa.businessobject.Account; 029 import org.kuali.kfs.coa.businessobject.Chart; 030 import org.kuali.kfs.coa.businessobject.ObjectCode; 031 import org.kuali.kfs.coa.businessobject.SubAccount; 032 import org.kuali.kfs.coa.businessobject.SubObjectCode; 033 import org.kuali.kfs.module.bc.util.SalarySettingCalculator; 034 import org.kuali.kfs.sys.KFSPropertyConstants; 035 import org.kuali.kfs.sys.context.SpringContext; 036 import org.kuali.rice.kim.bo.Person; 037 import org.kuali.rice.kim.service.PersonService; 038 import org.kuali.rice.kns.bo.Inactivateable; 039 import org.kuali.rice.kns.bo.PersistableBusinessObjectBase; 040 import org.kuali.rice.kns.util.KualiDecimal; 041 import org.kuali.rice.kns.util.KualiInteger; 042 import org.kuali.rice.kns.util.TypedArrayList; 043 044 /** 045 * 046 */ 047 public class PendingBudgetConstructionAppointmentFunding extends PersistableBusinessObjectBase implements Inactivateable { 048 049 private Integer universityFiscalYear; 050 private String chartOfAccountsCode; 051 private String accountNumber; 052 private String subAccountNumber; 053 private String financialObjectCode; 054 private String financialSubObjectCode; 055 private String positionNumber; 056 private String emplid; 057 private String appointmentFundingDurationCode; 058 private KualiInteger appointmentRequestedCsfAmount; 059 private BigDecimal appointmentRequestedCsfFteQuantity; 060 private BigDecimal appointmentRequestedCsfTimePercent; 061 private KualiInteger appointmentTotalIntendedAmount; 062 private BigDecimal appointmentTotalIntendedFteQuantity; 063 private KualiInteger appointmentRequestedAmount; 064 private BigDecimal appointmentRequestedTimePercent; 065 private BigDecimal appointmentRequestedFteQuantity; 066 private BigDecimal appointmentRequestedPayRate; 067 private boolean appointmentFundingDeleteIndicator; 068 private Integer appointmentFundingMonth; 069 private boolean positionObjectChangeIndicator; 070 private boolean positionSalaryChangeIndicator; 071 private boolean active; 072 073 private ObjectCode financialObject; 074 private Chart chartOfAccounts; 075 private Account account; 076 private SubAccount subAccount; 077 private SubObjectCode financialSubObject; 078 private BudgetConstructionPosition budgetConstructionPosition; 079 private BudgetConstructionAdministrativePost budgetConstructionAdministrativePost; 080 private BudgetConstructionAccountReports budgetConstructionAccountReports; 081 private BudgetConstructionIntendedIncumbent budgetConstructionIntendedIncumbent; 082 private BudgetConstructionDuration budgetConstructionDuration; 083 084 private List<BudgetConstructionCalculatedSalaryFoundationTracker> bcnCalculatedSalaryFoundationTracker; 085 private List<BudgetConstructionSalaryFunding> budgetConstructionSalaryFunding; 086 private List<BudgetConstructionAppointmentFundingReason> budgetConstructionAppointmentFundingReason; 087 088 private KualiDecimal percentChange; 089 private String adjustmentMeasurement; 090 private KualiDecimal adjustmentAmount; 091 092 private boolean persistedDeleteIndicator; 093 private boolean vacatable; 094 private boolean newLineIndicator; 095 096 private boolean displayOnlyMode; 097 private boolean budgetable; 098 private boolean hourlyPaid; 099 private boolean excludedFromTotal; 100 private boolean override2PlugMode; 101 private boolean purged; 102 103 /** 104 * Default constructor. 105 */ 106 public PendingBudgetConstructionAppointmentFunding() { 107 budgetConstructionSalaryFunding = new TypedArrayList(BudgetConstructionSalaryFunding.class); 108 bcnCalculatedSalaryFoundationTracker = new TypedArrayList(BudgetConstructionCalculatedSalaryFoundationTracker.class); 109 budgetConstructionAppointmentFundingReason = new TypedArrayList(BudgetConstructionAppointmentFundingReason.class); 110 positionObjectChangeIndicator = false; // assume pos change indicators false until set 111 positionSalaryChangeIndicator = false; 112 active = true; // assume active is true until set otherwise 113 } 114 115 /** 116 * Gets(sets) the percentChange based on the current values of csf and request amounts Checks to see if a CSF object exists 117 * 118 * @return Returns percentChange 119 */ 120 public KualiDecimal getPercentChange() { 121 percentChange = null; 122 123 BudgetConstructionCalculatedSalaryFoundationTracker csfTracker = this.getEffectiveCSFTracker(); 124 if (csfTracker != null) { 125 KualiInteger baseAmount = csfTracker.getCsfAmount(); 126 KualiInteger requestedAmount = this.getAppointmentRequestedAmount(); 127 128 percentChange = SalarySettingCalculator.getPercentChange(baseAmount, requestedAmount); 129 } 130 return percentChange; 131 } 132 133 /** 134 * Sets the percentChange attribute value. 135 * 136 * @param percentChange The percentChange to set. 137 * @deprecated 138 */ 139 public void setPercentChange(KualiDecimal percentChange) { 140 this.percentChange = percentChange; 141 } 142 143 /** 144 * Gets the universityFiscalYear attribute. 145 * 146 * @return Returns the universityFiscalYear 147 */ 148 public Integer getUniversityFiscalYear() { 149 return universityFiscalYear; 150 } 151 152 /** 153 * Sets the universityFiscalYear attribute. 154 * 155 * @param universityFiscalYear The universityFiscalYear to set. 156 */ 157 public void setUniversityFiscalYear(Integer universityFiscalYear) { 158 this.universityFiscalYear = universityFiscalYear; 159 } 160 161 /** 162 * Gets the chartOfAccountsCode attribute. 163 * 164 * @return Returns the chartOfAccountsCode 165 */ 166 public String getChartOfAccountsCode() { 167 return chartOfAccountsCode; 168 } 169 170 /** 171 * Sets the chartOfAccountsCode attribute. 172 * 173 * @param chartOfAccountsCode The chartOfAccountsCode to set. 174 */ 175 public void setChartOfAccountsCode(String chartOfAccountsCode) { 176 this.chartOfAccountsCode = chartOfAccountsCode; 177 } 178 179 /** 180 * Gets the accountNumber attribute. 181 * 182 * @return Returns the accountNumber 183 */ 184 public String getAccountNumber() { 185 return accountNumber; 186 } 187 188 /** 189 * Sets the accountNumber attribute. 190 * 191 * @param accountNumber The accountNumber to set. 192 */ 193 public void setAccountNumber(String accountNumber) { 194 this.accountNumber = accountNumber; 195 } 196 197 /** 198 * Gets the subAccountNumber attribute. 199 * 200 * @return Returns the subAccountNumber 201 */ 202 public String getSubAccountNumber() { 203 return subAccountNumber; 204 } 205 206 /** 207 * Sets the subAccountNumber attribute. 208 * 209 * @param subAccountNumber The subAccountNumber to set. 210 */ 211 public void setSubAccountNumber(String subAccountNumber) { 212 this.subAccountNumber = subAccountNumber; 213 } 214 215 /** 216 * Gets the financialObjectCode attribute. 217 * 218 * @return Returns the financialObjectCode 219 */ 220 public String getFinancialObjectCode() { 221 return financialObjectCode; 222 } 223 224 /** 225 * Sets the financialObjectCode attribute. 226 * 227 * @param financialObjectCode The financialObjectCode to set. 228 */ 229 public void setFinancialObjectCode(String financialObjectCode) { 230 this.financialObjectCode = financialObjectCode; 231 } 232 233 /** 234 * Gets the financialSubObjectCode attribute. 235 * 236 * @return Returns the financialSubObjectCode 237 */ 238 public String getFinancialSubObjectCode() { 239 return financialSubObjectCode; 240 } 241 242 /** 243 * Sets the financialSubObjectCode attribute. 244 * 245 * @param financialSubObjectCode The financialSubObjectCode to set. 246 */ 247 public void setFinancialSubObjectCode(String financialSubObjectCode) { 248 this.financialSubObjectCode = financialSubObjectCode; 249 } 250 251 /** 252 * Gets the positionNumber attribute. 253 * 254 * @return Returns the positionNumber 255 */ 256 public String getPositionNumber() { 257 return positionNumber; 258 } 259 260 /** 261 * Sets the positionNumber attribute. 262 * 263 * @param positionNumber The positionNumber to set. 264 */ 265 public void setPositionNumber(String positionNumber) { 266 this.positionNumber = positionNumber; 267 } 268 269 /** 270 * Gets the emplid attribute. 271 * 272 * @return Returns the emplid 273 */ 274 public String getEmplid() { 275 return emplid; 276 } 277 278 /** 279 * Sets the emplid attribute. 280 * 281 * @param emplid The emplid to set. 282 */ 283 public void setEmplid(String emplid) { 284 this.emplid = emplid; 285 } 286 287 /** 288 * Gets the appointmentFundingDurationCode attribute. 289 * 290 * @return Returns the appointmentFundingDurationCode 291 */ 292 public String getAppointmentFundingDurationCode() { 293 return appointmentFundingDurationCode; 294 } 295 296 /** 297 * Sets the appointmentFundingDurationCode attribute. 298 * 299 * @param appointmentFundingDurationCode The appointmentFundingDurationCode to set. 300 */ 301 public void setAppointmentFundingDurationCode(String appointmentFundingDurationCode) { 302 this.appointmentFundingDurationCode = appointmentFundingDurationCode; 303 } 304 305 /** 306 * Gets the appointmentRequestedCsfAmount attribute. 307 * 308 * @return Returns the appointmentRequestedCsfAmount. 309 */ 310 public KualiInteger getAppointmentRequestedCsfAmount() { 311 return appointmentRequestedCsfAmount; 312 } 313 314 /** 315 * Sets the appointmentRequestedCsfAmount attribute value. 316 * 317 * @param appointmentRequestedCsfAmount The appointmentRequestedCsfAmount to set. 318 */ 319 public void setAppointmentRequestedCsfAmount(KualiInteger appointmentRequestedCsfAmount) { 320 this.appointmentRequestedCsfAmount = appointmentRequestedCsfAmount; 321 } 322 323 /** 324 * Gets the appointmentRequestedCsfFteQuantity attribute. 325 * 326 * @return Returns the appointmentRequestedCsfFteQuantity 327 */ 328 public BigDecimal getAppointmentRequestedCsfFteQuantity() { 329 return appointmentRequestedCsfFteQuantity; 330 } 331 332 /** 333 * Sets the appointmentRequestedCsfFteQuantity attribute. 334 * 335 * @param appointmentRequestedCsfFteQuantity The appointmentRequestedCsfFteQuantity to set. 336 */ 337 public void setAppointmentRequestedCsfFteQuantity(BigDecimal appointmentRequestedCsfFteQuantity) { 338 this.appointmentRequestedCsfFteQuantity = appointmentRequestedCsfFteQuantity; 339 } 340 341 /** 342 * Gets the appointmentRequestedCsfTimePercent attribute. 343 * 344 * @return Returns the appointmentRequestedCsfTimePercent 345 */ 346 public BigDecimal getAppointmentRequestedCsfTimePercent() { 347 return appointmentRequestedCsfTimePercent; 348 } 349 350 /** 351 * Sets the appointmentRequestedCsfTimePercent attribute. 352 * 353 * @param appointmentRequestedCsfTimePercent The appointmentRequestedCsfTimePercent to set. 354 */ 355 public void setAppointmentRequestedCsfTimePercent(BigDecimal appointmentRequestedCsfTimePercent) { 356 this.appointmentRequestedCsfTimePercent = appointmentRequestedCsfTimePercent; 357 } 358 359 /** 360 * Gets the appointmentTotalIntendedAmount attribute. 361 * 362 * @return Returns the appointmentTotalIntendedAmount. 363 */ 364 public KualiInteger getAppointmentTotalIntendedAmount() { 365 return appointmentTotalIntendedAmount; 366 } 367 368 /** 369 * Sets the appointmentTotalIntendedAmount attribute value. 370 * 371 * @param appointmentTotalIntendedAmount The appointmentTotalIntendedAmount to set. 372 */ 373 public void setAppointmentTotalIntendedAmount(KualiInteger appointmentTotalIntendedAmount) { 374 this.appointmentTotalIntendedAmount = appointmentTotalIntendedAmount; 375 } 376 377 /** 378 * Gets the appointmentTotalIntendedFteQuantity attribute. 379 * 380 * @return Returns the appointmentTotalIntendedFteQuantity 381 */ 382 public BigDecimal getAppointmentTotalIntendedFteQuantity() { 383 return appointmentTotalIntendedFteQuantity; 384 } 385 386 /** 387 * Sets the appointmentTotalIntendedFteQuantity attribute. 388 * 389 * @param appointmentTotalIntendedFteQuantity The appointmentTotalIntendedFteQuantity to set. 390 */ 391 public void setAppointmentTotalIntendedFteQuantity(BigDecimal appointmentTotalIntendedFteQuantity) { 392 this.appointmentTotalIntendedFteQuantity = appointmentTotalIntendedFteQuantity; 393 } 394 395 /** 396 * Gets the appointmentRequestedAmount attribute. 397 * 398 * @return Returns the appointmentRequestedAmount 399 */ 400 public KualiInteger getAppointmentRequestedAmount() { 401 return appointmentRequestedAmount; 402 } 403 404 /** 405 * Sets the appointmentRequestedAmount attribute. 406 * 407 * @param appointmentRequestedAmount The appointmentRequestedAmount to set. 408 */ 409 public void setAppointmentRequestedAmount(KualiInteger appointmentRequestedAmount) { 410 this.appointmentRequestedAmount = appointmentRequestedAmount; 411 } 412 413 /** 414 * Gets the appointmentRequestedTimePercent attribute. 415 * 416 * @return Returns the appointmentRequestedTimePercent 417 */ 418 public BigDecimal getAppointmentRequestedTimePercent() { 419 return appointmentRequestedTimePercent; 420 } 421 422 /** 423 * Sets the appointmentRequestedTimePercent attribute. 424 * 425 * @param appointmentRequestedTimePercent The appointmentRequestedTimePercent to set. 426 */ 427 public void setAppointmentRequestedTimePercent(BigDecimal appointmentRequestedTimePercent) { 428 this.appointmentRequestedTimePercent = appointmentRequestedTimePercent; 429 } 430 431 /** 432 * Gets the appointmentRequestedFteQuantity attribute. 433 * 434 * @return Returns the appointmentRequestedFteQuantity 435 */ 436 public BigDecimal getAppointmentRequestedFteQuantity() { 437 return appointmentRequestedFteQuantity; 438 } 439 440 /** 441 * Sets the appointmentRequestedFteQuantity attribute. 442 * 443 * @param appointmentRequestedFteQuantity The appointmentRequestedFteQuantity to set. 444 */ 445 public void setAppointmentRequestedFteQuantity(BigDecimal appointmentRequestedFteQuantity) { 446 this.appointmentRequestedFteQuantity = appointmentRequestedFteQuantity; 447 } 448 449 /** 450 * Gets the appointmentRequestedPayRate attribute. 451 * 452 * @return Returns the appointmentRequestedPayRate 453 */ 454 public BigDecimal getAppointmentRequestedPayRate() { 455 return appointmentRequestedPayRate; 456 } 457 458 /** 459 * Sets the appointmentRequestedPayRate attribute. 460 * 461 * @param appointmentRequestedPayRate The appointmentRequestedPayRate to set. 462 */ 463 public void setAppointmentRequestedPayRate(BigDecimal appointmentRequestedPayRate) { 464 this.appointmentRequestedPayRate = appointmentRequestedPayRate; 465 } 466 467 /** 468 * Gets the active attribute. 469 * 470 * @return Returns the active 471 */ 472 public boolean isActive() { 473 return active; 474 } 475 476 /** 477 * Sets the active attribute. 478 * 479 * @param active The active to set. 480 */ 481 public void setActive(boolean active) { 482 this.active = active; 483 } 484 485 /** 486 * Gets the appointmentFundingDeleteIndicator attribute. 487 * 488 * @return Returns the appointmentFundingDeleteIndicator 489 */ 490 public boolean isAppointmentFundingDeleteIndicator() { 491 return !this.active; 492 // return appointmentFundingDeleteIndicator; 493 } 494 495 /** 496 * Sets the appointmentFundingDeleteIndicator attribute. 497 * 498 * @param appointmentFundingDeleteIndicator The appointmentFundingDeleteIndicator to set. 499 */ 500 public void setAppointmentFundingDeleteIndicator(boolean appointmentFundingDeleteIndicator) { 501 this.active = !appointmentFundingDeleteIndicator; 502 // this.appointmentFundingDeleteIndicator = appointmentFundingDeleteIndicator; 503 } 504 505 /** 506 * Gets the appointmentFundingMonth attribute. 507 * 508 * @return Returns the appointmentFundingMonth 509 */ 510 public Integer getAppointmentFundingMonth() { 511 return appointmentFundingMonth; 512 } 513 514 /** 515 * Sets the appointmentFundingMonth attribute. 516 * 517 * @param appointmentFundingMonth The appointmentFundingMonth to set. 518 */ 519 public void setAppointmentFundingMonth(Integer appointmentFundingMonth) { 520 this.appointmentFundingMonth = appointmentFundingMonth; 521 } 522 523 /** 524 * Gets the positionObjectChangeIndicator attribute. 525 * 526 * @return Returns the positionObjectChangeIndicator 527 */ 528 public boolean isPositionObjectChangeIndicator() { 529 return positionObjectChangeIndicator; 530 } 531 532 /** 533 * Sets the positionObjectChangeIndicator attribute. 534 * 535 * @param positionObjectChangeIndicator The positionObjectChangeIndicator to set. 536 */ 537 public void setPositionObjectChangeIndicator(boolean positionObjectChangeIndicator) { 538 this.positionObjectChangeIndicator = positionObjectChangeIndicator; 539 } 540 541 /** 542 * Gets the positionSalaryChangeIndicator attribute. 543 * 544 * @return Returns the positionSalaryChangeIndicator 545 */ 546 public boolean isPositionSalaryChangeIndicator() { 547 return positionSalaryChangeIndicator; 548 } 549 550 /** 551 * Sets the positionSalaryChangeIndicator attribute. 552 * 553 * @param positionSalaryChangeIndicator The positionSalaryChangeIndicator to set. 554 */ 555 public void setPositionSalaryChangeIndicator(boolean positionSalaryChangeIndicator) { 556 this.positionSalaryChangeIndicator = positionSalaryChangeIndicator; 557 } 558 559 /** 560 * gets the boolean positionSalaryChangeIndicator or positionObjectChangeIndicator 561 * 562 * @return positionSalaryChangeIndicator or positionObjectChangeIndicator 563 */ 564 public boolean isPositionChangeIndicator() { 565 566 return (this.isPositionSalaryChangeIndicator() || this.isPositionObjectChangeIndicator()); 567 } 568 569 /** 570 * Gets the financialObject attribute. 571 * 572 * @return Returns the financialObject 573 */ 574 public ObjectCode getFinancialObject() { 575 return financialObject; 576 } 577 578 /** 579 * Sets the financialObject attribute. 580 * 581 * @param financialObject The financialObject to set. 582 * @deprecated 583 */ 584 public void setFinancialObject(ObjectCode financialObject) { 585 this.financialObject = financialObject; 586 } 587 588 /** 589 * Gets the chartOfAccounts attribute. 590 * 591 * @return Returns the chartOfAccounts 592 */ 593 public Chart getChartOfAccounts() { 594 return chartOfAccounts; 595 } 596 597 /** 598 * Sets the chartOfAccounts attribute. 599 * 600 * @param chartOfAccounts The chartOfAccounts to set. 601 * @deprecated 602 */ 603 public void setChartOfAccounts(Chart chartOfAccounts) { 604 this.chartOfAccounts = chartOfAccounts; 605 } 606 607 /** 608 * Gets the account attribute. 609 * 610 * @return Returns the account 611 */ 612 public Account getAccount() { 613 return account; 614 } 615 616 /** 617 * Sets the account attribute. 618 * 619 * @param account The account to set. 620 * @deprecated 621 */ 622 public void setAccount(Account account) { 623 this.account = account; 624 } 625 626 /** 627 * Gets the financialSubObject attribute. 628 * 629 * @return Returns the financialSubObject. 630 */ 631 public SubObjectCode getFinancialSubObject() { 632 return financialSubObject; 633 } 634 635 /** 636 * Sets the financialSubObject attribute value. 637 * 638 * @param financialSubObject The financialSubObject to set. 639 * @deprecated 640 */ 641 public void setFinancialSubObject(SubObjectCode financialSubObject) { 642 this.financialSubObject = financialSubObject; 643 } 644 645 /** 646 * Gets the subAccount attribute. 647 * 648 * @return Returns the subAccount. 649 */ 650 public SubAccount getSubAccount() { 651 return subAccount; 652 } 653 654 /** 655 * Sets the subAccount attribute value. 656 * 657 * @param subAccount The subAccount to set. 658 * @deprecated 659 */ 660 public void setSubAccount(SubAccount subAccount) { 661 this.subAccount = subAccount; 662 } 663 664 /** 665 * Gets the budgetConstructionPosition attribute. 666 * 667 * @return Returns the budgetConstructionPosition 668 */ 669 public BudgetConstructionPosition getBudgetConstructionPosition() { 670 return budgetConstructionPosition; 671 } 672 673 /** 674 * Sets the budgetConstructionPosition attribute. 675 * 676 * @param budgetConstructionPosition The budgetConstructionPosition to set. 677 * @deprecated 678 */ 679 public void setBudgetConstructionPosition(BudgetConstructionPosition budgetConstructionPosition) { 680 this.budgetConstructionPosition = budgetConstructionPosition; 681 } 682 683 684 /** 685 * Gets the budgetConstructionSalaryFunding attribute. 686 * 687 * @return Returns the budgetConstructionSalaryFunding. 688 */ 689 public List<BudgetConstructionSalaryFunding> getBudgetConstructionSalaryFunding() { 690 return budgetConstructionSalaryFunding; 691 } 692 693 /** 694 * Sets the budgetConstructionSalaryFunding attribute value. 695 * 696 * @param budgetConstructionSalaryFunding The budgetConstructionSalaryFunding to set. 697 */ 698 @Deprecated 699 public void setBudgetConstructionSalaryFunding(List<BudgetConstructionSalaryFunding> budgetConstructionSalaryFunding) { 700 this.budgetConstructionSalaryFunding = budgetConstructionSalaryFunding; 701 } 702 703 /** 704 * Gets the budgetConstructionAppointmentFundingReason attribute. 705 * 706 * @return Returns the budgetConstructionAppointmentFundingReason. 707 */ 708 public List<BudgetConstructionAppointmentFundingReason> getBudgetConstructionAppointmentFundingReason() { 709 return budgetConstructionAppointmentFundingReason; 710 } 711 712 /** 713 * Sets the budgetConstructionAppointmentFundingReason attribute value. 714 * 715 * @param budgetConstructionAppointmentFundingReason The budgetConstructionAppointmentFundingReason to set. 716 */ 717 @Deprecated 718 public void setBudgetConstructionAppointmentFundingReason(List<BudgetConstructionAppointmentFundingReason> budgetConstructionAppointmentFundingReason) { 719 this.budgetConstructionAppointmentFundingReason = budgetConstructionAppointmentFundingReason; 720 } 721 722 /** 723 * Gets the budgetConstructionAdministrativePost attribute. 724 * 725 * @return Returns the budgetConstructionAdministrativePost. 726 */ 727 public BudgetConstructionAdministrativePost getBudgetConstructionAdministrativePost() { 728 return budgetConstructionAdministrativePost; 729 } 730 731 /** 732 * Sets the budgetConstructionAdministrativePost attribute value. 733 * 734 * @param budgetConstructionAdministrativePost The budgetConstructionAdministrativePost to set. 735 * @deprecated 736 */ 737 public void setBudgetConstructionAdministrativePost(BudgetConstructionAdministrativePost budgetConstructionAdministrativePost) { 738 this.budgetConstructionAdministrativePost = budgetConstructionAdministrativePost; 739 } 740 741 /** 742 * Gets the budgetConstructionAccountReports attribute. 743 * 744 * @return Returns the budgetConstructionAccountReports. 745 */ 746 public BudgetConstructionAccountReports getBudgetConstructionAccountReports() { 747 return budgetConstructionAccountReports; 748 } 749 750 /** 751 * Sets the budgetConstructionAccountReports attribute value. 752 * 753 * @param budgetConstructionAccountReports The budgetConstructionAccountReports to set. 754 * @deprecated 755 */ 756 public void setBudgetConstructionAccountReports(BudgetConstructionAccountReports budgetConstructionAccountReports) { 757 this.budgetConstructionAccountReports = budgetConstructionAccountReports; 758 } 759 760 /** 761 * Gets the budgetConstructionDuration attribute. 762 * 763 * @return Returns the budgetConstructionDuration. 764 */ 765 public BudgetConstructionDuration getBudgetConstructionDuration() { 766 return budgetConstructionDuration; 767 } 768 769 /** 770 * Sets the budgetConstructionDuration attribute value. 771 * 772 * @param budgetConstructionDuration The budgetConstructionDuration to set. 773 */ 774 public void setBudgetConstructionDuration(BudgetConstructionDuration budgetConstructionDuration) { 775 this.budgetConstructionDuration = budgetConstructionDuration; 776 } 777 778 /** 779 * Gets the budgetConstructionIntendedIncumbent attribute. 780 * 781 * @return Returns the budgetConstructionIntendedIncumbent. 782 */ 783 public BudgetConstructionIntendedIncumbent getBudgetConstructionIntendedIncumbent() { 784 return budgetConstructionIntendedIncumbent; 785 } 786 787 /** 788 * Sets the budgetConstructionIntendedIncumbent attribute value. 789 * 790 * @param budgetConstructionIntendedIncumbent The budgetConstructionIntendedIncumbent to set. 791 * @deprecated 792 */ 793 public void setBudgetConstructionIntendedIncumbent(BudgetConstructionIntendedIncumbent budgetConstructionIntendedIncumbent) { 794 this.budgetConstructionIntendedIncumbent = budgetConstructionIntendedIncumbent; 795 } 796 797 /** 798 * Gets the bcnCalculatedSalaryFoundationTracker attribute. 799 * 800 * @return Returns the bcnCalculatedSalaryFoundationTracker. 801 */ 802 public List<BudgetConstructionCalculatedSalaryFoundationTracker> getBcnCalculatedSalaryFoundationTracker() { 803 return bcnCalculatedSalaryFoundationTracker; 804 } 805 806 /** 807 * Sets the bcnCalculatedSalaryFoundationTracker attribute value. 808 * 809 * @param bcnCalculatedSalaryFoundationTracker The bcnCalculatedSalaryFoundationTracker to set. 810 * @deprecated 811 */ 812 public void setBcnCalculatedSalaryFoundationTracker(List<BudgetConstructionCalculatedSalaryFoundationTracker> bcnCalculatedSalaryFoundationTracker) { 813 this.bcnCalculatedSalaryFoundationTracker = bcnCalculatedSalaryFoundationTracker; 814 } 815 816 /** 817 * Gets the adjustmentAmount attribute. 818 * 819 * @return Returns the adjustmentAmount. 820 */ 821 public KualiDecimal getAdjustmentAmount() { 822 return adjustmentAmount; 823 } 824 825 /** 826 * Sets the adjustmentAmount attribute value. 827 * 828 * @param adjustmentAmount The adjustmentAmount to set. 829 */ 830 public void setAdjustmentAmount(KualiDecimal adjustmentAmount) { 831 this.adjustmentAmount = adjustmentAmount; 832 } 833 834 /** 835 * Gets the adjustmentMeasurement attribute. 836 * 837 * @return Returns the adjustmentMeasurement. 838 */ 839 public String getAdjustmentMeasurement() { 840 return adjustmentMeasurement; 841 } 842 843 /** 844 * Sets the adjustmentMeasurement attribute value. 845 * 846 * @param adjustmentMeasurement The adjustmentMeasurement to set. 847 */ 848 public void setAdjustmentMeasurement(String adjustmentMeasurement) { 849 this.adjustmentMeasurement = adjustmentMeasurement; 850 } 851 852 /** 853 * get the effective calculated salary fundation for current appionment funding if any 854 * 855 * @return the the effective calculated salary fundation for current appionment funding if any; otherwise, null 856 */ 857 public BudgetConstructionCalculatedSalaryFoundationTracker getEffectiveCSFTracker() { 858 if (bcnCalculatedSalaryFoundationTracker == null || bcnCalculatedSalaryFoundationTracker.size() <= 0) { 859 return null; 860 } 861 862 return bcnCalculatedSalaryFoundationTracker.get(0); 863 } 864 865 /** 866 * Gets the vacatable attribute. 867 * 868 * @return Returns the vacatable. 869 */ 870 public boolean isVacatable() { 871 return vacatable; 872 } 873 874 /** 875 * Sets the vacatable attribute value. 876 * 877 * @param vacatable The vacatable to set. 878 */ 879 public void setVacatable(boolean vacatable) { 880 this.vacatable = vacatable; 881 } 882 883 /** 884 * Gets the persistedDeleteIndicator attribute. 885 * 886 * @return Returns the persistedDeleteIndicator. 887 */ 888 public boolean isPersistedDeleteIndicator() { 889 return persistedDeleteIndicator; 890 } 891 892 /** 893 * Sets the persistedDeleteIndicator attribute value. 894 * 895 * @param persistedDeleteIndicator The persistedDeleteIndicator to set. 896 */ 897 public void setPersistedDeleteIndicator(boolean persistedDeleteIndicator) { 898 this.persistedDeleteIndicator = persistedDeleteIndicator; 899 } 900 901 /** 902 * Returns a map with the primitive field names as the key and the primitive values as the map value. 903 * 904 * @return Map a map with the primitive field names as the key and the primitive values as the map value. 905 */ 906 public Map<String, Object> getValuesMap() { 907 Map<String, Object> valuesMap = new HashMap<String, Object>(); 908 909 valuesMap.put(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, getUniversityFiscalYear()); 910 valuesMap.put(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, getChartOfAccountsCode()); 911 valuesMap.put(KFSPropertyConstants.ACCOUNT_NUMBER, getAccountNumber()); 912 valuesMap.put(KFSPropertyConstants.SUB_ACCOUNT_NUMBER, getSubAccountNumber()); 913 valuesMap.put(KFSPropertyConstants.FINANCIAL_OBJECT_CODE, getFinancialObjectCode()); 914 valuesMap.put(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE, getFinancialSubObjectCode()); 915 valuesMap.put(KFSPropertyConstants.POSITION_NUMBER, getPositionNumber()); 916 valuesMap.put(KFSPropertyConstants.EMPLID, getEmplid()); 917 918 return valuesMap; 919 } 920 921 /** 922 * @see org.kuali.rice.kns.bo.BusinessObjectBase#toStringMapper() 923 */ 924 protected LinkedHashMap toStringMapper() { 925 LinkedHashMap<String, String> map = new LinkedHashMap<String, String>(); 926 927 if (this.universityFiscalYear != null) { 928 map.put(KFSPropertyConstants.UNIVERSITY_FISCAL_YEAR, getUniversityFiscalYear().toString()); 929 } 930 931 map.put(KFSPropertyConstants.CHART_OF_ACCOUNTS_CODE, getChartOfAccountsCode()); 932 map.put(KFSPropertyConstants.ACCOUNT_NUMBER, getAccountNumber()); 933 map.put(KFSPropertyConstants.SUB_ACCOUNT_NUMBER, getSubAccountNumber()); 934 map.put(KFSPropertyConstants.FINANCIAL_OBJECT_CODE, getFinancialObjectCode()); 935 map.put(KFSPropertyConstants.FINANCIAL_SUB_OBJECT_CODE, getFinancialSubObjectCode()); 936 map.put(KFSPropertyConstants.POSITION_NUMBER, getPositionNumber()); 937 map.put(KFSPropertyConstants.EMPLID, getEmplid()); 938 939 return map; 940 } 941 942 /** 943 * build the given appointment funding key string 944 */ 945 public String getAppointmentFundingString() { 946 String pattern = " {0}, {1}, {2}, {3}, {4}, {5}, {6}"; 947 948 return MessageFormat.format(pattern, chartOfAccountsCode, accountNumber, subAccountNumber, financialObjectCode, financialSubObjectCode, emplid, positionNumber); 949 } 950 951 /** 952 * @see org.kuali.rice.kns.bo.PersistableBusinessObjectBase#afterLookup(org.apache.ojb.broker.PersistenceBroker) 953 */ 954 @Override 955 public void afterLookup(PersistenceBroker persistenceBroker) throws PersistenceBrokerException { 956 super.afterLookup(persistenceBroker); 957 958 this.setPersistedDeleteIndicator(this.isAppointmentFundingDeleteIndicator()); 959 this.setNewLineIndicator(false); 960 } 961 962 /** 963 * Gets the newLineIndicator attribute. 964 * 965 * @return Returns the newLineIndicator. 966 */ 967 public boolean isNewLineIndicator() { 968 return newLineIndicator; 969 } 970 971 /** 972 * Gets the hourlyPaid attribute. 973 * 974 * @return Returns the hourlyPaid. 975 */ 976 public boolean isHourlyPaid() { 977 return hourlyPaid; 978 } 979 980 /** 981 * Gets the displayOnlyMode attribute. 982 * 983 * @return Returns the displayOnlyMode. 984 */ 985 public boolean isDisplayOnlyMode() { 986 return displayOnlyMode; 987 } 988 989 /** 990 * Gets the budgetable attribute. 991 * 992 * @return Returns the budgetable. 993 */ 994 public boolean isBudgetable() { 995 return budgetable; 996 } 997 998 /** 999 * Gets the excludedFromTotal attribute. 1000 * 1001 * @return Returns the excludedFromTotal. 1002 */ 1003 public boolean isExcludedFromTotal() { 1004 return excludedFromTotal; 1005 } 1006 1007 /** 1008 * Gets the override2PlugMode attribute. 1009 * 1010 * @return Returns the override2PlugMode. 1011 */ 1012 public boolean isOverride2PlugMode() { 1013 return override2PlugMode; 1014 } 1015 1016 /** 1017 * Sets the displayOnlyMode attribute value. 1018 * 1019 * @param displayOnlyMode The displayOnlyMode to set. 1020 */ 1021 public void setDisplayOnlyMode(boolean displayOnlyMode) { 1022 this.displayOnlyMode = displayOnlyMode; 1023 } 1024 1025 /** 1026 * Sets the budgetable attribute value. 1027 * 1028 * @param budgetable The budgetable to set. 1029 */ 1030 public void setBudgetable(boolean budgetable) { 1031 this.budgetable = budgetable; 1032 } 1033 1034 /** 1035 * Sets the excludedFromTotal attribute value. 1036 * 1037 * @param excludedFromTotal The excludedFromTotal to set. 1038 */ 1039 public void setExcludedFromTotal(boolean excludedFromTotal) { 1040 this.excludedFromTotal = excludedFromTotal; 1041 } 1042 1043 /** 1044 * Sets the override2PlugMode attribute value. 1045 * 1046 * @param override2PlugMode The override2PlugMode to set. 1047 */ 1048 public void setOverride2PlugMode(boolean override2PlugMode) { 1049 this.override2PlugMode = override2PlugMode; 1050 } 1051 1052 /** 1053 * Sets the newLineIndicator attribute value. 1054 * 1055 * @param newLineIndicator The newLineIndicator to set. 1056 */ 1057 public void setNewLineIndicator(boolean newLineIndicator) { 1058 this.newLineIndicator = newLineIndicator; 1059 } 1060 1061 /** 1062 * Sets the hourlyPaid attribute value. 1063 * 1064 * @param hourlyPaid The hourlyPaid to set. 1065 */ 1066 public void setHourlyPaid(boolean hourlyPaid) { 1067 this.hourlyPaid = hourlyPaid; 1068 } 1069 1070 /** 1071 * Gets the purged attribute. 1072 * 1073 * @return Returns the purged. 1074 */ 1075 public boolean isPurged() { 1076 return purged; 1077 } 1078 1079 /** 1080 * Sets the purged attribute value. 1081 * 1082 * @param purged The purged to set. 1083 */ 1084 public void setPurged(boolean purged) { 1085 this.purged = purged; 1086 } 1087 1088 /** 1089 * @see org.kuali.rice.kns.bo.PersistableBusinessObjectBase#buildListOfDeletionAwareLists() 1090 */ 1091 @Override 1092 public List buildListOfDeletionAwareLists() { 1093 List managedLists = super.buildListOfDeletionAwareLists(); 1094 managedLists.add(getBudgetConstructionAppointmentFundingReason()); 1095 return managedLists; 1096 1097 } 1098 } 1099