Package org.hibernate.id.factory
Interface IdentifierGeneratorFactory
- All Superinterfaces:
Serializable,Service
- All Known Implementing Classes:
StandardIdentifierGeneratorFactory
Contract for a factory of
IdentifierGenerator instances. The implementor
of this service is responsible for providing implementations of the predefined
built-in id generators, all of which implement IdentifierGenerator, along
with any id generator declared using GenericGenerator.
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 Properties object containing parameters via the
method IdentifierGenerator.configure(Type, Properties, ServiceRegistry).
This is part of an older mechanism for instantiating and configuring id generators
which predates the existence of Generator and the
@IdGeneratorType meta-annotation.
- Author:
- Steve Ebersole
-
Method Summary
Modifier and TypeMethodDescriptioncreateIdentifierGenerator(GenerationType generationType, String generatedValueGeneratorName, String generatorName, JavaType<?> javaType, Properties config, GeneratorDefinitionResolver definitionResolver) Create anIdentifierGeneratorbased on the given details.default GeneratorcreateIdentifierGenerator(String strategy, Type type, Properties parameters) Deprecated.createIdentifierGenerator(String strategy, Type type, GeneratorCreationContext creationContext, Properties parameters)
-
Method Details
-
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, GeneratorCreationContext creationContext, 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.
-
createIdentifierGenerator
@Deprecated(since="6.0") default 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.
-
createIdentifierGenerator(GenerationType, String, String, JavaType, Properties, GeneratorDefinitionResolver)