|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.valuegenerator.AbstractGenerator
org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator
org.datanucleus.store.rdbms.valuegenerator.AbstractRDBMSGenerator
org.datanucleus.store.rdbms.valuegenerator.SequenceGenerator
public final class SequenceGenerator
This generator utilises datastore sequences. It uses a statement like
"selectto get the next value in the sequence. It is datastore-dependent since there is no RDBMS-independent statement. SequencePoidGenerator works with numbers, so clients using this generator must cast the ID to Long.nextval from dual"
Required user properties
Optional user properties
| Field Summary | |
|---|---|
protected String |
sequenceName
Name of the sequence that we are creating values for |
| Fields inherited from class org.datanucleus.store.rdbms.valuegenerator.AbstractRDBMSGenerator |
|---|
connection, LOCALISER_RDBMS |
| Fields inherited from class org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator |
|---|
connectionProvider, storeMgr |
| Fields inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator |
|---|
allocationSize, block, initialValue, LOCALISER, name, properties, repositoryExists |
| Constructor Summary | |
|---|---|
SequenceGenerator(String name,
Properties props)
Constructor. |
|
| Method Summary | |
|---|---|
protected boolean |
createRepository()
Method to create the sequence. |
protected String |
getSequenceName()
Accessor for the sequence name to use (fully qualified with catalog/schema). |
protected boolean |
repositoryExists()
Method to return if the repository already exists. |
protected boolean |
requiresRepository()
Indicator for whether the generator requires its own repository. |
protected org.datanucleus.store.valuegenerator.ValueGenerationBlock |
reserveBlock(long size)
Reserve a block of ids. |
| Methods inherited from class org.datanucleus.store.rdbms.valuegenerator.AbstractRDBMSGenerator |
|---|
obtainGenerationBlock, requiresConnection |
| Methods inherited from class org.datanucleus.store.valuegenerator.AbstractDatastoreGenerator |
|---|
setConnectionProvider, setStoreManager |
| Methods inherited from class org.datanucleus.store.valuegenerator.AbstractGenerator |
|---|
allocate, current, currentValue, getName, getStorageClass, next, nextValue, obtainGenerationBlock, reserveBlock |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected String sequenceName
| Constructor Detail |
|---|
public SequenceGenerator(String name,
Properties props)
name - Symbolic name for the generatorprops - Properties controlling the behaviour of the generator| Method Detail |
|---|
protected org.datanucleus.store.valuegenerator.ValueGenerationBlock reserveBlock(long size)
reserveBlock in class org.datanucleus.store.valuegenerator.AbstractGeneratorsize - Block size
protected String getSequenceName()
protected boolean requiresRepository()
requiresRepository in class org.datanucleus.store.valuegenerator.AbstractGeneratorprotected boolean repositoryExists()
repositoryExists in class org.datanucleus.store.valuegenerator.AbstractGeneratorprotected boolean createRepository()
createRepository in class org.datanucleus.store.valuegenerator.AbstractGenerator
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||