1
package org.hibernate.id.enhanced;
3
import org.hibernate.engine.SessionImplementor;
4
import org.hibernate.dialect.Dialect;
7
* Encapsulates definition of the underlying data structure backing a
8
* sequence-style generator.
10
* @author Steve Ebersole
12
public interface DatabaseStructure {
14
* The name of the database structure (table or sequence).
15
* @return The structure name.
17
public String getName();
20
* How many times has this structure been accessed through this reference?
21
* @return The number of accesses.
23
public int getTimesAccessed();
26
* The configured increment size
27
* @return The configured increment size
29
public int getIncrementSize();
32
* A callback to be able to get the next value from the underlying
33
* structure as needed.
35
* @param session The session.
36
* @return The next value.
38
public AccessCallback buildCallback(SessionImplementor session);
41
* Prepare this structure for use. Called sometime after instantiation,
42
* but before first use.
44
* @param optimizer The optimizer being applied to the generator.
46
public void prepare(Optimizer optimizer);
49
* Commands needed to create the underlying structures.
50
* @param dialect The database dialect being used.
51
* @return The creation commands.
53
public String[] sqlCreateStrings(Dialect dialect);
56
* Commands needed to drop the underlying structures.
57
* @param dialect The database dialect being used.
58
* @return The drop commands.
60
public String[] sqlDropStrings(Dialect dialect);
b'\\ No newline at end of file'