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 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.String
getExternalId()
get external id of the entityString
getXmlId()
the id exposed to users as the "normal" id in the PLANit native xml formatvoid
setExternalId(String externalId)
set the external idvoid
setXmlId(String xmlId)
set the external idExternalIdAbleImpl
shallowClone()
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:
getExternalId
in interfaceExternalIdAble
- Returns:
- external id
-
setExternalId
public void setExternalId(String externalId)
set the external id- Specified by:
setExternalId
in 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:
getXmlId
in interfaceExternalIdAble
- Returns:
- xmlId
-
setXmlId
public void setXmlId(String xmlId)
set the external id- Specified by:
setXmlId
in interfaceExternalIdAble
- Parameters:
xmlId
- to set
-
shallowClone
public ExternalIdAbleImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in 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:
deepClone
in interfaceIdAble
- Specified by:
deepClone
in classIdAbleImpl
- Returns:
- deep copy of entity
-
-