public class CompositeNestedGeneratedValueGenerator extends Object implements IdentifierGenerator, Serializable, IdentifierGeneratorAggregator
<composite-id/> (notice the lack of both a name and class attribute
 declarations).  The term "embedded"
 here refers to the Hibernate usage which is actually the exact opposite of the JPA
 meaning of "embedded".  Essentially this means that the entity class itself holds
 the named composite pk properties.  This is very similar to the JPA @IdClass
 usage, though without a separate pk-class for loading.
 @EmbeddedId)
 and HBM mappings (<composite-id name="idAttributeName" class="PkClassName"/>)
 @IdClass use case
 and is only possible in annotations
 Component.| Modifier and Type | Class and Description | 
|---|---|
| static interface  | CompositeNestedGeneratedValueGenerator.GenerationContextLocatorContract for declaring how to locate the context for sub-value injection. | 
| static interface  | CompositeNestedGeneratedValueGenerator.GenerationPlanContract for performing the actual sub-value generation, usually injecting it into the
 determined  context | 
ENTITY_NAME, GENERATOR_NAME, JPA_ENTITY_NAME| Constructor and Description | 
|---|
| CompositeNestedGeneratedValueGenerator(CompositeNestedGeneratedValueGenerator.GenerationContextLocator generationContextLocator) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | addGeneratedValuePlan(CompositeNestedGeneratedValueGenerator.GenerationPlan plan) | 
| Serializable | generate(SharedSessionContractImplementor session,
        Object object)Generate a new identifier. | 
| void | registerExportables(Database database)Register the contained exportable things to the  Database | 
public CompositeNestedGeneratedValueGenerator(CompositeNestedGeneratedValueGenerator.GenerationContextLocator generationContextLocator)
public void addGeneratedValuePlan(CompositeNestedGeneratedValueGenerator.GenerationPlan plan)
public Serializable generate(SharedSessionContractImplementor session, Object object) throws HibernateException
IdentifierGeneratorgenerate in interface IdentifierGeneratorsession - The session from which the request originatesobject - the entity or collection (idbag) for which the id is being generatedHibernateException - Indicates trouble generating the identifierpublic void registerExportables(Database database)
ExportableProducerDatabaseregisterExportables in interface ExportableProducerdatabase - The database instanceCopyright © 2019 JBoss by Red Hat. All rights reserved.