org.hibernate.id
Class AbstractPostInsertGenerator
java.lang.Object
org.hibernate.id.AbstractPostInsertGenerator
- All Implemented Interfaces:
- BulkInsertionCapableIdentifierGenerator, IdentifierGenerator, PostInsertIdentifierGenerator
- Direct Known Subclasses:
- IdentityGenerator, SelectGenerator
public abstract class AbstractPostInsertGenerator
- extends Object
- implements PostInsertIdentifierGenerator, BulkInsertionCapableIdentifierGenerator
Basic implementation of the PostInsertIdentifierGenerator
contract.
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractPostInsertGenerator
public AbstractPostInsertGenerator()
generate
public Serializable generate(SessionImplementor s,
Object obj)
- Description copied from interface:
IdentifierGenerator
- Generate a new identifier.
- Specified by:
generate
in interface IdentifierGenerator
obj
- the entity or toplevel collection for which the id is being generated
- Returns:
- a new identifier
supportsBulkInsertionIdentifierGeneration
public boolean supportsBulkInsertionIdentifierGeneration()
- Description copied from interface:
BulkInsertionCapableIdentifierGenerator
- 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
- Specified by:
supportsBulkInsertionIdentifierGeneration
in interface BulkInsertionCapableIdentifierGenerator
- Returns:
true
if bulk insertions are supported; false
otherwise.
determineBulkInsertionIdentifierGenerationSelectFragment
public String determineBulkInsertionIdentifierGenerationSelectFragment(Dialect dialect)
- Description copied from interface:
BulkInsertionCapableIdentifierGenerator
- Return the select expression fragment, if any, that generates the identifier values.
- Specified by:
determineBulkInsertionIdentifierGenerationSelectFragment
in interface BulkInsertionCapableIdentifierGenerator
- Parameters:
dialect
- The dialect against which the insert will be performed.
- Returns:
- The identifier value generation fragment (SQL).
null
indicates that no fragment is needed.
Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.