程序包 org.hibernate.id
类 SequenceGenerator
- java.lang.Object
-
- org.hibernate.id.SequenceGenerator
-
- 所有已实现的接口:
ExportableProducer,BulkInsertionCapableIdentifierGenerator,Configurable,IdentifierGenerator,PersistentIdentifierGenerator
@Deprecated public class SequenceGenerator extends Object implements PersistentIdentifierGenerator, BulkInsertionCapableIdentifierGenerator, Configurable
已过时。UseSequenceStyleGeneratorinsteadsequence
Generates long values using an oracle-style sequence. A higher performance algorithm is SequenceHiLoGenerator.
Mapping parameters supported: sequence, parameters.- 作者:
- Gavin King
- 另请参阅:
SequenceHiLoGenerator
-
-
字段概要
字段 修饰符和类型 字段 说明 static StringPARAMETERS已过时。No longer supported.static StringSEQUENCE已过时。The sequence parameter-
从接口继承的字段 org.hibernate.id.IdentifierGenerator
ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
-
从接口继承的字段 org.hibernate.id.PersistentIdentifierGenerator
CATALOG, IDENTIFIER_NORMALIZER, PK, SCHEMA, TABLE, TABLES
-
-
构造器概要
构造器 构造器 说明 SequenceGenerator()已过时。
-
方法概要
所有方法 实例方法 具体方法 已过时的方法 修饰符和类型 方法 说明 protected IntegralDataTypeHolderbuildHolder()已过时。voidconfigure(Type type, Properties params, ServiceRegistry serviceRegistry)已过时。Configure this instance, given the value of parameters specified by the user as <param> elements.StringdetermineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)已过时。Return the select expression fragment, if any, that generates the identifier values.Serializablegenerate(SharedSessionContractImplementor session, Object obj)已过时。Generate a new identifier.protected IntegralDataTypeHoldergenerateHolder(SharedSessionContractImplementor session)已过时。ObjectgeneratorKey()已过时。Return a key unique to the underlying database objects.protected TypegetIdentifierType()已过时。StringgetSequenceName()已过时。voidregisterExportables(Database database)已过时。Register the contained exportable things to theDatabaseString[]sqlCreateStrings(Dialect dialect)已过时。The SQL required to create the underlying database objects.String[]sqlDropStrings(Dialect dialect)已过时。The SQL required to remove the underlying database objects.booleansupportsBulkInsertionIdentifierGeneration()已过时。Given the configuration of this generator, is identifier generation as part of bulk insertion supported?-
从类继承的方法 java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
从接口继承的方法 org.hibernate.id.IdentifierGenerator
supportsJdbcBatchInserts
-
-
-
-
字段详细资料
-
PARAMETERS
@Deprecated public static final String PARAMETERS
已过时。No longer supported. To specify initial-value or increment use the org.hibernate.id.enhanced.SequenceStyleGenerator generator instead.The parameters parameter, appended to the create sequence DDL. For example (Oracle): INCREMENT BY 1 START WITH 1 MAXVALUE 100 NOCACHE.- 另请参阅:
- 常量字段值
-
-
方法详细资料
-
getIdentifierType
protected Type getIdentifierType()
已过时。
-
generatorKey
public Object generatorKey()
已过时。从接口复制的说明:PersistentIdentifierGeneratorReturn a key unique to the underlying database objects. Prevents us from trying to create/remove them multiple times.- 指定者:
generatorKey在接口中PersistentIdentifierGenerator- 返回:
- Object an identifying key for this generator
-
getSequenceName
public String getSequenceName()
已过时。
-
configure
public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException
已过时。从接口复制的说明:ConfigurableConfigure this instance, given the value of parameters specified by the user as <param> elements. This method is called just once, following instantiation.- 指定者:
configure在接口中Configurable- 参数:
type- The id property type descriptorparams- param values, keyed by parameter nameserviceRegistry- Access to service that may be needed.- 抛出:
MappingException
-
generate
public Serializable generate(SharedSessionContractImplementor session, Object obj)
已过时。从接口复制的说明:IdentifierGeneratorGenerate a new identifier.- 指定者:
generate在接口中IdentifierGenerator- 参数:
session- The session from which the request originatesobj- the entity or collection (idbag) for which the id is being generated- 返回:
- a new identifier
-
generateHolder
protected IntegralDataTypeHolder generateHolder(SharedSessionContractImplementor session)
已过时。
-
buildHolder
protected IntegralDataTypeHolder buildHolder()
已过时。
-
sqlCreateStrings
public String[] sqlCreateStrings(Dialect dialect) throws HibernateException
已过时。从接口复制的说明:PersistentIdentifierGeneratorThe SQL required to create the underlying database objects.- 指定者:
sqlCreateStrings在接口中PersistentIdentifierGenerator- 参数:
dialect- The dialect against which to generate the create command(s)- 返回:
- The create command(s)
- 抛出:
HibernateException- problem creating the create command(s)
-
sqlDropStrings
public String[] sqlDropStrings(Dialect dialect) throws HibernateException
已过时。从接口复制的说明:PersistentIdentifierGeneratorThe SQL required to remove the underlying database objects.- 指定者:
sqlDropStrings在接口中PersistentIdentifierGenerator- 参数:
dialect- The dialect against which to generate the drop command(s)- 返回:
- The drop command(s)
- 抛出:
HibernateException- problem creating the drop command(s)
-
supportsBulkInsertionIdentifierGeneration
public boolean supportsBulkInsertionIdentifierGeneration()
已过时。从接口复制的说明:BulkInsertionCapableIdentifierGeneratorGiven the configuration of this generator, is identifier generation as part of bulk insertion supported? IMPL NOTE : Mainly here to allow stuff like SequenceStyleGenerator which *can* support this based on configuration- 指定者:
supportsBulkInsertionIdentifierGeneration在接口中BulkInsertionCapableIdentifierGenerator- 返回:
trueif bulk insertions are supported;falseotherwise.
-
determineBulkInsertionIdentifierGenerationSelectFragment
public String determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)
已过时。从接口复制的说明:BulkInsertionCapableIdentifierGeneratorReturn the select expression fragment, if any, that generates the identifier values.- 指定者:
determineBulkInsertionIdentifierGenerationSelectFragment在接口中BulkInsertionCapableIdentifierGenerator- 参数:
dialect- The dialect against which the insert will be performed.- 返回:
- The identifier value generation fragment (SQL).
nullindicates that no fragment is needed.
-
registerExportables
public void registerExportables(Database database)
已过时。从接口复制的说明:ExportableProducerRegister the contained exportable things to theDatabase- 指定者:
registerExportables在接口中ExportableProducer- 参数:
database- The database instance
-
-