Package org.goplanit.graph
Class GraphEntityImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.graph.GraphEntityImpl
-
- All Implemented Interfaces:
Cloneable
,Comparable<IdAble>
,GraphEntity
,ExternalIdAble
,IdAble
,ManagedId
- Direct Known Subclasses:
EdgeImpl
,EdgeSegmentImpl
,VertexImpl
public abstract class GraphEntityImpl extends ExternalIdAbleImpl implements GraphEntity
Base implementation for graph entity (edge, vertex, etc.)- Author:
- markr
-
-
Constructor Summary
Constructors Constructor Description GraphEntityImpl(GraphEntityImpl other)
Copy constructorGraphEntityImpl(IdGroupingToken tokenId, Class<? extends GraphEntity> clazz)
Constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description protected long
generateAndSetId(IdGroupingToken tokenId)
generate id based on provided token and class and set it on this instanceprotected static long
generateId(IdGroupingToken idGroupingToken, Class<? extends IdAble> clazz)
Generate an id based on provided token and classlong
recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable idString
toString()
-
Methods inherited from class org.goplanit.utils.id.ExternalIdAbleImpl
clone, getExternalId, getXmlId, setExternalId, setXmlId
-
Methods inherited from class org.goplanit.utils.id.IdAbleImpl
equals, generateAndSetId, getId, hashCode, setId
-
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
-
Methods inherited from interface org.goplanit.utils.id.ExternalIdAble
getExternalId, getXmlId, hasExternalId, hasXmlId, setExternalId, setXmlId
-
Methods inherited from interface org.goplanit.utils.id.IdAble
clone, compareTo, getId, idEquals, idHashCode
-
Methods inherited from interface org.goplanit.utils.id.ManagedId
getIdClass, resetChildManagedIdEntities
-
-
-
-
Constructor Detail
-
GraphEntityImpl
public GraphEntityImpl(IdGroupingToken tokenId, Class<? extends GraphEntity> clazz)
Constructor- Parameters:
tokenId
- to useclazz
- to register for
-
GraphEntityImpl
public GraphEntityImpl(GraphEntityImpl other)
Copy constructor- Parameters:
other
- to copy from
-
-
Method Detail
-
generateAndSetId
protected long generateAndSetId(IdGroupingToken tokenId)
generate id based on provided token and class and set it on this instance- Parameters:
tokenId
- to use for id generation- Returns:
- created and set id
-
generateId
protected static long generateId(IdGroupingToken idGroupingToken, Class<? extends IdAble> clazz)
Generate an id based on provided token and class- Parameters:
idGroupingToken
- to useclazz
- to register for- Returns:
- generated id
-
recreateManagedIds
public long recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable id- Specified by:
recreateManagedIds
in interfaceManagedId
- Parameters:
tokenId
- to use- Returns:
- the updated internal id
-
-