public abstract class AbstractPostInsertGenerator extends Object implements PostInsertIdentifierGenerator, BulkInsertionCapableIdentifierGenerator
PostInsertIdentifierGenerator
contract.ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
Constructor and Description |
---|
AbstractPostInsertGenerator() |
Modifier and Type | Method and Description |
---|---|
String |
determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)
Return the select expression fragment, if any, that generates the identifier values.
|
Serializable |
generate(SharedSessionContractImplementor s,
Object obj)
Generate a new identifier.
|
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
|
boolean |
supportsJdbcBatchInserts()
Check if JDBC batch inserts are supported.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
getInsertGeneratedIdentifierDelegate
public Serializable generate(SharedSessionContractImplementor s, Object obj)
IdentifierGenerator
generate
in interface IdentifierGenerator
s
- The session from which the request originatesobj
- the entity or collection (idbag) for which the id is being generatedpublic boolean supportsBulkInsertionIdentifierGeneration()
BulkInsertionCapableIdentifierGenerator
supportsBulkInsertionIdentifierGeneration
in interface BulkInsertionCapableIdentifierGenerator
true
if bulk insertions are supported; false
otherwise.public String determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)
BulkInsertionCapableIdentifierGenerator
determineBulkInsertionIdentifierGenerationSelectFragment
in interface BulkInsertionCapableIdentifierGenerator
dialect
- The dialect against which the insert will be performed.null
indicates that no fragment is needed.public boolean supportsJdbcBatchInserts()
IdentifierGenerator
supportsJdbcBatchInserts
in interface IdentifierGenerator
Copyright © 2021 JBoss by Red Hat. All rights reserved.