public class SelectGenerator extends AbstractPostInsertGenerator implements Configurable
A generator that selects the just inserted row to determine the identifier value assigned by the database. The correct row is located using a unique key. <p/> One mapping parameter is required: key (unless a natural-id is defined in the mapping).
Modifier and Type | Class and Description |
---|---|
static class |
SelectGenerator.SelectGeneratorDelegate
The delegate for the select generation strategy.
|
ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME
Constructor and Description |
---|
SelectGenerator() |
Modifier and Type | Method and Description |
---|---|
void |
configure(Type type,
Properties params,
ServiceRegistry serviceRegistry)
Configure this instance, given the value of parameters
specified by the user as <tt><param></tt> elements.
|
InsertGeneratedIdentifierDelegate |
getInsertGeneratedIdentifierDelegate(PostInsertIdentityPersister persister,
Dialect dialect,
boolean isGetGeneratedKeysEnabled) |
determineBulkInsertionIdentifierGenerationSelectFragment, generate, supportsBulkInsertionIdentifierGeneration
public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException
Configurable
Configure this instance, given the value of parameters specified by the user as <tt><param></tt> elements. This method is called just once, following instantiation.
configure
in interface Configurable
type
- The id property type descriptorparams
- param values, keyed by parameter nameserviceRegistry
- Access to service that may be needed.MappingException
public InsertGeneratedIdentifierDelegate getInsertGeneratedIdentifierDelegate(PostInsertIdentityPersister persister, Dialect dialect, boolean isGetGeneratedKeysEnabled) throws HibernateException
getInsertGeneratedIdentifierDelegate
in interface PostInsertIdentifierGenerator
HibernateException
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.