Interface Configurable

All Known Subinterfaces:
IdentifierGenerator, OptimizableGenerator, PersistentIdentifierGenerator, PostInsertIdentifierGenerator
All Known Implementing Classes:
AbstractPostInsertGenerator, AbstractUUIDGenerator, CompositeNestedGeneratedValueGenerator, ForeignGenerator, GUIDGenerator, IdentityGenerator, IncrementGenerator, SelectGenerator, SequenceStyleGenerator, TableGenerator, UUIDGenerator, UUIDHexGenerator

public interface Configurable
A Generator that supports "configuration".
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    configure(Type type, Properties parameters, ServiceRegistry serviceRegistry)
    Configure this instance, given the value of parameters specified by the user as XML <param> elements and @Parameter annotations.
    default void
    Initializes this instance, pre-generating SQL if necessary.
  • Method Details

    • configure

      void configure(Type type, Properties parameters, ServiceRegistry serviceRegistry) throws MappingException
      Configure this instance, given the value of parameters specified by the user as XML <param> elements and @Parameter annotations.

      This method is called just once, following instantiation. If this instance also implements ExportableProducer, then this method is always called before ExportableProducer.registerExportables(Database),

      Parameters:
      type - The id property type descriptor
      parameters - param values, keyed by parameter name
      serviceRegistry - Access to service that may be needed.
      Throws:
      MappingException - when there's something wrong with the given parameters
    • initialize

      default void initialize(SqlStringGenerationContext context)
      Initializes this instance, pre-generating SQL if necessary.

      If this instance also implements ExportableProducer, then this method is always called after ExportableProducer.registerExportables(Database), and before first use.

      Parameters:
      context - A context to help generate SQL strings