Class TimesheetEntitiesAggregate

java.lang.Object
overit.geocallapp.wfm.core.bl.timesheet.TimesheetEntitiesAggregate
All Implemented Interfaces:
Serializable

public class TimesheetEntitiesAggregate extends Object implements Serializable
An aggregate of all the entities that are strictly related and useful for a Timesheet.
See Also:
GCApi:
bo
  • Field Details

  • Constructor Details

    • TimesheetEntitiesAggregate

      public TimesheetEntitiesAggregate()
  • Method Details

    • createTimesheetEntitiesAggregate

      public static TimesheetEntitiesAggregate createTimesheetEntitiesAggregate(Timesheet timesheet)
    • getTimesheet

      public Timesheet getTimesheet()
    • setTimesheet

      public void setTimesheet(Timesheet timesheet)
    • getTimesheetShift

      public TimesheetShift getTimesheetShift(Long shift)
    • getTimesheetShifts

      public Collection<TimesheetShift> getTimesheetShifts()
    • addShift

      public void addShift(BOWorkShift shift, List<BOReceipt> receipts)
    • getShift

      public BOWorkShift getShift(Long shift)
    • getShifts

      public Collection<BOWorkShift> getShifts()
    • getTimesheetOnCallShift

      public TimesheetOnCallShift getTimesheetOnCallShift(Long onCallShift)
    • getTimesheetOnCallShifts

      public Collection<TimesheetOnCallShift> getTimesheetOnCallShifts()
    • addOnCallShift

      public void addOnCallShift(BOOnCallShift onCallShift)
    • getOnCallShift

      public BOOnCallShift getOnCallShift(Long onCallShift)
    • getOnCallShifts

      public Collection<BOOnCallShift> getOnCallShifts()
    • getUser

      public BOSchedulingUser getUser()
    • setUser

      public void setUser(BOSchedulingUser user)
    • getType

      public BOTimesheetType getType()
    • setType

      public void setType(BOTimesheetType type)
    • getState

      public BOTimesheetState getState()
    • setState

      public void setState(BOTimesheetState state)
    • getProfile

      public BOProfile getProfile()
    • setProfile

      public void setProfile(BOProfile profile)
    • getCategories

      public Map<Long,BOTaskCategory> getCategories()
    • addCategory

      public void addCategory(BOTaskCategory category)
    • clearCategories

      public void clearCategories()
    • getReceiptTypes

      public Map<Long,BOReceiptType> getReceiptTypes()
    • addReceiptType

      public void addReceiptType(BOReceiptType receiptType)
    • clearReceiptTypes

      public void clearReceiptTypes()
    • getShiftExceptionClasses

      public Map<Long,BOShiftExceptionClass> getShiftExceptionClasses()
    • addShiftExceptionClass

      public void addShiftExceptionClass(BOShiftExceptionClass shiftExceptionClass)
    • clearShiftExceptionClasses

      public void clearShiftExceptionClasses()
    • hasTimeImpact

      protected boolean hasTimeImpact(Long receiptTypeId)
    • isReceiptWithTimeImpact

      public Predicate<BOReceipt> isReceiptWithTimeImpact()
    • hasExceptionClassType

      protected boolean hasExceptionClassType(Long receiptTypeId, Long classTypeId)
    • isAbsenceReceipt

      public Predicate<BOReceipt> isAbsenceReceipt()
    • isPresenceReceipt

      public Predicate<BOReceipt> isPresenceReceipt()
    • getShiftsAvailability

      public Long getShiftsAvailability()
    • getShiftsBreak

      public Long getShiftsBreak()
    • getShiftsUnavailability

      public Long getShiftsUnavailability()
    • getOnCallShiftsDuration

      public Long getOnCallShiftsDuration()
    • getTasksWorking

      public Long getTasksWorking()
    • getTasksWorking

      public Long getTasksWorking(Long shift)
    • getTasksUnavailability

      public Long getTasksUnavailability()
    • getTasksUnavailability

      public Long getTasksUnavailability(Long shift)
    • getTasksBreak

      public Long getTasksBreak()
    • getTasksBreak

      public Long getTasksBreak(Long shift)
    • getTasksOnCallWorking

      public Long getTasksOnCallWorking()
    • getTasksOnCallWorking

      public Long getTasksOnCallWorking(Long onCallShift)
    • getTasksWithoutShiftWorking

      public Long getTasksWithoutShiftWorking()
    • isWorkingTask

      protected boolean isWorkingTask(BOTask task)
    • isUnavailabilityTask

      protected boolean isUnavailabilityTask(BOTask task)
    • isOnCallWorkingTask

      protected boolean isOnCallWorkingTask(BOTask task)
    • isOnCallTask

      protected boolean isOnCallTask(BOTask task)
    • isBreakTask

      protected boolean isBreakTask(BOTask task)
    • isAbsenceTask

      protected boolean isAbsenceTask(BOTask task)
    • getActiveTaskRanges

      public List<overit.geocallapp.wfm.util.timeline.TimeLineRange> getActiveTaskRanges()
      Builds a new timeline with the timesheet tasks and extracts the ranges.
      Returns:
      the ranges defined by the tasks
    • getActiveShiftTaskRanges

      public List<overit.geocallapp.wfm.util.timeline.TimeLineRange> getActiveShiftTaskRanges(Long shift)
      Builds a new timeline with the timesheet tasks of the given shift and extracts the ranges.
      Parameters:
      shift - shift id
      Returns:
      the ranges defined by then tasks of the shift
    • getTaskRanges

      protected List<overit.geocallapp.wfm.util.timeline.TimeLineRange> getTaskRanges(List<BOTask> tasks)
    • getOverlappedTasks

      public List<BOTask> getOverlappedTasks(overit.geocallapp.wfm.util.timeline.TimeLineRange range)
      Returns the list of the overlapped tasks within a range.
      Parameters:
      range - the task range
      Returns:
      the list of the overlapped tasks
    • getTaskPriority

      protected Long getTaskPriority(BOTask task)
    • getMaxPriorityTask

      public Optional<BOTask> getMaxPriorityTask(List<BOTask> tasks)
      Returns the max priority task of the given list.
      If the input list is empty or the max priority task is not unique, returns an empty Optional instance.
      Parameters:
      tasks - the list of the tasks
      Returns:
      the max priority task
    • isBlockingWarningType

      public boolean isBlockingWarningType(Long warningType)
    • isBlockingWarning

      public Predicate<BOWarning> isBlockingWarning()
    • isBlockingWarning

      public boolean isBlockingWarning(Long warning)
    • hasBlockingWarnings

      public boolean hasBlockingWarnings()
    • getInterventionIds

      public List<Long> getInterventionIds()