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 intgetIdBufferSize()Returns the size of the ID buffer.longgetNextId()Gets the next IDvoidsetIdBufferSize(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:NFEIdGeneratorGets the next ID- Specified by:
getNextIdin interfaceNFEIdGenerator- Returns:
- a new ID
-
setIdBufferSize
public void setIdBufferSize(int idBufferSize)
Description copied from interface:NFEIdGeneratorSets the size of the ID buffer size used by this generator. There is not guaranteed that the implementation actually uses a buffer.- Specified by:
setIdBufferSizein interfaceNFEIdGenerator- Parameters:
idBufferSize- the number of IDs that can contain the buffer
-
getIdBufferSize
public int getIdBufferSize()
Description copied from interface:NFEIdGeneratorReturns the size of the ID buffer. The size is the number of IDs that the buffer can hold or that are reserved.- Specified by:
getIdBufferSizein interfaceNFEIdGenerator- Returns:
- the size of the ID buffer
-
-