org.kuali.kpme.tklm.leave.accrual.bucket
Class LeaveBalance

java.lang.Object
  extended by org.kuali.kpme.tklm.leave.accrual.bucket.LeaveBalance
All Implemented Interfaces:
LeaveBalanceContract
Direct Known Subclasses:
AccruedLeaveBalance, AvailableLeaveBalance, BasicLeaveBalance, CarryOverLeaveBalance, FmlaLeaveBalance, PendingLeaveBalance, UsageLimitBalance, YearToDateEarnedLeaveBalance, YearToDateUsageLeaveBalance

public abstract class LeaveBalance
extends Object
implements LeaveBalanceContract


Field Summary
protected  AccrualCategory accrualCategory
           
protected  org.joda.time.LocalDate asOfDate
           
protected  BigDecimal balance
           
protected  org.joda.time.LocalDate calendarPeriodBeginDate
           
protected  org.joda.time.LocalDate calendarPeriodEndDate
           
protected  PrincipalHRAttributes principalCalendar
           
 
Constructor Summary
protected LeaveBalance(AccrualCategory accrualCategory, PrincipalHRAttributes principalCalendar)
           
 
Method Summary
protected  void add(BigDecimal amount)
           
abstract  void add(LeaveBlock leaveBlock)
          A hook for adding leave blocks via leave calendar action
abstract  void adjust(LeaveBlock leaveBlock)
          A hook for editing leave blocks via leave calendar action
 void clear()
           
 AccrualCategory getAccrualCategory()
          The AccuralCategory object associated with the LeaveBalance
protected  AccrualCategoryRule getAccrualCategoryRuleForDate(org.joda.time.LocalDate leaveLocalDate)
           
 BigDecimal getBalance()
          The AccuralCategory object associated with the LeaveBalance
abstract  String getBalanceType()
          The balance type associated with the LeaveBalance
protected  EmployeeOverride getEmployeeOverride(LeaveBlock leaveBlock, String overrideType)
           
protected  void remove(BigDecimal amount)
           
abstract  void remove(LeaveBlock leaveBlock)
          A hook for removing leave blocks via leave calendar action
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

accrualCategory

protected AccrualCategory accrualCategory

principalCalendar

protected PrincipalHRAttributes principalCalendar

asOfDate

protected org.joda.time.LocalDate asOfDate

calendarPeriodBeginDate

protected org.joda.time.LocalDate calendarPeriodBeginDate

calendarPeriodEndDate

protected org.joda.time.LocalDate calendarPeriodEndDate

balance

protected BigDecimal balance
Constructor Detail

LeaveBalance

protected LeaveBalance(AccrualCategory accrualCategory,
                       PrincipalHRAttributes principalCalendar)
Method Detail

add

protected void add(BigDecimal amount)

remove

protected void remove(BigDecimal amount)

add

public abstract void add(LeaveBlock leaveBlock)
                  throws KPMEBalanceException
A hook for adding leave blocks via leave calendar action

Parameters:
leaveBlock - The leave block to be added to the bucket
Throws:
KPMEBalanceException

remove

public abstract void remove(LeaveBlock leaveBlock)
                     throws KPMEBalanceException
A hook for removing leave blocks via leave calendar action

Parameters:
leaveBlock -
Throws:
KPMEBalanceException

adjust

public abstract void adjust(LeaveBlock leaveBlock)
                     throws KPMEBalanceException
A hook for editing leave blocks via leave calendar action

Parameters:
leaveBlock -
Throws:
KPMEBalanceException

clear

public void clear()

getBalanceType

public abstract String getBalanceType()
Description copied from interface: LeaveBalanceContract
The balance type associated with the LeaveBalance

This is an abstract method that gets overridden in sub classes

Specified by:
getBalanceType in interface LeaveBalanceContract
Returns:

getBalance

public BigDecimal getBalance()
Description copied from interface: LeaveBalanceContract
The AccuralCategory object associated with the LeaveBalance

balance of a LeaveBalance

Specified by:
getBalance in interface LeaveBalanceContract
Returns:
balance for LeaveBalance

getAccrualCategoryRuleForDate

protected AccrualCategoryRule getAccrualCategoryRuleForDate(org.joda.time.LocalDate leaveLocalDate)

getEmployeeOverride

protected EmployeeOverride getEmployeeOverride(LeaveBlock leaveBlock,
                                               String overrideType)

getAccrualCategory

public AccrualCategory getAccrualCategory()
Description copied from interface: LeaveBalanceContract
The AccuralCategory object associated with the LeaveBalance

accrualCategory of a LeaveBalance

Specified by:
getAccrualCategory in interface LeaveBalanceContract
Returns:
accrualCategory for LeaveBalance


Copyright © 2004-2013 The Kuali Foundation. All Rights Reserved.