public class SequenceStructure extends Object implements DatabaseStructure
| Modifier and Type | Field and Description |
|---|---|
protected QualifiedName |
physicalSequenceName |
| Constructor and Description |
|---|
SequenceStructure(JdbcEnvironment jdbcEnvironment,
QualifiedName qualifiedSequenceName,
int initialValue,
int incrementSize,
Class numberType) |
| Modifier and Type | Method and Description |
|---|---|
AccessCallback |
buildCallback(SharedSessionContractImplementor session)
A callback to be able to get the next value from the underlying
structure as needed.
|
protected void |
buildSequence(Database database) |
void |
configure(Optimizer optimizer)
Configures this structure with the given arguments.
|
String[] |
getAllSqlForTests() |
int |
getIncrementSize()
The configured increment size
|
int |
getInitialValue()
The configured initial value
|
QualifiedName |
getPhysicalName()
The physical name of the database structure (table or sequence).
|
protected QualifiedName |
getQualifiedName() |
protected int |
getSourceIncrementSize() |
int |
getTimesAccessed()
How many times has this structure been accessed through this reference?
|
void |
initialize(SqlStringGenerationContext context)
Initializes this structure, in particular pre-generates SQL as necessary.
|
boolean |
isPhysicalSequence()
Is the structure physically a sequence?
|
void |
registerExportables(Database database)
Register database objects involved in this structure, e.g.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitprepareprotected QualifiedName physicalSequenceName
public SequenceStructure(JdbcEnvironment jdbcEnvironment, QualifiedName qualifiedSequenceName, int initialValue, int incrementSize, Class numberType)
public QualifiedName getPhysicalName()
DatabaseStructure
Only available after DatabaseStructure.registerExportables(Database)
has been called.
getPhysicalName in interface DatabaseStructurepublic int getIncrementSize()
DatabaseStructuregetIncrementSize in interface DatabaseStructurepublic int getTimesAccessed()
DatabaseStructuregetTimesAccessed in interface DatabaseStructurepublic int getInitialValue()
DatabaseStructuregetInitialValue in interface DatabaseStructurepublic String[] getAllSqlForTests()
getAllSqlForTests in interface DatabaseStructurepublic AccessCallback buildCallback(SharedSessionContractImplementor session)
DatabaseStructurebuildCallback in interface DatabaseStructuresession - The session.public void configure(Optimizer optimizer)
DatabaseStructure
Called just after instantiation, before DatabaseStructure.initialize(SqlStringGenerationContext)
configure in interface DatabaseStructureoptimizer - The optimizer being applied to the generator.public void registerExportables(Database database)
DatabaseStructure
This method is called just once, after DatabaseStructure.configure(Optimizer),
but before DatabaseStructure.initialize(SqlStringGenerationContext).
registerExportables in interface ExportableProducerregisterExportables in interface DatabaseStructuredatabase - The database instancepublic void initialize(SqlStringGenerationContext context)
DatabaseStructure
This method is called just once, after DatabaseStructure.registerExportables(Database),
before first use.
initialize in interface DatabaseStructurecontext - A context to help generate SQL stringspublic boolean isPhysicalSequence()
DatabaseStructureisPhysicalSequence in interface DatabaseStructuretrue if the actual database structure is a sequence; false otherwise.protected final int getSourceIncrementSize()
protected QualifiedName getQualifiedName()
protected void buildSequence(Database database)
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.