Top Description Constructors Methods
org.hibernate.id

public abstract Class AbstractPostInsertGenerator

extends Object
implements PostInsertIdentifierGenerator, BulkInsertionCapableIdentifierGenerator
Class Inheritance
All Implemented Interfaces
org.hibernate.id.BulkInsertionCapableIdentifierGenerator, org.hibernate.id.IdentifierGenerator, org.hibernate.boot.model.relational.ExportableProducer, org.hibernate.id.Configurable, org.hibernate.id.PostInsertIdentifierGenerator
Known Direct Subclasses
org.hibernate.id.SelectGenerator, org.hibernate.id.IdentityGenerator
Imports
java.io.Serializable, org.hibernate.boot.model.relational.SqlStringGenerationContext, org.hibernate.dialect.Dialect, org.hibernate.engine.spi.SharedSessionContractImplementor

Deprecated

as a consequence of PostInsertIdentifierGenerator and BulkInsertionCapableIdentifierGenerator being deprecated. See corresponding docs for further information.

Basic implementation of the PostInsertIdentifierGenerator contract.
Author
Gavin King

Constructor Summary

AccessConstructor and Description
public

Method Summary

Modifier and TypeMethod and Description
public String
determineBulkInsertionIdentifierGenerationSelectFragment(SqlStringGenerationContext
A context for SQL string generation.
context
)

Overrides default org.hibernate.id.BulkInsertionCapableIdentifierGenerator.determineBulkInsertionIdentifierGenerationSelectFragment.

Return the select expression fragment, if any, that generates the identifier values.
public Serializable
generate(SharedSessionContractImplementor
The session from which the request originates
s
,
Object
the entity or collection (idbag) for which the id is being generated
obj
)

Implements org.hibernate.id.IdentifierGenerator.generate.

Generate a new identifier.
public boolean
supportsBulkInsertionIdentifierGeneration()

Implements org.hibernate.id.BulkInsertionCapableIdentifierGenerator.supportsBulkInsertionIdentifierGeneration.

Given the configuration of this generator, is identifier generation as part of bulk insertion supported?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Constructor Detail

AbstractPostInsertGeneratorback to summary
public AbstractPostInsertGenerator()

Method Detail

determineBulkInsertionIdentifierGenerationSelectFragmentback to summary
public String determineBulkInsertionIdentifierGenerationSelectFragment(SqlStringGenerationContext context)

Overrides default org.hibernate.id.BulkInsertionCapableIdentifierGenerator.determineBulkInsertionIdentifierGenerationSelectFragment.

Doc from org.hibernate.id.BulkInsertionCapableIdentifierGenerator.determineBulkInsertionIdentifierGenerationSelectFragment.

Return the select expression fragment, if any, that generates the identifier values.

Parameters
context:SqlStringGenerationContext

A context for SQL string generation.

Returns:String

The identifier value generation fragment (SQL). null indicates that no fragment is needed.

Annotations
@Override
generateback to summary
public Serializable generate(SharedSessionContractImplementor s, Object obj)

Implements org.hibernate.id.IdentifierGenerator.generate.

Doc from org.hibernate.id.IdentifierGenerator.generate.

Generate a new identifier.

Parameters
s:SharedSessionContractImplementor

The session from which the request originates

obj:Object

the entity or collection (idbag) for which the id is being generated

Returns:Serializable

a new identifier

Annotations
@Override
supportsBulkInsertionIdentifierGenerationback to summary
public boolean supportsBulkInsertionIdentifierGeneration()

Implements org.hibernate.id.BulkInsertionCapableIdentifierGenerator.supportsBulkInsertionIdentifierGeneration.

Doc from org.hibernate.id.BulkInsertionCapableIdentifierGenerator.supportsBulkInsertionIdentifierGeneration.

Given the configuration of this generator, is identifier generation as part of bulk insertion supported?

IMPL NOTE : Mainly here to allow stuff like SequenceStyleGenerator which *can* support this based on configuration

Returns:boolean

true if bulk insertions are supported; false otherwise.

Annotations
@Override