类 TableStructure
- java.lang.Object
-
- org.hibernate.id.enhanced.TableStructure
-
- 所有已实现的接口:
ExportableProducer,DatabaseStructure
public class TableStructure extends Object implements DatabaseStructure
Describes a table used to mimic sequence behavior- 作者:
- Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 TableStructure(JdbcEnvironment jdbcEnvironment, QualifiedName qualifiedTableName, Identifier valueColumnNameIdentifier, int initialValue, int incrementSize, Class numberType)
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 AccessCallbackbuildCallback(SharedSessionContractImplementor session)A callback to be able to get the next value from the underlying structure as needed.intgetIncrementSize()The configured increment sizeintgetInitialValue()The configured initial valueStringgetName()The name of the database structure (table or sequence).intgetTimesAccessed()How many times has this structure been accessed through this reference?booleanisPhysicalSequence()Is the structure physically a sequence?voidprepare(Optimizer optimizer)Prepare this structure for use.voidregisterExportables(Database database)Register the contained exportable things to theDatabaseString[]sqlCreateStrings(Dialect dialect)Commands needed to create the underlying structures.String[]sqlDropStrings(Dialect dialect)Commands needed to drop the underlying structures.
-
-
-
构造器详细资料
-
TableStructure
public TableStructure(JdbcEnvironment jdbcEnvironment, QualifiedName qualifiedTableName, Identifier valueColumnNameIdentifier, int initialValue, int incrementSize, Class numberType)
-
-
方法详细资料
-
getName
public String getName()
从接口复制的说明:DatabaseStructureThe name of the database structure (table or sequence).- 指定者:
getName在接口中DatabaseStructure- 返回:
- The structure name.
-
getInitialValue
public int getInitialValue()
从接口复制的说明:DatabaseStructureThe configured initial value- 指定者:
getInitialValue在接口中DatabaseStructure- 返回:
- The configured initial value
-
getIncrementSize
public int getIncrementSize()
从接口复制的说明:DatabaseStructureThe configured increment size- 指定者:
getIncrementSize在接口中DatabaseStructure- 返回:
- The configured increment size
-
getTimesAccessed
public int getTimesAccessed()
从接口复制的说明:DatabaseStructureHow many times has this structure been accessed through this reference?- 指定者:
getTimesAccessed在接口中DatabaseStructure- 返回:
- The number of accesses.
-
prepare
public void prepare(Optimizer optimizer)
从接口复制的说明:DatabaseStructurePrepare this structure for use. Called sometime after instantiation, but before first use.- 指定者:
prepare在接口中DatabaseStructure- 参数:
optimizer- The optimizer being applied to the generator.
-
buildCallback
public AccessCallback buildCallback(SharedSessionContractImplementor session)
从接口复制的说明:DatabaseStructureA callback to be able to get the next value from the underlying structure as needed.- 指定者:
buildCallback在接口中DatabaseStructure- 参数:
session- The session.- 返回:
- The next value.
-
sqlCreateStrings
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException
从接口复制的说明:DatabaseStructureCommands needed to create the underlying structures.- 指定者:
sqlCreateStrings在接口中DatabaseStructure- 参数:
dialect- The database dialect being used.- 返回:
- The creation commands.
- 抛出:
HibernateException
-
sqlDropStrings
public String[] sqlDropStrings(Dialect dialect) throws HibernateException
从接口复制的说明:DatabaseStructureCommands needed to drop the underlying structures.- 指定者:
sqlDropStrings在接口中DatabaseStructure- 参数:
dialect- The database dialect being used.- 返回:
- The drop commands.
- 抛出:
HibernateException
-
isPhysicalSequence
public boolean isPhysicalSequence()
从接口复制的说明:DatabaseStructureIs the structure physically a sequence?- 指定者:
isPhysicalSequence在接口中DatabaseStructure- 返回:
trueif the actual database structure is a sequence;falseotherwise.
-
registerExportables
public void registerExportables(Database database)
从接口复制的说明:ExportableProducerRegister the contained exportable things to theDatabase- 指定者:
registerExportables在接口中ExportableProducer- 参数:
database- The database instance
-
-