Package org.hibernate.id
Interface BulkInsertionCapableIdentifierGenerator
-
- All Superinterfaces:
Configurable,ExportableProducer,IdentifierGenerator
- All Known Implementing Classes:
AbstractPostInsertGenerator,IdentityGenerator,SelectGenerator,SequenceGenerator,SequenceHiLoGenerator,SequenceIdentityGenerator,SequenceStyleGenerator
public interface BulkInsertionCapableIdentifierGenerator extends IdentifierGenerator
Specialized contract forIdentifierGeneratorimplementations capable of being used in conjunction with HQL insert statements.
-
-
Field Summary
-
Fields inherited from interface org.hibernate.id.IdentifierGenerator
ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description default java.lang.StringdetermineBulkInsertionIdentifierGenerationSelectFragment(SqlStringGenerationContext context)Return the select expression fragment, if any, that generates the identifier values.default java.lang.StringdetermineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)Return the select expression fragment, if any, that generates the identifier values.booleansupportsBulkInsertionIdentifierGeneration()Given the configuration of this generator, is identifier generation as part of bulk insertion supported?-
Methods inherited from interface org.hibernate.id.IdentifierGenerator
configure, generate, initialize, registerExportables, supportsJdbcBatchInserts
-
-
-
-
Method Detail
-
supportsBulkInsertionIdentifierGeneration
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:
trueif bulk insertions are supported;falseotherwise.
-
determineBulkInsertionIdentifierGenerationSelectFragment
default java.lang.String determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)
Return the select expression fragment, if any, that generates the identifier values.- Parameters:
dialect- The dialect against which the insert will be performed.- Returns:
- The identifier value generation fragment (SQL).
nullindicates that no fragment is needed.
-
determineBulkInsertionIdentifierGenerationSelectFragment
default java.lang.String determineBulkInsertionIdentifierGenerationSelectFragment(SqlStringGenerationContext context)
Return the select expression fragment, if any, that generates the identifier values.- Parameters:
context- A context for SQL string generation.- Returns:
- The identifier value generation fragment (SQL).
nullindicates that no fragment is needed.
-
-