java.lang.Object
overit.geocallapp.wfm.orchestrator.scheduling.bl.schedulingteam.SchedulingTeamResource
All Implemented Interfaces:
Serializable

public class SchedulingTeamResource extends Object implements Serializable
Object that contains all the required information about a resource of a team
Since:
18.0
See Also:
  • Constructor Details

    • SchedulingTeamResource

      public SchedulingTeamResource()
  • Method Details

    • setPoolKit

      protected void setPoolKit(PoolKit poolKit)
      Parameters:
      poolKit - the poolKit to set
    • getIntegrationService

      protected SchedulingIntegrationService getIntegrationService() throws DAValidateException
      Throws:
      DAValidateException
    • getResource

      public BOResource getResource()
      Gets the resource.
      Returns:
      the resource
    • setResource

      public void setResource(BOResource resource)
      Sets the resource.
      Parameters:
      resource - the new resource
    • getWorkShift

      public BOWorkShift getWorkShift()
      Returns:
      the workShift
    • setWorkShift

      public void setWorkShift(BOWorkShift workShift)
      Sets the work shift.
      Parameters:
      workShift - the new work shift
    • getWorkShiftSchedulings

      public List<BOScheduling> getWorkShiftSchedulings()
      Gets the work shift schedulings.
      Returns:
      the work shift schedulings
    • setWorkShiftSchedulings

      public void setWorkShiftSchedulings(List<BOScheduling> workShiftSchedulings)
      Sets the work shift schedulings.
      Parameters:
      workShiftSchedulings - the new work shift schedulings
    • getStartCoordinate

      public org.locationtech.jts.geom.Coordinate getStartCoordinate()
      Returns:
      the start coordinate of the working day
    • setStartCoordinate

      public void setStartCoordinate(org.locationtech.jts.geom.Coordinate startCoordinate)
      Parameters:
      startCoordinate - the startCoordiante to set
    • getEndCoordinate

      public org.locationtech.jts.geom.Coordinate getEndCoordinate()
      Returns:
      the endCoordiante
    • setEndCoordinate

      public void setEndCoordinate(org.locationtech.jts.geom.Coordinate endCoordinate)
      Parameters:
      endCoordinate - the endCoordiante to set
    • getLastSchedulingPosition

      public int getLastSchedulingPosition()
      Returns the position of the last scheduling
    • getPreviousScheduling

      public BOScheduling getPreviousScheduling()
      Returns:
      the previous scheduling
    • getPreviousSchedulingPosition

      public int getPreviousSchedulingPosition()
      Returns:
      the position of the previous scheduling
    • setPreviousSchedulingPosition

      public void setPreviousSchedulingPosition(int previousSchedulingPosition)
      Parameters:
      previousSchedulingPosition - the previous scheduling position to set
    • getNextScheduling

      public BOScheduling getNextScheduling()
      Returns:
      the next scheduling
    • getNextSchedulingPosition

      public int getNextSchedulingPosition()
      Returns:
      the nextSchedulingPosition
    • setNextSchedulingPosition

      public void setNextSchedulingPosition(int nextSchedulingPosition)
      Parameters:
      nextSchedulingPosition - the nextSchedulingPosition to set
    • setCurrentScheduling

      public void setCurrentScheduling(Long idCurrentScheduling)
      Sets the current scheduling position starting from the scheduling id,
      and update also the previous/next positions.
      Parameters:
      idCurrentScheduling - the current scheduling.
    • getCurrentScheduling

      public BOScheduling getCurrentScheduling()
      Returns:
      the current scheduling
    • getCurrentSchedulingPosition

      public int getCurrentSchedulingPosition()
      Returns:
      the currentSchedulingPosition
    • setCurrentSchedulingPosition

      public void setCurrentSchedulingPosition(int currentSchedulingPosition)
      Parameters:
      currentSchedulingPosition - the currentSchedulingPosition to set
    • getTravelData

      public ActivityTravelData getTravelData()
      Returns:
      the travelData
    • isWorksInTeam

      public boolean isWorksInTeam()
      Returns:
      the worksInTeam
    • setWorksInTeam

      public void setWorksInTeam(boolean worksInTeam)
      Parameters:
      worksInTeam - the worksInTeam to set
    • getTeamShift

      public BOTeamShift getTeamShift()
      Returns:
      the teamShift
    • setTeamShift

      public void setTeamShift(BOTeamShift teamShift)
      Parameters:
      teamShift - the teamShift to set
    • getWorkTeam

      public BOTeam getWorkTeam()
      Returns:
      the workTeam
    • setWorkTeam

      public void setWorkTeam(BOTeam workTeam)
      Parameters:
      workTeam - the workTeam to set
    • getCrewShell

      public BOCrewShell getCrewShell()
      Returns:
      the crewShell
    • setCrewShell

      public void setCrewShell(BOCrewShell crewShell)
      Parameters:
      crewShell - the crewShell to set
    • getCrewShellComposition

      public BOCrewShellComposition getCrewShellComposition()
      Returns:
      the crewShellComposition
    • setCrewShellComposition

      public void setCrewShellComposition(BOCrewShellComposition crewShellComposition)
      Parameters:
      crewShellComposition - the crewShellComposition to set
    • loadWorkShiftSchedulings

      public void loadWorkShiftSchedulings() throws DAValidateException, DAException
      Loads the schedulings of the work shift, ordered by execution order.
      Throws:
      DAValidateException - the DA validate exception
      DAException - the DA exception
    • loadTeamShift

      protected void loadTeamShift() throws DAValidateException, DAException
      Loads the BOTeamShift and the BOTeam of the resource for the workshift day
      Throws:
      DAValidateException
      DAException
    • calculateResourcesCoordinates

      public void calculateResourcesCoordinates() throws DAValidateException, DAException
      Calculate the starting coordinate of the day.
      Throws:
      DAException
      DAValidateException
    • calculateResourceStartCoordinate

      protected org.locationtech.jts.geom.Coordinate calculateResourceStartCoordinate() throws DAValidateException, DAException
      Calculate the resource start coordinate using the team configuration and work shift
      Returns:
      Throws:
      DAValidateException
      DAException
    • calculateResourceEndCoordinate

      protected org.locationtech.jts.geom.Coordinate calculateResourceEndCoordinate() throws DAValidateException, DAException
      Calculate the resource end coordinate using the team configuration and workshift
      Returns:
      Throws:
      DAValidateException
      DAException
    • calculateExpectedArrivalHour

      protected void calculateExpectedArrivalHour() throws DAException, DAValidateException
      Calculates the arrival hour for the input SchedulingTeamResource
      Throws:
      DAException
      DAValidateException
    • getResourceStartWorkDate

      protected Date getResourceStartWorkDate(Long workshift) throws DAValidateException, DAException
      Return the start working time of a resource evaluating his work shift
      Parameters:
      workshift - the resource's work shift
      Returns:
      the start working time of a resource in the input work shift
      Throws:
      DAValidateException
      DAException
    • getScheduledActivityAddress

      protected Long getScheduledActivityAddress(BOScheduling scheduling) throws DAValidateException, DAException
      Returns the address Id of the input scheduling
      Parameters:
      scheduling - the BOScheduling
      Returns:
      the address Id of the input scheduling
      Throws:
      DAValidateException
      DAException
    • toString

      public String toString()
      Overrides:
      toString in class Object