Top Description Methods
org.hibernate.id.enhanced

public Interface DatabaseStructure

Known Direct Implementers
org.hibernate.id.enhanced.SequenceStructure, org.hibernate.id.enhanced.TableStructure
Imports
org.hibernate.engine.SessionImplementor, org.hibernate.dialect.Dialect

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

Method Summary

Modifier and TypeMethod and Description
public AccessCallback

Returns:

The next value.
buildCallback
(SessionImplementor
The session.
session
)

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

public int

Returns:

The configured increment size
getIncrementSize
()

The configured increment size

public int

Returns:

The configured initial value
getInitialValue
()

The configured initial value

public String

Returns:

The structure name.
getName
()

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

public int

Returns:

The number of accesses.
getTimesAccessed
()

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

public void
prepare(Optimizer
The optimizer being applied to the generator.
optimizer
)

Prepare this structure for use.

public String[]

Returns:

The creation commands.
sqlCreateStrings
(Dialect
The database dialect being used.
dialect
)

Commands needed to create the underlying structures.

public String[]

Returns:

The drop commands.
sqlDropStrings
(Dialect
The database dialect being used.
dialect
)

Commands needed to drop the underlying structures.

Method Detail

buildCallbackback to summary
public AccessCallback buildCallback(SessionImplementor session)

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

Parameters
session:SessionImplementor

The session.

Returns:AccessCallback

The next value.

getIncrementSizeback to summary
public int getIncrementSize()

The configured increment size

Returns:int

The configured increment size

getInitialValueback to summary
public int getInitialValue()

The configured initial value

Returns:int

The configured initial value

getNameback to summary
public String getName()

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

Returns:String

The structure name.

getTimesAccessedback to summary
public int getTimesAccessed()

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

Returns:int

The number of accesses.

prepareback to summary
public void prepare(Optimizer optimizer)

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

Parameters
optimizer:Optimizer

The optimizer being applied to the generator.

sqlCreateStringsback to summary
public String[] sqlCreateStrings(Dialect dialect)

Commands needed to create the underlying structures.

Parameters
dialect:Dialect

The database dialect being used.

Returns:String[]

The creation commands.

sqlDropStringsback to summary
public String[] sqlDropStrings(Dialect dialect)

Commands needed to drop the underlying structures.

Parameters
dialect:Dialect

The database dialect being used.

Returns:String[]

The drop commands.