public interface

DatabaseStructure

org.hibernate.id.enhanced.DatabaseStructure
Known Indirect Subclasses

Class Overview

Encapsulates definition of the underlying data structure backing a sequence-style generator.

Summary

Public Methods
abstract AccessCallback buildCallback(SessionImplementor session)
A callback to be able to get the next value from the underlying structure as needed.
abstract int getIncrementSize()
The configured increment size
abstract int getInitialValue()
The configured initial value
abstract String getName()
The name of the database structure (table or sequence).
abstract int getTimesAccessed()
How many times has this structure been accessed through this reference?
abstract void prepare(Optimizer optimizer)
Prepare this structure for use.
abstract String[] sqlCreateStrings(Dialect dialect)
Commands needed to create the underlying structures.
abstract String[] sqlDropStrings(Dialect dialect)
Commands needed to drop the underlying structures.

Public Methods

public abstract AccessCallback buildCallback (SessionImplementor session)

A callback to be able to get the next value from the underlying structure as needed.

Parameters
session The session.
Returns
  • The next value.

public abstract int getIncrementSize ()

The configured increment size

Returns
  • The configured increment size

public abstract int getInitialValue ()

The configured initial value

Returns
  • The configured initial value

public abstract String getName ()

The name of the database structure (table or sequence).

Returns
  • The structure name.

public abstract int getTimesAccessed ()

How many times has this structure been accessed through this reference?

Returns
  • The number of accesses.

public abstract void prepare (Optimizer optimizer)

Prepare this structure for use. Called sometime after instantiation, but before first use.

Parameters
optimizer The optimizer being applied to the generator.

public abstract String[] sqlCreateStrings (Dialect dialect)

Commands needed to create the underlying structures.

Parameters
dialect The database dialect being used.
Returns
  • The creation commands.

public abstract String[] sqlDropStrings (Dialect dialect)

Commands needed to drop the underlying structures.

Parameters
dialect The database dialect being used.
Returns
  • The drop commands.