Class RoutedTripDepartureImpl

    • Constructor Detail

      • RoutedTripDepartureImpl

        public RoutedTripDepartureImpl​(IdGroupingToken tokenId,
                                       ExtendedLocalTime departureTime)
        Constructor
        Parameters:
        tokenId - to use for id generation
        departureTime - to use
      • RoutedTripDepartureImpl

        public RoutedTripDepartureImpl​(RoutedTripDepartureImpl routedTripDeparture,
                                       boolean deepCopy)
        Copy constructor
        Parameters:
        routedTripDeparture - to copy
        deepCopy - when true, create a deep copy, shallow copy otherwise
    • Method Detail

      • generateId

        protected static long generateId​(IdGroupingToken tokenId)
        Generate id for instances of this class based on the token and class identifier
        Parameters:
        tokenId - to use
        Returns:
        generated id
      • getIdClass

        public Class<RoutedTripDeparture> getIdClass()
        Each managed id class is expected to generate its ids based on its class signature. To be able to generate the correct id the class used for id generation is to be provided via this method call.
        Specified by:
        getIdClass in interface ManagedId
        Specified by:
        getIdClass in interface RoutedTripDeparture
        Returns:
        idClass to use for generating ids for instances of this idable derived class
      • recreateManagedIds

        public long recreateManagedIds​(IdGroupingToken tokenId)
        recreate the internal id(s) and set them including the Idable id
        Specified by:
        recreateManagedIds in interface ManagedId
        Parameters:
        tokenId - to use (may be null in case managed id entity does not rely on token to recreate its managed id(s))
        Returns:
        the updated internal id
      • deepClone

        public RoutedTripDepartureImpl deepClone()
        An id entity should always support a deep copy, i.e., all "owned" members will be deep copied when a clone of this instance is created via this call. To be used with caution if not called by managed id container related code
        Specified by:
        deepClone in interface IdAble
        Specified by:
        deepClone in interface RoutedTripDeparture
        Overrides:
        deepClone in class ExternalIdAbleImpl
        Returns:
        deep copy of entity
      • departLater

        public void departLater​(LocalTime departureTimeIncrease)
        Depart later by the given amount
        Specified by:
        departLater in interface RoutedTripDeparture
        Parameters:
        departureTimeIncrease - to apply
      • departEarlier

        public void departEarlier​(LocalTime departureTimeDecrease)
        Depart earlier by the given amount
        Specified by:
        departEarlier in interface RoutedTripDeparture
        Parameters:
        departureTimeDecrease - to apply