org.hibernate.id.enhanced
Interface DatabaseStructure
- SequenceStructure, TableStructure
public interface DatabaseStructure
Encapsulates definition of the underlying data structure backing a
sequence-style generator.
buildCallback
public AccessCallback buildCallback(SessionImplementor session)
A callback to be able to get the next value from the underlying
structure as needed.
getIncrementSize
public int getIncrementSize()
The configured increment size
- The configured increment size
getName
public String getName()
The name of the database structure (table or sequence).
getTimesAccessed
public int getTimesAccessed()
How many times has this structure been accessed through this reference?
prepare
public void prepare(Optimizer optimizer)
Prepare this structure for use. Called sometime after instantiation,
but before first use.
optimizer
- The optimizer being applied to the generator.
sqlCreateStrings
public String[] sqlCreateStrings(Dialect dialect)
Commands needed to create the underlying structures.
dialect
- The database dialect being used.
sqlDropStrings
public String[] sqlDropStrings(Dialect dialect)
Commands needed to drop the underlying structures.
dialect
- The database dialect being used.