Prev Class | Next Class | Frames | No Frames |
Summary: Nested | Field | Method | Constr | Detail: Nested | Field | Method | Constr |
java.lang.Object
org.hibernate.engine.TransactionHelper
org.hibernate.id.enhanced.TableStructure
Constructor Summary | |
|
Method Summary | |
AccessCallback |
|
protected Serializable |
|
int |
|
String |
|
int |
|
void | |
String[] |
|
String[] |
|
Methods inherited from class org.hibernate.engine.TransactionHelper | |
doWorkInCurrentTransaction , doWorkInNewTransaction |
public TableStructure(Dialect dialect, String tableName, String valueColumnName, int initialValue, int incrementSize)
public AccessCallback buildCallback(SessionImplementor session)
A callback to be able to get the next value from the underlying structure as needed.
- Specified by:
- buildCallback in interface DatabaseStructure
- Parameters:
session
- The session.
- Returns:
- The next value.
protected Serializable doWorkInCurrentTransaction(Connection conn, String sql) throws SQLException
The work to be done
- Overrides:
- doWorkInCurrentTransaction in interface TransactionHelper
public int getIncrementSize()
The configured increment size
- Specified by:
- getIncrementSize in interface DatabaseStructure
- Returns:
- The configured increment size
public String getName()
The name of the database structure (table or sequence).
- Specified by:
- getName in interface DatabaseStructure
- Returns:
- The structure name.
public int getTimesAccessed()
How many times has this structure been accessed through this reference?
- Specified by:
- getTimesAccessed in interface DatabaseStructure
- Returns:
- The number of accesses.
public void prepare(Optimizer optimizer)
Prepare this structure for use. Called sometime after instantiation, but before first use.
- Specified by:
- prepare in interface DatabaseStructure
- Parameters:
optimizer
- The optimizer being applied to the generator.
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException
Commands needed to create the underlying structures.
- Specified by:
- sqlCreateStrings in interface DatabaseStructure
- Parameters:
dialect
- The database dialect being used.
- Returns:
- The creation commands.
public String[] sqlDropStrings(Dialect dialect) throws HibernateException
Commands needed to drop the underlying structures.
- Specified by:
- sqlDropStrings in interface DatabaseStructure
- Parameters:
dialect
- The database dialect being used.
- Returns:
- The drop commands.