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 ofNFEDBSequenceIdGeneratorto 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 NFEIdGeneratorgetIdGenerator(java.lang.String entityName)Gets the NFEIdGenerator currently used for generating ID's for the given entityNFEModelgetModel()Gets the current NFEModel instancelonggetNextFeatureElementSequence(long featureLayerId)Gets the next feature element sequence for the Feature Layer identified by the given featureLayerId.longgetNextFeatureId(long featureLayerId)Gets the next feature ID for the Feature Layer identified by the given featureLayerIdlonggetNextId(java.lang.String entityName)Gets the next ID for the given entity name.longgetNextLinkId()Gets the next link ID.longgetNextNodeId()Gets the next node ID.voidsetIdBufferSize(int size)Sets the ID buffer size used by all the ID generators managedvoidsetIdGenerator(java.lang.String entityName, NFEIdGenerator idGen)Associates an NFEIdGenerator instance to the given entity.voidsetModel(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:NFEIdManagerSets the current NFEModel instance. This is typically set automatically when a new NFEModel instance is initialized.- Specified by:
setModelin interfaceNFEIdManager- Parameters:
model- an NFEModel instance
-
getModel
public NFEModel getModel()
Description copied from interface:NFEIdManagerGets the current NFEModel instance- Specified by:
getModelin interfaceNFEIdManager- Returns:
- the assigned NFEModel instance
-
setIdGenerator
public void setIdGenerator(java.lang.String entityName, NFEIdGenerator idGen)Description copied from interface:NFEIdManagerAssociates an NFEIdGenerator instance to the given entity. The NFEIdGenerator instance will be used to create new ID's for the entity.- Specified by:
setIdGeneratorin 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:NFEIdManagerGets the NFEIdGenerator currently used for generating ID's for the given entity- Specified by:
getIdGeneratorin 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:NFEIdManagerGets 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:
getNextIdin 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:NFEIdManagerGets the next node ID. This is a shorthand for getNextId( NFEIdManager.ENTITY_NODE )- Specified by:
getNextNodeIdin interfaceNFEIdManager- Returns:
- a node ID
-
getNextLinkId
public long getNextLinkId()
Description copied from interface:NFEIdManagerGets the next link ID. This is a shorthand for getNextId( NFEIdManager.ENTITY_LINK )- Specified by:
getNextLinkIdin interfaceNFEIdManager- Returns:
- a link ID
-
getNextFeatureId
public long getNextFeatureId(long featureLayerId)
Description copied from interface:NFEIdManagerGets the next feature ID for the Feature Layer identified by the given featureLayerId- Specified by:
getNextFeatureIdin interfaceNFEIdManager- Parameters:
featureLayerId- an existing Feature Layer ID- Returns:
- a feature ID
-
getNextFeatureElementSequence
public long getNextFeatureElementSequence(long featureLayerId)
Description copied from interface:NFEIdManagerGets 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:
getNextFeatureElementSequencein interfaceNFEIdManager- Parameters:
featureLayerId- featureLayerId an existing Feature Layer ID- Returns:
- a feature element sequence.
-
setIdBufferSize
public void setIdBufferSize(int size)
Description copied from interface:NFEIdManagerSets the ID buffer size used by all the ID generators managed- Specified by:
setIdBufferSizein interfaceNFEIdManager- Parameters:
size- the size of the buffer
-
-