org.kuali.hr.time.overtime.weekly.rule.service
Class WeeklyOvertimeRuleServiceImpl

java.lang.Object
  extended by org.kuali.hr.time.overtime.weekly.rule.service.WeeklyOvertimeRuleServiceImpl
All Implemented Interfaces:
WeeklyOvertimeRuleService

public class WeeklyOvertimeRuleServiceImpl
extends Object
implements WeeklyOvertimeRuleService


Constructor Summary
WeeklyOvertimeRuleServiceImpl()
           
 
Method Summary
protected  BigDecimal applyOvertimeToTimeBlock(TimeBlock block, String otEarnCode, Set<String> convertFromEarnCodes, BigDecimal otHours)
          Method to apply (if applicable) overtime additions to the indiciated TimeBlock.
protected  String getOvertimeEarnCode(String principalId, TimeBlock block, WeeklyOvertimeRule wor, Date asOfDate)
          If a WorkArea for this timeblock has an overtime preference use that otherwise use the convert to on the rule.
 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
 void saveOrUpdate(List<WeeklyOvertimeRule> weeklyOvertimeRules)
          Save or Update a List of WeeklyOvertimeRules
 void saveOrUpdate(WeeklyOvertimeRule weeklyOvertimeRule)
          Save or Update a given WeeklyOvertimeRule
 void setWeeklyOvertimeRuleDao(WeeklyOvertimeRuleDao weeklyOvertimeRuleDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

WeeklyOvertimeRuleServiceImpl

public WeeklyOvertimeRuleServiceImpl()
Method Detail

processWeeklyOvertimeRule

public void processWeeklyOvertimeRule(TimesheetDocument timesheetDocument,
                                      TkTimeBlockAggregate aggregate)
Description copied from interface: WeeklyOvertimeRuleService
Process weekly overtime rules for a given TkTimeBlockAggregate

Specified by:
processWeeklyOvertimeRule in interface WeeklyOvertimeRuleService

getOvertimeEarnCode

protected String getOvertimeEarnCode(String principalId,
                                     TimeBlock block,
                                     WeeklyOvertimeRule wor,
                                     Date asOfDate)
If a WorkArea for this timeblock has an overtime preference use that otherwise use the convert to on the rule.

Parameters:
principalId -
block -
wor -
asOfDate -
Returns:

applyOvertimeToTimeBlock

protected BigDecimal applyOvertimeToTimeBlock(TimeBlock block,
                                              String otEarnCode,
                                              Set<String> convertFromEarnCodes,
                                              BigDecimal otHours)
Method to apply (if applicable) overtime additions to the indiciated TimeBlock. TimeBlock earn code is checked against the convertFromEarnCodes Set.

Parameters:
block -
otEarnCode -
convertFromEarnCodes -
otHours -
Returns:
The amount of overtime hours remaining to be applied. (BigDecimal is immutable)

getWeeklyOvertimeRules

public List<WeeklyOvertimeRule> getWeeklyOvertimeRules(Date asOfDate)
Description copied from interface: WeeklyOvertimeRuleService
Fetch a List of WeeklyOvertimeRule as of a particular date

Specified by:
getWeeklyOvertimeRules in interface WeeklyOvertimeRuleService
Returns:

saveOrUpdate

public void saveOrUpdate(WeeklyOvertimeRule weeklyOvertimeRule)
Description copied from interface: WeeklyOvertimeRuleService
Save or Update a given WeeklyOvertimeRule

Specified by:
saveOrUpdate in interface WeeklyOvertimeRuleService

saveOrUpdate

public void saveOrUpdate(List<WeeklyOvertimeRule> weeklyOvertimeRules)
Description copied from interface: WeeklyOvertimeRuleService
Save or Update a List of WeeklyOvertimeRules

Specified by:
saveOrUpdate in interface WeeklyOvertimeRuleService

setWeeklyOvertimeRuleDao

public void setWeeklyOvertimeRuleDao(WeeklyOvertimeRuleDao weeklyOvertimeRuleDao)

getWeeklyOvertimeRule

public WeeklyOvertimeRule getWeeklyOvertimeRule(String tkWeeklyOvertimeRuleId)
Description copied from interface: WeeklyOvertimeRuleService
Fetch Weekly overtime rule by id

Specified by:
getWeeklyOvertimeRule in interface WeeklyOvertimeRuleService
Returns:


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