Package org.hibernate.id.factory
Interface IdentifierGeneratorFactory
-
- All Superinterfaces:
Serializable,Service
- All Known Implementing Classes:
StandardIdentifierGeneratorFactory
@Incubating public interface IdentifierGeneratorFactory extends Service
Contract for a factory ofIdentifierGeneratorinstances. The implementor of this service is responsible for providing implementations of the predefined built-in id generators, all of which implementIdentifierGenerator, along with any id generator declared usingGenericGenerator.An id generator is identified by either:
- a predefined string-based name (which originated in the old
hbm.xmlmapping file format), - the
nameor the thetypespecified by the@GenericGeneratorannotation, or - a JPA-defined
GenerationType.
A new generator passed a
Propertiesobject containing parameters via the methodIdentifierGenerator.configure(Type, Properties, ServiceRegistry).This is part of an older mechanism for instantiating and configuring id generators which predates the existence of
Generatorand the@IdGeneratorTypemeta-annotation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Deprecated Methods Modifier and Type Method Description GeneratorcreateIdentifierGenerator(GenerationType generationType, String generatedValueGeneratorName, String generatorName, JavaType<?> javaType, Properties config, GeneratorDefinitionResolver definitionResolver)Create anIdentifierGeneratorbased on the given details.GeneratorcreateIdentifierGenerator(String strategy, Type type, Properties parameters)DialectgetDialect()Deprecated, for removal: This API element is subject to removal in a future version.should be removedClass<? extends Generator>getIdentifierGeneratorClass(String strategy)Deprecated.with no replacement.
-
-
-
Method Detail
-
createIdentifierGenerator
@Incubating Generator createIdentifierGenerator(GenerationType generationType, String generatedValueGeneratorName, String generatorName, JavaType<?> javaType, Properties config, GeneratorDefinitionResolver definitionResolver)
Create anIdentifierGeneratorbased on the given details.
-
createIdentifierGenerator
@Deprecated(since="6.0") Generator createIdentifierGenerator(String strategy, Type type, Properties parameters)
Deprecated.Given a strategy, retrieve the appropriate identifier generator instance.- Parameters:
strategy- The generation strategy.type- The mapping type for the identifier values.parameters- Any parameters properties given in the generator mapping.- Returns:
- The appropriate generator instance.
-
getIdentifierGeneratorClass
@Deprecated(since="6.0") Class<? extends Generator> getIdentifierGeneratorClass(String strategy)
Deprecated.Retrieve the class that will be used as theIdentifierGeneratorfor the given strategy.- Parameters:
strategy- The strategy- Returns:
- The generator class.
-
getDialect
@Deprecated(since="6.2", forRemoval=true) Dialect getDialect()
Deprecated, for removal: This API element is subject to removal in a future version.should be removedGet the dialect.- Returns:
- the dialect
-
-