类 SequenceStructure
- java.lang.Object
-
- org.hibernate.id.enhanced.SequenceStructure
-
- 所有已实现的接口:
ExportableProducer,DatabaseStructure
public class SequenceStructure extends Object implements DatabaseStructure
Describes a sequence.- 作者:
- Steve Ebersole
-
-
字段概要
字段 修饰符和类型 字段 说明 protected StringsequenceName
-
构造器概要
构造器 构造器 说明 SequenceStructure(JdbcEnvironment jdbcEnvironment, QualifiedName qualifiedSequenceName, 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.protected voidbuildSequence(Database database)intgetIncrementSize()The configured increment sizeintgetInitialValue()The configured initial valueStringgetName()The name of the database structure (table or sequence).protected QualifiedNamegetQualifiedName()protected intgetSourceIncrementSize()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.
-
-
-
字段详细资料
-
sequenceName
protected String sequenceName
-
-
构造器详细资料
-
SequenceStructure
public SequenceStructure(JdbcEnvironment jdbcEnvironment, QualifiedName qualifiedSequenceName, int initialValue, int incrementSize, Class numberType)
-
-
方法详细资料
-
getName
public String getName()
从接口复制的说明:DatabaseStructureThe name of the database structure (table or sequence).- 指定者:
getName在接口中DatabaseStructure- 返回:
- The structure name.
-
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.
-
getInitialValue
public int getInitialValue()
从接口复制的说明:DatabaseStructureThe configured initial value- 指定者:
getInitialValue在接口中DatabaseStructure- 返回:
- The configured initial value
-
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.
-
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.
-
registerExportables
public void registerExportables(Database database)
从接口复制的说明:ExportableProducerRegister the contained exportable things to theDatabase- 指定者:
registerExportables在接口中ExportableProducer- 参数:
database- The database instance
-
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.
-
getSourceIncrementSize
protected final int getSourceIncrementSize()
-
getQualifiedName
protected QualifiedName getQualifiedName()
-
buildSequence
protected void buildSequence(Database database)
-
-