org.hibernate.id.enhanced

Class TableStructure

Implemented Interfaces:
DatabaseStructure

public class TableStructure
extends TransactionHelper
implements DatabaseStructure

Describes a table used to mimic sequence behavior
Author:
Steve Ebersole

Constructor Summary

TableStructure(Dialect dialect, String tableName, String valueColumnName, int initialValue, int incrementSize)

Method Summary

AccessCallback
buildCallback(SessionImplementor session)
protected Serializable
doWorkInCurrentTransaction(Connection conn, String sql)
int
getIncrementSize()
String
getName()
int
getTimesAccessed()
void
prepare(Optimizer optimizer)
String[]
sqlCreateStrings(Dialect dialect)
String[]
sqlDropStrings(Dialect dialect)

Methods inherited from class org.hibernate.engine.TransactionHelper

doWorkInCurrentTransaction, doWorkInNewTransaction

Constructor Details

TableStructure

public TableStructure(Dialect dialect,
                      String tableName,
                      String valueColumnName,
                      int initialValue,
                      int incrementSize)

Method Details

buildCallback

public AccessCallback buildCallback(SessionImplementor session)
Specified by:
buildCallback in interface DatabaseStructure

doWorkInCurrentTransaction

protected Serializable doWorkInCurrentTransaction(Connection conn,
                                                  String sql)
            throws SQLException
Overrides:
doWorkInCurrentTransaction in interface TransactionHelper

getIncrementSize

public int getIncrementSize()
Specified by:
getIncrementSize in interface DatabaseStructure

getName

public String getName()
Specified by:
getName in interface DatabaseStructure

getTimesAccessed

public int getTimesAccessed()
Specified by:
getTimesAccessed in interface DatabaseStructure

prepare

public void prepare(Optimizer optimizer)
Specified by:
prepare in interface DatabaseStructure

sqlCreateStrings

public String[] sqlCreateStrings(Dialect dialect)
            throws HibernateException
Specified by:
sqlCreateStrings in interface DatabaseStructure

sqlDropStrings

public String[] sqlDropStrings(Dialect dialect)
            throws HibernateException
Specified by:
sqlDropStrings in interface DatabaseStructure