|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.kuali.hr.time.overtime.weekly.rule.service.WeeklyOvertimeRuleServiceImpl
public class WeeklyOvertimeRuleServiceImpl
Constructor Summary | |
---|---|
WeeklyOvertimeRuleServiceImpl()
|
Method Summary | |
---|---|
protected BigDecimal |
applyNegativeOvertimeOnTimeBlock(TimeBlock timeBlock,
String overtimeEarnCode,
Set<String> convertFromEarnCodes,
BigDecimal overtimeHours)
Applies overtime subtractions on the indicated TimeBlock. |
protected void |
applyNegativeOvertimeToFlsaWeek(List<FlsaDay> flsaDays,
WeeklyOvertimeRule weeklyOvertimeRule,
Date asOfDate,
Set<String> convertFromEarnCodes,
BigDecimal overtimeHours)
Applies negative overtime to the given FlsaDays. |
protected void |
applyOvertimeToFlsaWeeks(List<FlsaWeek> flsaWeeks,
WeeklyOvertimeRule weeklyOvertimeRule,
Date asOfDate,
Set<String> convertFromEarnCodes,
BigDecimal overtimeHours)
Applies overtime to the given FlsaWeeks. |
protected BigDecimal |
applyPositiveOvertimeOnTimeBlock(TimeBlock timeBlock,
String overtimeEarnCode,
Set<String> convertFromEarnCodes,
BigDecimal overtimeHours)
Applies overtime additions to the indicated TimeBlock. |
protected void |
applyPositiveOvertimeToFlsaWeek(List<FlsaDay> flsaDays,
WeeklyOvertimeRule weeklyOvertimeRule,
Date asOfDate,
Set<String> convertFromEarnCodes,
BigDecimal overtimeHours)
Applies positive overtime to the given FlsaDays. |
protected List<FlsaDay> |
getFlsaDays(List<FlsaWeek> flsaWeeks)
Gets the list of FlsaDays in the given FlsaWeek. |
protected List<List<FlsaWeek>> |
getFlsaWeeks(String principalId,
Date beginDate,
Date endDate,
TkTimeBlockAggregate aggregate)
Get the list of all FlsaWeek lists for this period. |
protected BigDecimal |
getMaxHours(List<FlsaWeek> flsaWeeks,
Set<String> maxHoursEarnCodes)
Get the maximum worked hours for the given FlsaWeeks. |
protected String |
getOvertimeEarnCode(WeeklyOvertimeRule weeklyOvertimeRule,
TimeBlock timeBlock,
Date asOfDate)
Returns the overtime EarnCode. |
protected TimeHourDetail |
getTimeHourDetailByEarnCode(List<TimeHourDetail> timeHourDetails,
Collection<String> earnCodes)
|
WeeklyOvertimeRule |
getWeeklyOvertimeRule(String tkWeeklyOvertimeRuleId)
Fetch Weekly overtime rule by id |
List<WeeklyOvertimeRule> |
getWeeklyOvertimeRules(Date asOfDate)
Fetch a List of WeeklyOvertimeRule as of a particular date |
void |
processWeeklyOvertimeRule(TimesheetDocument timesheetDocument,
TkTimeBlockAggregate aggregate)
Process weekly overtime rules for a given TkTimeBlockAggregate |
protected void |
removeEmptyOvertime(List<FlsaDay> flsaDays,
WeeklyOvertimeRule weeklyOvertimeRule,
Date asOfDate)
|
void |
saveOrUpdate(List<WeeklyOvertimeRule> weeklyOvertimeRules)
Save or Update a List of WeeklyOvertimeRules |
void |
saveOrUpdate(WeeklyOvertimeRule weeklyOvertimeRule)
Save or Update a given WeeklyOvertimeRule |
protected void |
savePreviousNextCalendarTimeBlocks(List<List<FlsaWeek>> flsaWeeks)
Saves the TimeBlocks from both the previous and next CalendarEntries, since these are not saved automatically by calling methods. |
void |
setWeeklyOvertimeRuleDao(WeeklyOvertimeRuleDao weeklyOvertimeRuleDao)
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public WeeklyOvertimeRuleServiceImpl()
Method Detail |
---|
public void processWeeklyOvertimeRule(TimesheetDocument timesheetDocument, TkTimeBlockAggregate aggregate)
WeeklyOvertimeRuleService
processWeeklyOvertimeRule
in interface WeeklyOvertimeRuleService
protected List<List<FlsaWeek>> getFlsaWeeks(String principalId, Date beginDate, Date endDate, TkTimeBlockAggregate aggregate)
principalId
- The principal id to apply the rules tobeginDate
- The begin date of the CalendarEntryendDate
- The end date of the CalendarEntryaggregate
- The aggregate of the applicable TimeBlocks
protected BigDecimal getMaxHours(List<FlsaWeek> flsaWeeks, Set<String> maxHoursEarnCodes)
flsaWeeks
- The FlsaWeeks to get the hours frommaxHoursEarnCodes
- The EarnCodes used to determine what is applicable as a max hour
protected String getOvertimeEarnCode(WeeklyOvertimeRule weeklyOvertimeRule, TimeBlock timeBlock, Date asOfDate)
weeklyOvertimeRule
- The WeeklyOvertimeRule to use when calculating the overtime EarnCodetimeBlock
- The TimeBlock to use when calculating the overtime EarnCodeasOfDate
- The effectiveDate of the WorkArea
protected void applyOvertimeToFlsaWeeks(List<FlsaWeek> flsaWeeks, WeeklyOvertimeRule weeklyOvertimeRule, Date asOfDate, Set<String> convertFromEarnCodes, BigDecimal overtimeHours)
flsaWeeks
- The FlsaWeeks to apply the overtime toweeklyOvertimeRule
- The WeeklyOvertimeRule in effectiveasOfDate
- The effectiveDate of the WorkAreaconvertFromEarnCodes
- The EarnCodes to convert to overtimeovertimeHours
- The number of overtime hours to applyprotected List<FlsaDay> getFlsaDays(List<FlsaWeek> flsaWeeks)
flsaWeeks
- The FlsaWeek to fetch the FlsaDays from
protected void applyPositiveOvertimeToFlsaWeek(List<FlsaDay> flsaDays, WeeklyOvertimeRule weeklyOvertimeRule, Date asOfDate, Set<String> convertFromEarnCodes, BigDecimal overtimeHours)
flsaDays
- The FlsaDays to apply the overtime toweeklyOvertimeRule
- The WeeklyOvertimeRule in effectiveasOfDate
- The effectiveDate of the WorkAreaconvertFromEarnCodes
- The EarnCodes to convert to overtimeovertimeHours
- The number of overtime hours to applyprotected void applyNegativeOvertimeToFlsaWeek(List<FlsaDay> flsaDays, WeeklyOvertimeRule weeklyOvertimeRule, Date asOfDate, Set<String> convertFromEarnCodes, BigDecimal overtimeHours)
flsaDays
- The FlsaDays to apply the overtime toweeklyOvertimeRule
- The WeeklyOvertimeRule in effectiveasOfDate
- The effectiveDate of the WorkAreaconvertFromEarnCodes
- The EarnCodes to convert to overtimeovertimeHours
- The number of overtime hours to applyprotected void removeEmptyOvertime(List<FlsaDay> flsaDays, WeeklyOvertimeRule weeklyOvertimeRule, Date asOfDate)
protected BigDecimal applyPositiveOvertimeOnTimeBlock(TimeBlock timeBlock, String overtimeEarnCode, Set<String> convertFromEarnCodes, BigDecimal overtimeHours)
timeBlock
- The time block to apply the overtime on.overtimeEarnCode
- The overtime earn code to apply overtime to.convertFromEarnCodes
- The other earn codes on the time block.overtimeHours
- The overtime hours to apply.
protected BigDecimal applyNegativeOvertimeOnTimeBlock(TimeBlock timeBlock, String overtimeEarnCode, Set<String> convertFromEarnCodes, BigDecimal overtimeHours)
timeBlock
- The time block to reset the overtime on.overtimeEarnCode
- The overtime earn code to apply overtime to.convertFromEarnCodes
- The other earn codes on the time block.overtimeHours
- The overtime hours to apply.
protected TimeHourDetail getTimeHourDetailByEarnCode(List<TimeHourDetail> timeHourDetails, Collection<String> earnCodes)
protected void savePreviousNextCalendarTimeBlocks(List<List<FlsaWeek>> flsaWeeks)
flsaWeeks
- The list of FlsaWeek listspublic List<WeeklyOvertimeRule> getWeeklyOvertimeRules(Date asOfDate)
WeeklyOvertimeRuleService
getWeeklyOvertimeRules
in interface WeeklyOvertimeRuleService
public void saveOrUpdate(WeeklyOvertimeRule weeklyOvertimeRule)
WeeklyOvertimeRuleService
saveOrUpdate
in interface WeeklyOvertimeRuleService
public void saveOrUpdate(List<WeeklyOvertimeRule> weeklyOvertimeRules)
WeeklyOvertimeRuleService
saveOrUpdate
in interface WeeklyOvertimeRuleService
public void setWeeklyOvertimeRuleDao(WeeklyOvertimeRuleDao weeklyOvertimeRuleDao)
public WeeklyOvertimeRule getWeeklyOvertimeRule(String tkWeeklyOvertimeRuleId)
WeeklyOvertimeRuleService
getWeeklyOvertimeRule
in interface WeeklyOvertimeRuleService
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |