org.kuali.hr.time.timeblock.service
Class TimeBlockServiceImpl

java.lang.Object
  extended by org.kuali.hr.time.timeblock.service.TimeBlockServiceImpl
All Implemented Interfaces:
TimeBlockService

public class TimeBlockServiceImpl
extends Object
implements TimeBlockService


Constructor Summary
TimeBlockServiceImpl()
           
 
Method Summary
 List<TimeBlock> buildTimeBlocks(Assignment assignment, String earnCode, TimesheetDocument timesheetDocument, Timestamp beginTimestamp, Timestamp endTimestamp, BigDecimal hours, BigDecimal amount, Boolean isClockLogCreated, Boolean isLunchDeleted)
          Build a TimeBlock with the given criteria
 List<TimeBlock> buildTimeBlocksSpanDates(Assignment assignment, String earnCode, TimesheetDocument timesheetDocument, Timestamp beginTimestamp, Timestamp endTimestamp, BigDecimal hours, BigDecimal amount, Boolean isClockLogCreated, Boolean isLunchDeleted, String spanningWeeks)
          Build a List of TimeBlocks over a span of multiple days
 TimeBlock createTimeBlock(TimesheetDocument timesheetDocument, Timestamp beginTime, Timestamp endTime, Assignment assignment, String earnCode, BigDecimal hours, BigDecimal amount, Boolean clockLogCreated, Boolean lunchDeleted)
          Create a TimeBlock for the given criteria
 List<TimeBlockHistory> createTimeBlockHistories(TimeBlock tb, String actionHistory)
           
 void deleteLunchDeduction(String tkTimeHourDetailId)
           
 void deleteTimeBlock(TimeBlock timeBlock)
          Delete a given TimeBlock
 void deleteTimeBlocksAssociatedWithDocumentId(String documentId)
           
 List<TimeBlock> getLatestEndTimestamp()
           
 List<TimeBlock> getOvernightTimeBlocks(String clockLogEndId)
          Get overnight timeblocks by the clock log begin id
 TimeBlock getTimeBlock(String tkTimeBlockId)
          Fetch a TimeBlock by a given ID
 List<TimeBlock> getTimeBlocks()
           
 List<TimeBlock> getTimeBlocks(String documentId)
          Get the List of TimeBlock of a given document id
 List<TimeBlock> getTimeBlocksForAssignment(Assignment assign)
          Get the List of TimeBlock of a given Assignment
 List<TimeBlock> getTimeBlocksForClockLogBeginId(String tkClockLogId)
           
 List<TimeBlock> getTimeBlocksForClockLogEndId(String tkClockLogId)
           
 List<TimeBlock> getTimeBlocksWithEarnCode(String earnCode, Date effDate)
           
 Boolean isTimeBlockEditable(TimeBlock tb)
           
 void resetTimeHourDetail(List<TimeBlock> origTimeBlocks)
          Reset the TimeHourDetail object associated with the TimeBlock object on a List of TimeBlocks
 void saveTimeBlocks(List<TimeBlock> tbList)
          Save a list of new TimeBlocks
 void saveTimeBlocks(List<TimeBlock> oldTimeBlocks, List<TimeBlock> newTimeBlocks)
          Save a list of new TimeBlocks does a comparison for the old versus the new and only saves changed/new/deleted TimeBlocks
 void setTimeBlockDao(TimeBlockDao timeBlockDao)
           
 void updateTimeBlock(TimeBlock tb)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

TimeBlockServiceImpl

public TimeBlockServiceImpl()
Method Detail

setTimeBlockDao

public void setTimeBlockDao(TimeBlockDao timeBlockDao)

buildTimeBlocksSpanDates

public List<TimeBlock> buildTimeBlocksSpanDates(Assignment assignment,
                                                String earnCode,
                                                TimesheetDocument timesheetDocument,
                                                Timestamp beginTimestamp,
                                                Timestamp endTimestamp,
                                                BigDecimal hours,
                                                BigDecimal amount,
                                                Boolean isClockLogCreated,
                                                Boolean isLunchDeleted,
                                                String spanningWeeks)
Description copied from interface: TimeBlockService
Build a List of TimeBlocks over a span of multiple days

Specified by:
buildTimeBlocksSpanDates in interface TimeBlockService
Returns:

buildTimeBlocks

public List<TimeBlock> buildTimeBlocks(Assignment assignment,
                                       String earnCode,
                                       TimesheetDocument timesheetDocument,
                                       Timestamp beginTimestamp,
                                       Timestamp endTimestamp,
                                       BigDecimal hours,
                                       BigDecimal amount,
                                       Boolean isClockLogCreated,
                                       Boolean isLunchDeleted)
Description copied from interface: TimeBlockService
Build a TimeBlock with the given criteria

Specified by:
buildTimeBlocks in interface TimeBlockService
Returns:

saveTimeBlocks

public void saveTimeBlocks(List<TimeBlock> oldTimeBlocks,
                           List<TimeBlock> newTimeBlocks)
Description copied from interface: TimeBlockService
Save a list of new TimeBlocks does a comparison for the old versus the new and only saves changed/new/deleted TimeBlocks

Specified by:
saveTimeBlocks in interface TimeBlockService

saveTimeBlocks

public void saveTimeBlocks(List<TimeBlock> tbList)
Description copied from interface: TimeBlockService
Save a list of new TimeBlocks

Specified by:
saveTimeBlocks in interface TimeBlockService

updateTimeBlock

public void updateTimeBlock(TimeBlock tb)
Specified by:
updateTimeBlock in interface TimeBlockService

createTimeBlock

public TimeBlock createTimeBlock(TimesheetDocument timesheetDocument,
                                 Timestamp beginTime,
                                 Timestamp endTime,
                                 Assignment assignment,
                                 String earnCode,
                                 BigDecimal hours,
                                 BigDecimal amount,
                                 Boolean clockLogCreated,
                                 Boolean lunchDeleted)
Description copied from interface: TimeBlockService
Create a TimeBlock for the given criteria

Specified by:
createTimeBlock in interface TimeBlockService
Returns:

getTimeBlock

public TimeBlock getTimeBlock(String tkTimeBlockId)
Description copied from interface: TimeBlockService
Fetch a TimeBlock by a given ID

Specified by:
getTimeBlock in interface TimeBlockService
Returns:

deleteTimeBlock

public void deleteTimeBlock(TimeBlock timeBlock)
Description copied from interface: TimeBlockService
Delete a given TimeBlock

Specified by:
deleteTimeBlock in interface TimeBlockService

resetTimeHourDetail

public void resetTimeHourDetail(List<TimeBlock> origTimeBlocks)
Description copied from interface: TimeBlockService
Reset the TimeHourDetail object associated with the TimeBlock object on a List of TimeBlocks

Specified by:
resetTimeHourDetail in interface TimeBlockService

createTimeBlockHistories

public List<TimeBlockHistory> createTimeBlockHistories(TimeBlock tb,
                                                       String actionHistory)
Specified by:
createTimeBlockHistories in interface TimeBlockService

getTimeBlocks

public List<TimeBlock> getTimeBlocks(String documentId)
Description copied from interface: TimeBlockService
Get the List of TimeBlock of a given document id

Specified by:
getTimeBlocks in interface TimeBlockService
Returns:

getTimeBlocksForAssignment

public List<TimeBlock> getTimeBlocksForAssignment(Assignment assign)
Description copied from interface: TimeBlockService
Get the List of TimeBlock of a given Assignment

Specified by:
getTimeBlocksForAssignment in interface TimeBlockService
Returns:
List

deleteTimeBlocksAssociatedWithDocumentId

public void deleteTimeBlocksAssociatedWithDocumentId(String documentId)
Specified by:
deleteTimeBlocksAssociatedWithDocumentId in interface TimeBlockService

isTimeBlockEditable

public Boolean isTimeBlockEditable(TimeBlock tb)
Specified by:
isTimeBlockEditable in interface TimeBlockService

getTimeBlocksForClockLogEndId

public List<TimeBlock> getTimeBlocksForClockLogEndId(String tkClockLogId)
Specified by:
getTimeBlocksForClockLogEndId in interface TimeBlockService

getTimeBlocksForClockLogBeginId

public List<TimeBlock> getTimeBlocksForClockLogBeginId(String tkClockLogId)
Specified by:
getTimeBlocksForClockLogBeginId in interface TimeBlockService

getTimeBlocks

public List<TimeBlock> getTimeBlocks()
Specified by:
getTimeBlocks in interface TimeBlockService

getLatestEndTimestamp

public List<TimeBlock> getLatestEndTimestamp()
Specified by:
getLatestEndTimestamp in interface TimeBlockService

getOvernightTimeBlocks

public List<TimeBlock> getOvernightTimeBlocks(String clockLogEndId)
Description copied from interface: TimeBlockService
Get overnight timeblocks by the clock log begin id

Specified by:
getOvernightTimeBlocks in interface TimeBlockService
Returns:

deleteLunchDeduction

public void deleteLunchDeduction(String tkTimeHourDetailId)
Specified by:
deleteLunchDeduction in interface TimeBlockService

getTimeBlocksWithEarnCode

public List<TimeBlock> getTimeBlocksWithEarnCode(String earnCode,
                                                 Date effDate)
Specified by:
getTimeBlocksWithEarnCode in interface TimeBlockService


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