Package org.goplanit.service.routed
Class RoutedTripDeparture
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.service.routed.RoutedTripDeparture
-
- All Implemented Interfaces:
Cloneable,Comparable<IdAble>,ExternalIdAble,IdAble,ManagedId
public class RoutedTripDeparture extends ExternalIdAbleImpl implements ManagedId
A representation of a departure within a routed trip- Author:
- markr
-
-
Field Summary
Fields Modifier and Type Field Description static Class<RoutedTripDeparture>ROUTED_TRIP_DEPARTURE_ID_CLASSid class for generating ids
-
Constructor Summary
Constructors Constructor Description RoutedTripDeparture(RoutedTripDeparture routedTripDeparture)Copy constructorRoutedTripDeparture(IdGroupingToken tokenId, LocalTime departureTime)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description RoutedTripDepartureclone()Create a shallow copy of this entityprotected static longgenerateId(IdGroupingToken tokenId)Generate id for instances of this class based on the token and class identifierClass<RoutedTripDeparture>getIdClass()Each managed id class is expected to generate its ids based on its class signature.longrecreateManagedIds(IdGroupingToken tokenId)recreate the internal id(s) and set them including the Idable id-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, generateId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
hasExternalId, hasXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
resetChildManagedIdEntities
-
-
-
-
Field Detail
-
ROUTED_TRIP_DEPARTURE_ID_CLASS
public static final Class<RoutedTripDeparture> ROUTED_TRIP_DEPARTURE_ID_CLASS
id class for generating ids
-
-
Constructor Detail
-
RoutedTripDeparture
public RoutedTripDeparture(IdGroupingToken tokenId, LocalTime departureTime)
Constructor- Parameters:
tokenId- to use for id generationdepartureTime- to use
-
RoutedTripDeparture
public RoutedTripDeparture(RoutedTripDeparture routedTripDeparture)
Copy constructor- Parameters:
routedTripDeparture- to copy
-
-
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:
getIdClassin interfaceManagedId- 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:
recreateManagedIdsin interfaceManagedId- Parameters:
tokenId- to use- Returns:
- the updated internal id
-
clone
public RoutedTripDeparture clone()
Create a shallow copy of this entity- Specified by:
clonein interfaceIdAble- Overrides:
clonein classExternalIdAbleImpl- Returns:
- shallow copy of entity
-
-