public class TableStructure extends Object implements DatabaseStructure
Constructor and Description |
---|
TableStructure(JdbcEnvironment jdbcEnvironment,
QualifiedName qualifiedTableName,
Identifier valueColumnNameIdentifier,
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.
|
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 TableStructure(JdbcEnvironment jdbcEnvironment, QualifiedName qualifiedTableName, Identifier valueColumnNameIdentifier, int initialValue, int incrementSize, Class numberType)
public String getName()
DatabaseStructure
getName
in interface DatabaseStructure
public int getInitialValue()
DatabaseStructure
getInitialValue
in interface DatabaseStructure
public int getIncrementSize()
DatabaseStructure
getIncrementSize
in interface DatabaseStructure
public int getTimesAccessed()
DatabaseStructure
getTimesAccessed
in interface DatabaseStructure
public void prepare(Optimizer optimizer)
DatabaseStructure
prepare
in interface DatabaseStructure
optimizer
- The optimizer being applied to the generator.public AccessCallback buildCallback(SharedSessionContractImplementor session)
DatabaseStructure
buildCallback
in interface DatabaseStructure
session
- The session.public String[] sqlCreateStrings(Dialect dialect) throws HibernateException
DatabaseStructure
sqlCreateStrings
in interface DatabaseStructure
dialect
- The database dialect being used.HibernateException
public String[] sqlDropStrings(Dialect dialect) throws HibernateException
DatabaseStructure
sqlDropStrings
in interface DatabaseStructure
dialect
- The database dialect being used.HibernateException
public boolean isPhysicalSequence()
DatabaseStructure
isPhysicalSequence
in interface DatabaseStructure
true
if the actual database structure is a sequence; false
otherwise.public void registerExportables(Database database)
ExportableProducer
Database
registerExportables
in interface ExportableProducer
database
- The database instanceCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.