Top Description Fields Methods
org.hibernate.id

public Interface BulkInsertionCapableIdentifierGenerator

extends IdentifierGenerator
Known Direct Implementers
org.hibernate.id.SequenceGenerator, org.hibernate.id.enhanced.SequenceStyleGenerator, org.hibernate.id.AbstractPostInsertGenerator
Imports
org.hibernate.boot.model.relational.SqlStringGenerationContext, org.hibernate.dialect.Dialect

Deprecated

as a consequence of IdentifierGenerator being deprecated. See corresponding docs for further information.

Specialized contract for IdentifierGenerator implementations capable of being used in conjunction with HQL insert statements.
Author
Steve Ebersole

Field Summary

Inherited from org.hibernate.id.IdentifierGenerator:
ENTITY_NAMEGENERATOR_NAMEJPA_ENTITY_NAME

Method Summary

Modifier and TypeMethod and Description
public default String

Returns:

The identifier value generation fragment (SQL). null indicates that no fragment is needed.
determineBulkInsertionIdentifierGenerationSelectFragment
(Dialect
The dialect against which the insert will be performed.
dialect
)

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

public default String

Returns:

The identifier value generation fragment (SQL). null indicates that no fragment is needed.
determineBulkInsertionIdentifierGenerationSelectFragment
(SqlStringGenerationContext
A context for SQL string generation.
context
)

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

public boolean

Returns:

true if bulk insertions are supported; false otherwise.
supportsBulkInsertionIdentifierGeneration
()

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

Inherited from org.hibernate.id.IdentifierGenerator:
configuregenerateinitializeregisterExportablessupportsJdbcBatchInserts

Method Detail

determineBulkInsertionIdentifierGenerationSelectFragmentback to summary
public default String determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)

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

Parameters
dialect:Dialect

The dialect against which the insert will be performed.

Returns:String

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

determineBulkInsertionIdentifierGenerationSelectFragmentback to summary
public default String determineBulkInsertionIdentifierGenerationSelectFragment(SqlStringGenerationContext context)

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.

supportsBulkInsertionIdentifierGenerationback to summary
public boolean 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.