类 DefaultIdentifierGeneratorFactory
- java.lang.Object
-
- org.hibernate.id.factory.internal.DefaultIdentifierGeneratorFactory
-
- 所有已实现的接口:
Serializable,IdentifierGeneratorFactory,MutableIdentifierGeneratorFactory,Service,ServiceRegistryAwareService
public class DefaultIdentifierGeneratorFactory extends Object implements MutableIdentifierGeneratorFactory, Serializable, ServiceRegistryAwareService
Basic templated support forIdentifierGeneratorFactoryimplementations.- 作者:
- Steve Ebersole
- 另请参阅:
- 序列化表格
-
-
构造器概要
构造器 构造器 说明 DefaultIdentifierGeneratorFactory()Constructs a new DefaultIdentifierGeneratorFactory.
-
方法概要
所有方法 实例方法 具体方法 修饰符和类型 方法 说明 IdentifierGeneratorcreateIdentifierGenerator(String strategy, Type type, Properties config)Given a strategy, retrieve the appropriate identifier generator instance.DialectgetDialect()Get the dialect.ClassgetIdentifierGeneratorClass(String strategy)Retrieve the class that will be used as theIdentifierGeneratorfor the given strategy.voidinjectServices(ServiceRegistryImplementor serviceRegistry)Callback to inject the registry.voidregister(String strategy, Class generatorClass)voidsetDialect(Dialect dialect)Allow injection of the dialect to use.
-
-
-
方法详细资料
-
register
public void register(String strategy, Class generatorClass)
- 指定者:
register在接口中MutableIdentifierGeneratorFactory
-
getDialect
public Dialect getDialect()
从接口复制的说明:IdentifierGeneratorFactoryGet the dialect.- 指定者:
getDialect在接口中IdentifierGeneratorFactory- 返回:
- the dialect
-
setDialect
public void setDialect(Dialect dialect)
从接口复制的说明:IdentifierGeneratorFactoryAllow injection of the dialect to use.- 指定者:
setDialect在接口中IdentifierGeneratorFactory- 参数:
dialect- The dialect
-
createIdentifierGenerator
public IdentifierGenerator createIdentifierGenerator(String strategy, Type type, Properties config)
从接口复制的说明:IdentifierGeneratorFactoryGiven a strategy, retrieve the appropriate identifier generator instance.- 指定者:
createIdentifierGenerator在接口中IdentifierGeneratorFactory- 参数:
strategy- The generation strategy.type- The mapping type for the identifier values.config- Any configuration properties given in the generator mapping.- 返回:
- The appropriate generator instance.
-
getIdentifierGeneratorClass
public Class getIdentifierGeneratorClass(String strategy)
从接口复制的说明:IdentifierGeneratorFactoryRetrieve the class that will be used as theIdentifierGeneratorfor the given strategy.- 指定者:
getIdentifierGeneratorClass在接口中IdentifierGeneratorFactory- 参数:
strategy- The strategy- 返回:
- The generator class.
-
injectServices
public void injectServices(ServiceRegistryImplementor serviceRegistry)
从接口复制的说明:ServiceRegistryAwareServiceCallback to inject the registry.- 指定者:
injectServices在接口中ServiceRegistryAwareService- 参数:
serviceRegistry- The registry
-
-