Package oracle.spatial.network.nfe.model
Class NFEDBSequenceIdGenerator
- java.lang.Object
-
- oracle.spatial.network.nfe.model.NFEDBSequenceIdGenerator
-
- All Implemented Interfaces:
NFEIdGenerator
public class NFEDBSequenceIdGenerator extends java.lang.Object implements NFEIdGenerator
An implementation of NFEIdGeneratiom that uses a database sequence to generate id's
-
-
Constructor Summary
Constructors Constructor Description NFEDBSequenceIdGenerator(java.lang.String sequenceName, NFEDataSource dataSource, int idBufferSize)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description int
getIdBufferSize()
Returns the size of the ID buffer.long
getNextId()
Gets the next IDvoid
setIdBufferSize(int idBufferSize)
Sets the size of the ID buffer size used by this generator.
-
-
-
Constructor Detail
-
NFEDBSequenceIdGenerator
public NFEDBSequenceIdGenerator(java.lang.String sequenceName, NFEDataSource dataSource, int idBufferSize)
-
-
Method Detail
-
getNextId
public long getNextId()
Description copied from interface:NFEIdGenerator
Gets the next ID- Specified by:
getNextId
in interfaceNFEIdGenerator
- Returns:
- a new ID
-
setIdBufferSize
public void setIdBufferSize(int idBufferSize)
Description copied from interface:NFEIdGenerator
Sets the size of the ID buffer size used by this generator. There is not guaranteed that the implementation actually uses a buffer.- Specified by:
setIdBufferSize
in interfaceNFEIdGenerator
- Parameters:
idBufferSize
- the number of IDs that can contain the buffer
-
getIdBufferSize
public int getIdBufferSize()
Description copied from interface:NFEIdGenerator
Returns the size of the ID buffer. The size is the number of IDs that the buffer can hold or that are reserved.- Specified by:
getIdBufferSize
in interfaceNFEIdGenerator
- Returns:
- the size of the ID buffer
-
-