public class TableStructure extends TransactionHelper implements DatabaseStructure
| Constructor and Description |
|---|
TableStructure(Dialect dialect,
String tableName,
String valueColumnName,
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.
|
protected Serializable |
doWorkInCurrentTransaction(Connection conn,
String sql)
The work to be done
|
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?
|
void |
prepare(Optimizer optimizer)
Prepare this structure for use.
|
String[] |
sqlCreateStrings(Dialect dialect)
Commands needed to create the underlying structures.
|
String[] |
sqlDropStrings(Dialect dialect)
Commands needed to drop the underlying structures.
|
doWorkInNewTransactionpublic String getName()
getName in interface DatabaseStructurepublic int getInitialValue()
getInitialValue in interface DatabaseStructurepublic int getIncrementSize()
getIncrementSize in interface DatabaseStructurepublic int getTimesAccessed()
getTimesAccessed in interface DatabaseStructurepublic void prepare(Optimizer optimizer)
prepare in interface DatabaseStructureoptimizer - The optimizer being applied to the generator.public AccessCallback buildCallback(SessionImplementor session)
buildCallback in interface DatabaseStructuresession - The session.public String[] sqlCreateStrings(Dialect dialect) throws HibernateException
sqlCreateStrings in interface DatabaseStructuredialect - The database dialect being used.HibernateExceptionpublic String[] sqlDropStrings(Dialect dialect) throws HibernateException
sqlDropStrings in interface DatabaseStructuredialect - The database dialect being used.HibernateExceptionprotected Serializable doWorkInCurrentTransaction(Connection conn, String sql) throws SQLException
doWorkInCurrentTransaction in class TransactionHelperSQLExceptionCopyright © 2002-2017 Red Hat Middleware, LLC. All Rights Reserved