站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 3.2.4 正式版 API 英文文档

DatabaseStructure (Hibernate API Documentation) - Hibernate 3.2.4 正式版 API 英文文档


org.hibernate.id.enhanced
Interface DatabaseStructure

All Known Implementing Classes:
SequenceStructure, TableStructure

public interface DatabaseStructure

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

Author:
Steve Ebersole

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

Method Detail

getName

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

Returns:
The structure name.

getTimesAccessed

public int getTimesAccessed()
How many times has this structure been accessed through this reference?

Returns:
The number of accesses.

getIncrementSize

public int getIncrementSize()
The configured increment size

Returns:
The configured increment size

buildCallback

public 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.

prepare

public 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.

sqlCreateStrings

public String[] sqlCreateStrings(Dialect dialect)
Commands needed to create the underlying structures.

Parameters:
dialect - The database dialect being used.
Returns:
The creation commands.

sqlDropStrings

public String[] sqlDropStrings(Dialect dialect)
Commands needed to drop the underlying structures.

Parameters:
dialect - The database dialect being used.
Returns:
The drop commands.