Package org.goplanit.service.routed
Class RoutedTripImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.service.routed.RoutedTripImpl
-
- All Implemented Interfaces:
Comparable<IdAble>,ExternalIdAble,IdAble,ManagedId,RoutedTrip
- Direct Known Subclasses:
RoutedTripFrequencyImpl,RoutedTripScheduleImpl
public abstract class RoutedTripImpl extends ExternalIdAbleImpl implements RoutedTrip
Implementation of a RoutedTrip interface. Acts as a base class for derived implementations that are not abstract- Author:
- markr
-
-
Field Summary
-
Fields inherited from interface org.goplanit.utils.service.routed.RoutedTrip
ROUTED_TRIP_ID_CLASS
-
-
Constructor Summary
Constructors Constructor Description RoutedTripImpl(RoutedTripImpl routedTripImpl, boolean deepCopy)Copy constructorRoutedTripImpl(IdGroupingToken tokenId)Constructor
-
Method Summary
All Methods Static Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description abstract RoutedTripImpldeepClone()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.protected static longgenerateId(IdGroupingToken tokenId)Generate id for instances of this class based on the token and class identifierlongrecreateManagedIds(IdGroupingToken tokenId)recreate the internal id(s) and set them including the Idable idabstract RoutedTripImplshallowClone()Create a shallow copy of this entity-
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
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
appendExternalId, appendExternalId, getExternalId, getIdsAsString, getSplitExternalId, getSplitExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
resetChildManagedIdEntities
-
Methods inherited from interface org.goplanit.utils.service.routed.RoutedTrip
getIdClass, getUsedServiceNodes
-
-
-
-
Constructor Detail
-
RoutedTripImpl
public RoutedTripImpl(IdGroupingToken tokenId)
Constructor- Parameters:
tokenId- to use for id generation
-
RoutedTripImpl
public RoutedTripImpl(RoutedTripImpl routedTripImpl, boolean deepCopy)
Copy constructor- Parameters:
routedTripImpl- to copydeepCopy- 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
-
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 (may be null in case managed id entity does not rely on token to recreate its managed id(s))- Returns:
- the updated internal id
-
shallowClone
public abstract RoutedTripImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein interfaceRoutedTrip- Overrides:
shallowClonein classExternalIdAbleImpl- Returns:
- shallow copy of entity
-
deepClone
public abstract RoutedTripImpl 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:
deepClonein interfaceIdAble- Specified by:
deepClonein interfaceRoutedTrip- Overrides:
deepClonein classExternalIdAbleImpl- Returns:
- deep copy of entity
-
-