Package oracle.spatial.network.nfe.model
Class NFEDBSequenceIdManager
- java.lang.Object
-
- oracle.spatial.network.nfe.model.NFEDBSequenceIdManager
-
- All Implemented Interfaces:
NFEIdManager
public class NFEDBSequenceIdManager extends java.lang.Object implements NFEIdManager
An implementation of NFEIdManager that uses instances ofNFEDBSequenceIdGenerator
to generate id's
-
-
Field Summary
-
Fields inherited from interface oracle.spatial.network.nfe.model.NFEIdManager
ENTITY_ATTRIBUTE_CONSTRAINT, ENTITY_CARDINALITY_RULE, ENTITY_CATALOG, ENTITY_CATALOG_VALUE, ENTITY_FEATURE_CLASS, ENTITY_LINE_LINE_RULE, ENTITY_LINE_POINT_RULE, ENTITY_LINK, ENTITY_NODE, ENTITY_PREDEF_CONN_POINT, ENTITY_RULE_INSTANCE
-
-
Constructor Summary
Constructors Constructor Description NFEDBSequenceIdManager(NFEDataSource dataSource)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description NFEIdGenerator
getIdGenerator(java.lang.String entityName)
Gets the NFEIdGenerator currently used for generating ID's for the given entityNFEModel
getModel()
Gets the current NFEModel instancelong
getNextFeatureElementSequence(long featureLayerId)
Gets the next feature element sequence for the Feature Layer identified by the given featureLayerId.long
getNextFeatureId(long featureLayerId)
Gets the next feature ID for the Feature Layer identified by the given featureLayerIdlong
getNextId(java.lang.String entityName)
Gets the next ID for the given entity name.long
getNextLinkId()
Gets the next link ID.long
getNextNodeId()
Gets the next node ID.void
setIdBufferSize(int size)
Sets the ID buffer size used by all the ID generators managedvoid
setIdGenerator(java.lang.String entityName, NFEIdGenerator idGen)
Associates an NFEIdGenerator instance to the given entity.void
setModel(NFEModel model)
Sets the current NFEModel instance.
-
-
-
Constructor Detail
-
NFEDBSequenceIdManager
public NFEDBSequenceIdManager(NFEDataSource dataSource)
-
-
Method Detail
-
setModel
public void setModel(NFEModel model)
Description copied from interface:NFEIdManager
Sets the current NFEModel instance. This is typically set automatically when a new NFEModel instance is initialized.- Specified by:
setModel
in interfaceNFEIdManager
- Parameters:
model
- an NFEModel instance
-
getModel
public NFEModel getModel()
Description copied from interface:NFEIdManager
Gets the current NFEModel instance- Specified by:
getModel
in interfaceNFEIdManager
- Returns:
- the assigned NFEModel instance
-
setIdGenerator
public void setIdGenerator(java.lang.String entityName, NFEIdGenerator idGen)
Description copied from interface:NFEIdManager
Associates an NFEIdGenerator instance to the given entity. The NFEIdGenerator instance will be used to create new ID's for the entity.- Specified by:
setIdGenerator
in interfaceNFEIdManager
- Parameters:
entityName
- an entity name. See the field summary for supported entity names.idGen
- an NFEIdGenerator instance
-
getIdGenerator
public NFEIdGenerator getIdGenerator(java.lang.String entityName)
Description copied from interface:NFEIdManager
Gets the NFEIdGenerator currently used for generating ID's for the given entity- Specified by:
getIdGenerator
in interfaceNFEIdManager
- Parameters:
entityName
- an entity name.- Returns:
- an NFEIdGenerator instance or null if the entity is not related to any ID generator
-
getNextId
public long getNextId(java.lang.String entityName)
Description copied from interface:NFEIdManager
Gets the next ID for the given entity name. It is equivalent to get the ID generator for the entity and call NFEIdGenerator.getNextId()- Specified by:
getNextId
in interfaceNFEIdManager
- Parameters:
entityName
- an entity name- Returns:
- a valid ID if the entity is related to an ID generator
-
getNextNodeId
public long getNextNodeId()
Description copied from interface:NFEIdManager
Gets the next node ID. This is a shorthand for getNextId( NFEIdManager.ENTITY_NODE )- Specified by:
getNextNodeId
in interfaceNFEIdManager
- Returns:
- a node ID
-
getNextLinkId
public long getNextLinkId()
Description copied from interface:NFEIdManager
Gets the next link ID. This is a shorthand for getNextId( NFEIdManager.ENTITY_LINK )- Specified by:
getNextLinkId
in interfaceNFEIdManager
- Returns:
- a link ID
-
getNextFeatureId
public long getNextFeatureId(long featureLayerId)
Description copied from interface:NFEIdManager
Gets the next feature ID for the Feature Layer identified by the given featureLayerId- Specified by:
getNextFeatureId
in interfaceNFEIdManager
- Parameters:
featureLayerId
- an existing Feature Layer ID- Returns:
- a feature ID
-
getNextFeatureElementSequence
public long getNextFeatureElementSequence(long featureLayerId)
Description copied from interface:NFEIdManager
Gets the next feature element sequence for the Feature Layer identified by the given featureLayerId. Note that the sequence is used as the ID of a feature element. A feature may contain feature element with no necessarily consecutive sequences.- Specified by:
getNextFeatureElementSequence
in interfaceNFEIdManager
- Parameters:
featureLayerId
- featureLayerId an existing Feature Layer ID- Returns:
- a feature element sequence.
-
setIdBufferSize
public void setIdBufferSize(int size)
Description copied from interface:NFEIdManager
Sets the ID buffer size used by all the ID generators managed- Specified by:
setIdBufferSize
in interfaceNFEIdManager
- Parameters:
size
- the size of the buffer
-
-