Top Description Methods
org.hibernate.id

public Interface PostInsertIdentifierGenerator

extends OnExecutionGenerator, Configurable
Known Direct Implementers
org.hibernate.id.SelectGenerator, org.hibernate.id.AbstractPostInsertGenerator, org.hibernate.id.IdentityGenerator
Imports
org.hibernate.generator.EventType, .EventTypeSets, .OnExecutionGenerator, org.hibernate.service.ServiceRegistry, org.hibernate.type.Type, java.util.EnumSet, .Properties

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.
Author
Gavin King
See Also
IdentifierGenerator

Method Summary

Modifier and TypeMethod and Description
public default void
configure(Type
The id property type descriptor
type
,
Properties
param values, keyed by parameter name
params
,
ServiceRegistry
Access to service that may be needed.
serviceRegistry
)

Implements org.hibernate.id.Configurable.configure.

Noop default implementation.
public default EnumSet<EventType>
getEventTypes()

Implements org.hibernate.generator.Generator.getEventTypes.

The event types for which this generator should be called to produce a new value.
public default boolean

Returns:

false, since we don't usually have a meaningful property value for generated identifiers
writePropertyValue
()

Implements org.hibernate.generator.OnExecutionGenerator.writePropertyValue.

Determines if the property values are written to JDBC as the argument of a JDBC ?
Inherited from org.hibernate.generator.OnExecutionGenerator:
generatedOnExecutiongetGeneratedIdentifierDelegategetReferencedColumnValuesgetUniqueKeyPropertyNamesreferenceColumnsInSql

Method Detail

configureback to summary
public default void configure(Type type, Properties params, ServiceRegistry serviceRegistry)

Implements org.hibernate.id.Configurable.configure.

Noop default implementation. May be overridden by subtypes.

Parameters
type:Type

Doc from org.hibernate.id.Configurable.configure.

The id property type descriptor

params:Properties

Doc from org.hibernate.id.Configurable.configure.

param values, keyed by parameter name

serviceRegistry:ServiceRegistry

Doc from org.hibernate.id.Configurable.configure.

Access to service that may be needed.

Annotations
@Override
getEventTypesback to summary
public default EnumSet<EventType> getEventTypes()

Implements org.hibernate.generator.Generator.getEventTypes.

Doc from org.hibernate.generator.Generator.getEventTypes.

The event types for which this generator should be called to produce a new value.

Identifier generators must return EventTypeSets#INSERT_ONLY.

Returns:EnumSet<EventType>

EventTypeSets#INSERT_ONLY

Annotations
@Override
writePropertyValueback to summary
public default boolean writePropertyValue()

Implements org.hibernate.generator.OnExecutionGenerator.writePropertyValue.

Doc from org.hibernate.generator.OnExecutionGenerator.writePropertyValue.

Determines if the property values are written to JDBC as the argument of a JDBC ? parameter.

Returns:boolean

false, since we don't usually have a meaningful property value for generated identifiers

Annotations
@Override