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 ofIdentifierGenerator
instances. 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.xml
mapping file format), - the
name
or the thetype
specified by the@GenericGenerator
annotation, or - a JPA-defined
GenerationType
.
A new generator passed a
Properties
object 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
Generator
and the@IdGeneratorType
meta-annotation.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description Generator
createIdentifierGenerator(GenerationType generationType, String generatedValueGeneratorName, String generatorName, JavaType<?> javaType, Properties config, GeneratorDefinitionResolver definitionResolver)
Create anIdentifierGenerator
based on the given details.default Generator
createIdentifierGenerator(String strategy, Type type, Properties parameters)
Generator
createIdentifierGenerator(String strategy, Type type, GeneratorCreationContext creationContext, Properties parameters)
-
-
-
Method Detail
-
createIdentifierGenerator
@Incubating Generator createIdentifierGenerator(GenerationType generationType, String generatedValueGeneratorName, String generatorName, JavaType<?> javaType, Properties config, GeneratorDefinitionResolver definitionResolver)
Create anIdentifierGenerator
based 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.
-
-