Package org.hibernate.id
Interface PostInsertIdentifierGenerator
-
- All Superinterfaces:
Configurable
,Generator
,OnExecutionGenerator
,Serializable
- All Known Implementing Classes:
AbstractPostInsertGenerator
,IdentityGenerator
,SelectGenerator
public interface PostInsertIdentifierGenerator extends OnExecutionGenerator, Configurable
The counterpart toIdentifierGenerator
for values generated by the database. This interface is no longer the only way to handle database-generate identifiers. AnyOnExecutionGenerator
with timingEventTypeSets.INSERT_ONLY
may now be used.- See Also:
IdentifierGenerator
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default void
configure(Type type, Properties params, ServiceRegistry serviceRegistry)
Noop default implementation.default EnumSet<EventType>
getEventTypes()
The event types for which this generator should be called to produce a new value.default boolean
writePropertyValue()
Determines if the property values are written to JDBC as the argument of a JDBC?
parameter.-
Methods inherited from interface org.hibernate.generator.Generator
generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimes
-
Methods inherited from interface org.hibernate.generator.OnExecutionGenerator
generatedOnExecution, getGeneratedIdentifierDelegate, getReferencedColumnValues, getUniqueKeyPropertyNames, referenceColumnsInSql
-
-
-
-
Method Detail
-
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 interfaceGenerator
- 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 interfaceOnExecutionGenerator
- Returns:
false
, since we don't usually have a meaningful property value for generated identifiers
-
configure
default void configure(Type type, Properties params, ServiceRegistry serviceRegistry)
Noop default implementation. May be overridden by subtypes.- Specified by:
configure
in interfaceConfigurable
- Parameters:
type
- The id property type descriptorparams
- param values, keyed by parameter nameserviceRegistry
- Access to service that may be needed.
-
-