org.kuali.kpme.tklm.time.rules.shiftdifferential.service
Class ShiftDifferentialRuleServiceImpl

java.lang.Object
  extended by org.kuali.kpme.tklm.time.rules.shiftdifferential.service.ShiftDifferentialRuleServiceImpl
All Implemented Interfaces:
ShiftDifferentialRuleService

public class ShiftDifferentialRuleServiceImpl
extends Object
implements ShiftDifferentialRuleService


Constructor Summary
ShiftDifferentialRuleServiceImpl()
           
 
Method Summary
protected  void applyPremium(org.joda.time.Interval shift, List<org.joda.time.Interval> blockIntervals, List<TimeBlock> blocks, List<TimeBlock> previousBlocks, BigDecimal initialHours, BigDecimal hours, String earnCode, ShiftDifferentialRule rule)
           
 List<ShiftDifferentialRule> getShiftDifferentalRules(String location, String hrSalGroup, String payGrade, String pyCalendarGroup, org.joda.time.LocalDate asOfDate)
          Fetch a given ShiftDifferentialRule based on criteria passed in
 ShiftDifferentialRule getShiftDifferentialRule(String tkShiftDifferentialRuleId)
          Fetch a ShiftDifferentialRule object for a given id
 List<ShiftDifferentialRule> getShiftDifferentialRules(String userPrincipalId, String location, String hrSalGroup, String payGrade, org.joda.time.LocalDate fromEffdt, org.joda.time.LocalDate toEffdt, String active, String showHist)
           
 void processShiftDifferentialRules(TimesheetDocument timesheetDocument, TkTimeBlockAggregate aggregate)
          Process a given TkTimeBlockAggregate with appropriate shift differential rules
 void saveOrUpdate(List<ShiftDifferentialRule> shiftDifferentialRules)
          Save or Update List of ShiftDifferentialRule objects
 void saveOrUpdate(ShiftDifferentialRule shiftDifferentialRule)
          Save or Update a ShiftDifferentialRule object
 void setShiftDifferentialRuleDao(ShiftDifferentialRuleDao shiftDifferentialRuleDao)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ShiftDifferentialRuleServiceImpl

public ShiftDifferentialRuleServiceImpl()
Method Detail

processShiftDifferentialRules

public void processShiftDifferentialRules(TimesheetDocument timesheetDocument,
                                          TkTimeBlockAggregate aggregate)
Description copied from interface: ShiftDifferentialRuleService
Process a given TkTimeBlockAggregate with appropriate shift differential rules

Specified by:
processShiftDifferentialRules in interface ShiftDifferentialRuleService

getShiftDifferentialRules

public List<ShiftDifferentialRule> getShiftDifferentialRules(String userPrincipalId,
                                                             String location,
                                                             String hrSalGroup,
                                                             String payGrade,
                                                             org.joda.time.LocalDate fromEffdt,
                                                             org.joda.time.LocalDate toEffdt,
                                                             String active,
                                                             String showHist)
Specified by:
getShiftDifferentialRules in interface ShiftDifferentialRuleService

applyPremium

protected void applyPremium(org.joda.time.Interval shift,
                            List<org.joda.time.Interval> blockIntervals,
                            List<TimeBlock> blocks,
                            List<TimeBlock> previousBlocks,
                            BigDecimal initialHours,
                            BigDecimal hours,
                            String earnCode,
                            ShiftDifferentialRule rule)
Parameters:
shift - The shift interval - need to examine the time block to determine how many hours are eligible per block.
blockIntervals - Intervals for each block present in the blocks list. Passed here to avoid re computation.
blocks - The blocks we are applying hours to.
previousBlocks - If present, this is the list of time blocks from a previous "day", on which the initial hours (from previous day) should be placed.
initialHours - hours accumulated from a previous boundary that need to be applied here (NOT SUBJECT TO INTERVAL)
hours - hours to apply
earnCode - what earn code to create time hour detail entry for.

setShiftDifferentialRuleDao

public void setShiftDifferentialRuleDao(ShiftDifferentialRuleDao shiftDifferentialRuleDao)

getShiftDifferentialRule

public ShiftDifferentialRule getShiftDifferentialRule(String tkShiftDifferentialRuleId)
Description copied from interface: ShiftDifferentialRuleService
Fetch a ShiftDifferentialRule object for a given id

Specified by:
getShiftDifferentialRule in interface ShiftDifferentialRuleService
Returns:

getShiftDifferentalRules

public List<ShiftDifferentialRule> getShiftDifferentalRules(String location,
                                                            String hrSalGroup,
                                                            String payGrade,
                                                            String pyCalendarGroup,
                                                            org.joda.time.LocalDate asOfDate)
Description copied from interface: ShiftDifferentialRuleService
Fetch a given ShiftDifferentialRule based on criteria passed in

Specified by:
getShiftDifferentalRules in interface ShiftDifferentialRuleService
Returns:

saveOrUpdate

public void saveOrUpdate(List<ShiftDifferentialRule> shiftDifferentialRules)
Description copied from interface: ShiftDifferentialRuleService
Save or Update List of ShiftDifferentialRule objects

Specified by:
saveOrUpdate in interface ShiftDifferentialRuleService

saveOrUpdate

public void saveOrUpdate(ShiftDifferentialRule shiftDifferentialRule)
Description copied from interface: ShiftDifferentialRuleService
Save or Update a ShiftDifferentialRule object

Specified by:
saveOrUpdate in interface ShiftDifferentialRuleService


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