Package org.hibernate.id
Interface Configurable
- All Known Subinterfaces:
IdentifierGenerator,OptimizableGenerator,PersistentIdentifierGenerator,PostInsertIdentifierGenerator
- All Known Implementing Classes:
AbstractPostInsertGenerator,AbstractUUIDGenerator,CompositeNestedGeneratedValueGenerator,ForeignGenerator,GUIDGenerator,IdentityGenerator,IncrementGenerator,NativeGenerator,OrderedSequenceGenerator,SelectGenerator,SequenceStyleGenerator,TableGenerator,UUIDGenerator,UUIDHexGenerator
public interface Configurable
A
Generator that supports "configuration".-
Method Summary
Modifier and TypeMethodDescriptiondefault voidconfigure(GeneratorCreationContext creationContext, Properties parameters) Configure this instance, given the value of parameters specified by the user as XML<param>elements and@Parameterannotations.default voidconfigure(Type type, Properties parameters, ServiceRegistry serviceRegistry) Deprecated, for removal: This API element is subject to removal in a future version.default voidinitialize(SqlStringGenerationContext context) Initializes this instance, pre-generating SQL if necessary.
-
Method Details
-
configure
@Deprecated(since="7.0", forRemoval=true) default void configure(Type type, Properties parameters, ServiceRegistry serviceRegistry) throws MappingException Deprecated, for removal: This API element is subject to removal in a future version.Useconfigure(GeneratorCreationContext, Properties)instead- Throws:
MappingException
-
configure
default void configure(GeneratorCreationContext creationContext, Properties parameters) throws MappingException Configure this instance, given the value of parameters specified by the user as XML<param>elements and@Parameterannotations.This method is called just once, following instantiation. If this instance also implements
ExportableProducer, then this method is always called beforeExportableProducer.registerExportables(Database),- Parameters:
creationContext- Access to the generator creation contextparameters- param values, keyed by parameter name- Throws:
MappingException- when there's something wrong with the given parameters
-
initialize
Initializes this instance, pre-generating SQL if necessary.If this instance also implements
ExportableProducer, then this method is always called afterExportableProducer.registerExportables(Database), and before first use.- Parameters:
context- A context to help generate SQL strings
-
configure(GeneratorCreationContext, Properties)instead