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 toIdentifierGeneratorfor values generated by the database. This interface is no longer the only way to handle database-generate identifiers. AnyOnExecutionGeneratorwith timingEventTypeSets.INSERT_ONLYmay now be used.- See Also:
IdentifierGenerator
-
-
Method Summary
All Methods Instance Methods Default Methods Modifier and Type Method Description default voidconfigure(Type type, Properties parameters, 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 booleanwritePropertyValue()Determines if the property values are written to JDBC as the argument of a JDBC?parameter.-
Methods inherited from interface org.hibernate.id.Configurable
create, 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 Detail
-
getEventTypes
default EnumSet<EventType> 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
default void configure(Type type, Properties parameters, ServiceRegistry serviceRegistry)
Noop default implementation. May be overridden by subtypes.- Specified by:
configurein interfaceConfigurable- Parameters:
type- The id property type descriptorparameters- param values, keyed by parameter nameserviceRegistry- Access to service that may be needed.
-
-