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 Default 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.default GeneratorcreateIdentifierGenerator(String strategy, Type type, Properties parameters)GeneratorcreateIdentifierGenerator(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 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.
-
-