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 void
configure
(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 boolean
Determines if the property values are written to JDBC as the argument of a JDBC?
parameter.Methods inherited from interface org.hibernate.id.Configurable
initialize
Methods inherited from interface org.hibernate.generator.Generator
allowAssignedIdentifiers, generatedOnExecution, generatesOnInsert, generatesOnUpdate, generatesSometimes
Methods inherited from interface org.hibernate.generator.OnExecutionGenerator
generatedOnExecution, getGeneratedIdentifierDelegate, getReferencedColumnValues, getUniqueKeyPropertyNames, referenceColumnsInSql
-
Method Details
-
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
Noop default implementation. May be overridden by subtypes.- Specified by:
configure
in interfaceConfigurable
- Parameters:
type
- The id property type descriptorparameters
- param values, keyed by parameter nameserviceRegistry
- Access to service that may be needed.
-