public final class SequenceKeyGenerator extends KeyGenerator
Modifier and Type | Field and Description |
---|---|
static String |
ALGORITHM_NAME
Name of key generator algorithm.
|
HASHFACTOR
Modifier | Constructor and Description |
---|---|
protected |
SequenceKeyGenerator(SequenceKeyGeneratorFactory factory)
Constructor for default SEQUENCE key generator.
|
protected |
SequenceKeyGenerator(SequenceKeyGeneratorFactory factory,
KeyGeneratorDef definition)
Constructor for SEQUENCE key generator specified by given defintion.
|
Modifier and Type | Method and Description |
---|---|
int |
getIncrement()
Get increment for the sequence.
|
String |
getSequence()
Get name of the sequence.
|
boolean |
isReturning()
Get returning mode for the sequence.
|
boolean |
isTrigger()
Shell a trigger be used to generates keys?
|
void |
toCreateDDL(DDLWriter writer)
Delegate generation of create script to factory.
|
void |
toDropDDL(DDLWriter writer)
Delegate generation of drop script to factory.
|
equals, getAlias, getTable, hashCode, merge, setAlias, setTable
equals, getConfiguration, getName, setConfiguration, setName
public static final String ALGORITHM_NAME
protected SequenceKeyGenerator(SequenceKeyGeneratorFactory factory)
factory
- The key generator factory that has created this key generator and
will also be responsible to generate the DDL for the sequence.protected SequenceKeyGenerator(SequenceKeyGeneratorFactory factory, KeyGeneratorDef definition) throws GeneratorException
factory
- The key generator factory that has created this key generator and
will also be responsible to generate the DDL for the sequence.definition
- Key generator definition.GeneratorException
- If increment parameter can't be parsed as integer.public String getSequence()
public boolean isReturning()
public boolean isTrigger()
true
if keys are to be generated by a trigger,
false
otherwise.public int getIncrement()
public void toCreateDDL(DDLWriter writer)
writer
- DDLWriter to write schema objects to.public void toDropDDL(DDLWriter writer)
writer
- DDLWriter to write schema objects to.Copyright © 2018. All rights reserved.