public class ForeignGenerator extends Object implements IdentifierGenerator
ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME| Constructor and Description |
|---|
ForeignGenerator() |
| 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 <param> elements.
|
Serializable |
generate(SharedSessionContractImplementor sessionImplementor,
Object object)
Generate a new identifier.
|
String |
getEntityName()
Getter for property 'entityName'.
|
String |
getPropertyName()
Getter for property 'propertyName'.
|
String |
getRole()
Getter for property 'role'.
|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitinitialize, registerExportables, supportsJdbcBatchInsertspublic String getEntityName()
public String getPropertyName()
public String getRole()
property name qualified by the
entity name.public void configure(Type type, Properties params, ServiceRegistry serviceRegistry) throws MappingException
IdentifierGenerator
This method is called just once, following instantiation, and before IdentifierGenerator.registerExportables(Database).
configure in interface Configurableconfigure in interface IdentifierGeneratortype - The id property type descriptorparams - param values, keyed by parameter nameserviceRegistry - Access to service that may be needed.MappingException - If configuration fails.public Serializable generate(SharedSessionContractImplementor sessionImplementor, Object object)
IdentifierGeneratorgenerate in interface IdentifierGeneratorsessionImplementor - The session from which the request originatesobject - the entity or collection (idbag) for which the id is being generatedCopyright © 2001-2021 Red Hat, Inc. All Rights Reserved.