Package org.goplanit.utils.id
Class ExternalIdAbleImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- All Implemented Interfaces:
Comparable<IdAble>,ExternalIdAble,IdAble
- Direct Known Subclasses:
ConnectoidImpl,GraphEntityImpl,MacroscopicLinkSegmentTypeImpl,ManagedDirectedPathImpl,ModeImpl,NetworkLayerImpl,RoutedServiceImpl,RoutedServicesLayerImpl,RoutedTripDepartureImpl,RoutedTripImpl,TimePeriodImpl,TransferZoneGroupImpl,TravellerType,UserClass,ZoneImpl
public class ExternalIdAbleImpl extends IdAbleImpl implements ExternalIdAble
Implementation of ExternalIdable interface including hash and equals based on id- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description ExternalIdAbleImpl(long id)ConstructorExternalIdAbleImpl(ExternalIdAbleImpl other)Copy constructor
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description ExternalIdAbleImpldeepClone()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.StringgetExternalId()get external id of the entityStringgetXmlId()the id exposed to users as the "normal" id in the PLANit native xml formatvoidsetExternalId(String externalId)set the external idvoidsetXmlId(String xmlId)set the external idExternalIdAbleImplshallowClone()Create a shallow copy of this entity-
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, getIdsAsString, getSplitExternalId, getSplitExternalId, hasExternalId, hasXmlId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
compareTo, getId, idEquals, idHashCode
-
-
-
-
Constructor Detail
-
ExternalIdAbleImpl
public ExternalIdAbleImpl(long id)
Constructor- Parameters:
id- to use
-
ExternalIdAbleImpl
public ExternalIdAbleImpl(ExternalIdAbleImpl other)
Copy constructor- Parameters:
other- to copy from
-
-
Method Detail
-
getExternalId
public String getExternalId()
get external id of the entity- Specified by:
getExternalIdin interfaceExternalIdAble- Returns:
- external id
-
setExternalId
public void setExternalId(String externalId)
set the external id- Specified by:
setExternalIdin interfaceExternalIdAble- Parameters:
externalId- to set
-
getXmlId
public String getXmlId()
the id exposed to users as the "normal" id in the PLANit native xml format- Specified by:
getXmlIdin interfaceExternalIdAble- Returns:
- xmlId
-
setXmlId
public void setXmlId(String xmlId)
set the external id- Specified by:
setXmlIdin interfaceExternalIdAble- Parameters:
xmlId- to set
-
shallowClone
public ExternalIdAbleImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClonein interfaceIdAble- Specified by:
shallowClonein classIdAbleImpl- Returns:
- shallow copy of entity
-
deepClone
public ExternalIdAbleImpl 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 classIdAbleImpl- Returns:
- deep copy of entity
-
-