Package org.goplanit.zoning
Class OdZoneImpl
- java.lang.Object
-
- org.goplanit.utils.id.IdAbleImpl
-
- org.goplanit.utils.id.ExternalIdAbleImpl
-
- org.goplanit.zoning.ZoneImpl
-
- org.goplanit.zoning.OdZoneImpl
-
- All Implemented Interfaces:
Comparable<IdAble>
,ExternalIdAble
,IdAble
,ManagedId
,OdZone
,Zone
public class OdZoneImpl extends ZoneImpl implements OdZone
An Od zone- Author:
- markr
-
-
Field Summary
-
Fields inherited from class org.goplanit.zoning.ZoneImpl
centroid, geometry, inputProperties, name
-
Fields inherited from interface org.goplanit.utils.zoning.OdZone
OD_ZONE_ID_CLASS
-
Fields inherited from interface org.goplanit.utils.zoning.Zone
LOGGER, ZONE_ID_CLASS
-
-
Constructor Summary
Constructors Constructor Description OdZoneImpl(IdGroupingToken tokenId)
constructorOdZoneImpl(OdZoneImpl other, boolean deepCopy)
Copy constructor
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description OdZoneImpl
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.protected static long
generateOdZoneId(IdGroupingToken tokenId)
generate unique od zone idlong
getOdZoneId()
In addition to a zone id across all zones of any derived type, each Od zone also has a unique id across the Od zones specificallylong
recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable idprotected void
setOdZoneId(long odZoneId)
Set OD Zone IdOdZoneImpl
shallowClone()
Create a shallow copy of this entity-
Methods inherited from class org.goplanit.zoning.ZoneImpl
addInputProperty, generateZoneId, getCentroid, getGeometry, getInputProperty, getName, setCentroid, setGeometry, setId, setName, toString
-
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
-
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, 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.zoning.OdZone
getOdZoneIdClass
-
Methods inherited from interface org.goplanit.utils.zoning.Zone
addInputProperty, getCentroid, getEnvelope, getGeometry, getGeometry, getIdClass, getInputProperty, getName, hasCentroid, hasGeometry, hasInputProperty, hasName, setGeometry, setName
-
-
-
-
Constructor Detail
-
OdZoneImpl
public OdZoneImpl(IdGroupingToken tokenId)
constructor- Parameters:
tokenId
- for id generation
-
OdZoneImpl
public OdZoneImpl(OdZoneImpl other, boolean deepCopy)
Copy constructor- Parameters:
other
- to copydeepCopy
- when true, create a deep copy, shallow copy otherwise
-
-
Method Detail
-
generateOdZoneId
protected static long generateOdZoneId(IdGroupingToken tokenId)
generate unique od zone id- Parameters:
tokenId
- contiguous id generation within this group for instances of this class- Returns:
- odZoneId
-
setOdZoneId
protected void setOdZoneId(long odZoneId)
Set OD Zone Id- Parameters:
odZoneId
- to set
-
getOdZoneId
public long getOdZoneId()
In addition to a zone id across all zones of any derived type, each Od zone also has a unique id across the Od zones specifically- Specified by:
getOdZoneId
in interfaceOdZone
- Returns:
- od zone specific id
-
recreateManagedIds
public long recreateManagedIds(IdGroupingToken tokenId)
recreate the internal id(s) and set them including the Idable id- Specified by:
recreateManagedIds
in interfaceManagedId
- Overrides:
recreateManagedIds
in classZoneImpl
- 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 OdZoneImpl shallowClone()
Create a shallow copy of this entity- Specified by:
shallowClone
in interfaceIdAble
- Specified by:
shallowClone
in interfaceOdZone
- Specified by:
shallowClone
in interfaceZone
- Specified by:
shallowClone
in classZoneImpl
- Returns:
- shallow copy of entity
-
deepClone
public OdZoneImpl 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
-
-