Package org.hibernate.id
Interface PostInsertIdentifierGenerator
- All Superinterfaces:
Configurable,Generator,OnExecutionGenerator,Serializable
- All Known Implementing Classes:
AbstractPostInsertGenerator,IdentityGenerator,SelectGenerator
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 Summary
Modifier and TypeMethodDescriptiondefault voidconfigure(Type type, Properties parameters, ServiceRegistry serviceRegistry) Noop default implementation.The event types for which this generator should be called to produce a new value.default booleanDetermines if the property values are written to JDBC as the argument of a JDBC?parameter.Methods inherited from interface org.hibernate.id.Configurable
configure, initializeMethods inherited from interface org.hibernate.generator.Generator
allowAssignedIdentifiers, allowMutation, generatedBeforeExecution, generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimesMethods inherited from interface org.hibernate.generator.OnExecutionGenerator
generatedOnExecution, getGeneratedIdentifierDelegate, getReferencedColumnValues, getUniqueKeyPropertyNames, referenceColumnsInSql
-
Method Details
-
getEventTypes
Description copied from interface:GeneratorThe event types for which this generator should be called to produce a new value.Identifier generators must return
EventTypeSets.INSERT_ONLY.- Specified by:
getEventTypesin interfaceGenerator- Returns:
EventTypeSets.INSERT_ONLY
-
writePropertyValue
default boolean writePropertyValue()Description copied from interface:OnExecutionGeneratorDetermines if the property values are written to JDBC as the argument of a JDBC?parameter.- Specified by:
writePropertyValuein interfaceOnExecutionGenerator- Returns:
false, since we don't usually have a meaningful property value for generated identifiers
-
configure
Noop default implementation. May be overridden by subtypes.- Specified by:
configurein interfaceConfigurable
-