Interface PostInsertIdentifierGenerator

All Superinterfaces:
Configurable, Generator, OnExecutionGenerator, Serializable
All Known Implementing Classes:
AbstractPostInsertGenerator, IdentityGenerator, SelectGenerator

public interface PostInsertIdentifierGenerator extends OnExecutionGenerator, Configurable
The counterpart to IdentifierGenerator for values generated by the database. This interface is no longer the only way to handle database-generate identifiers. Any OnExecutionGenerator with timing EventTypeSets.INSERT_ONLY may now be used.
See Also:
  • Method Details

    • getEventTypes

      default EnumSet<EventType> getEventTypes()
      Description copied from interface: Generator
      The event types for which this generator should be called to produce a new value.

      Identifier generators must return EventTypeSets.INSERT_ONLY.

      Specified by:
      getEventTypes in interface Generator
      Returns:
      EventTypeSets.INSERT_ONLY
    • writePropertyValue

      default boolean writePropertyValue()
      Description copied from interface: OnExecutionGenerator
      Determines if the property values are written to JDBC as the argument of a JDBC ? parameter.
      Specified by:
      writePropertyValue in interface OnExecutionGenerator
      Returns:
      false, since we don't usually have a meaningful property value for generated identifiers
    • configure

      default void configure(Type type, Properties parameters, ServiceRegistry serviceRegistry)
      Noop default implementation. May be overridden by subtypes.
      Specified by:
      configure in interface Configurable
      Parameters:
      type - The id property type descriptor
      parameters - param values, keyed by parameter name
      serviceRegistry - Access to service that may be needed.