public class SequenceStructure extends Object implements DatabaseStructure
| Constructor and Description |
|---|
SequenceStructure(JdbcEnvironment jdbcEnvironment,
QualifiedName qualifiedSequenceName,
int initialValue,
int incrementSize,
Class numberType) |
| Modifier and Type | Method and Description |
|---|---|
AccessCallback |
buildCallback(SessionImplementor session)
A callback to be able to get the next value from the underlying
structure as needed.
|
int |
getIncrementSize()
The configured increment size
|
int |
getInitialValue()
The configured initial value
|
String |
getName()
The name of the database structure (table or sequence).
|
int |
getTimesAccessed()
How many times has this structure been accessed through this reference?
|
boolean |
isPhysicalSequence()
Is the structure physically a sequence?
|
void |
prepare(Optimizer optimizer)
Prepare this structure for use.
|
void |
registerExportables(Database database)
Register the contained exportable things to the
Database |
String[] |
sqlCreateStrings(Dialect dialect)
Commands needed to create the underlying structures.
|
String[] |
sqlDropStrings(Dialect dialect)
Commands needed to drop the underlying structures.
|
public SequenceStructure(JdbcEnvironment jdbcEnvironment, QualifiedName qualifiedSequenceName, int initialValue, int incrementSize, Class numberType)
public String getName()
DatabaseStructuregetName in interface DatabaseStructurepublic int getIncrementSize()
DatabaseStructuregetIncrementSize in interface DatabaseStructurepublic int getTimesAccessed()
DatabaseStructuregetTimesAccessed in interface DatabaseStructurepublic int getInitialValue()
DatabaseStructuregetInitialValue in interface DatabaseStructurepublic AccessCallback buildCallback(SessionImplementor session)
DatabaseStructurebuildCallback in interface DatabaseStructuresession - The session.public void prepare(Optimizer optimizer)
DatabaseStructureprepare in interface DatabaseStructureoptimizer - The optimizer being applied to the generator.public void registerExportables(Database database)
ExportableProducerDatabaseregisterExportables in interface ExportableProducerdatabase - The database instancepublic String[] sqlCreateStrings(Dialect dialect) throws HibernateException
DatabaseStructuresqlCreateStrings in interface DatabaseStructuredialect - The database dialect being used.HibernateExceptionpublic String[] sqlDropStrings(Dialect dialect) throws HibernateException
DatabaseStructuresqlDropStrings in interface DatabaseStructuredialect - The database dialect being used.HibernateExceptionpublic boolean isPhysicalSequence()
DatabaseStructureisPhysicalSequence in interface DatabaseStructuretrue if the actual database structure is a sequence; false otherwise.Copyright © 2017 JBoss by Red Hat. All rights reserved.