Package org.hibernate.mapping
Class Component.ValueGenerationPlan
- java.lang.Object
-
- org.hibernate.mapping.Component.ValueGenerationPlan
-
- All Implemented Interfaces:
ExportableProducer
,CompositeNestedGeneratedValueGenerator.GenerationPlan
- Enclosing class:
- Component
public static class Component.ValueGenerationPlan extends Object implements CompositeNestedGeneratedValueGenerator.GenerationPlan
-
-
Constructor Summary
Constructors Constructor Description ValueGenerationPlan(Generator subgenerator, Setter injector, int propertyIndex)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Object
execute(SharedSessionContractImplementor session, Object incomingObject)
Execute the value generation.Setter
getInjector()
Returns theinjector
for the generated property.int
getPropertyIndex()
Returns the index of the generated property.void
initialize(SqlStringGenerationContext context)
Initializes this instance, in particular pre-generates SQL as necessary.void
registerExportables(Database database)
Register the contained exportable things to theDatabase
-
-
-
Method Detail
-
getInjector
public Setter getInjector()
Description copied from interface:CompositeNestedGeneratedValueGenerator.GenerationPlan
- Specified by:
getInjector
in interfaceCompositeNestedGeneratedValueGenerator.GenerationPlan
- See Also:
CompositeNestedGeneratedValueGenerator.GenerationPlan.getPropertyIndex()
-
getPropertyIndex
public int getPropertyIndex()
Description copied from interface:CompositeNestedGeneratedValueGenerator.GenerationPlan
Returns the index of the generated property. Used when theCompositeType
is not mutable.- Specified by:
getPropertyIndex
in interfaceCompositeNestedGeneratedValueGenerator.GenerationPlan
- See Also:
CompositeNestedGeneratedValueGenerator.GenerationPlan.getInjector()
-
execute
public Object execute(SharedSessionContractImplementor session, Object incomingObject)
Description copied from interface:CompositeNestedGeneratedValueGenerator.GenerationPlan
Execute the value generation.- Specified by:
execute
in interfaceCompositeNestedGeneratedValueGenerator.GenerationPlan
- Parameters:
session
- The current sessionincomingObject
- The entity for which we are generating id
-
registerExportables
public void registerExportables(Database database)
Description copied from interface:ExportableProducer
Register the contained exportable things to theDatabase
- Specified by:
registerExportables
in interfaceExportableProducer
- Parameters:
database
- The database instance
-
initialize
public void initialize(SqlStringGenerationContext context)
Description copied from interface:CompositeNestedGeneratedValueGenerator.GenerationPlan
Initializes this instance, in particular pre-generates SQL as necessary.This method is called after
ExportableProducer.registerExportables(Database)
, before first use.- Specified by:
initialize
in interfaceCompositeNestedGeneratedValueGenerator.GenerationPlan
- Parameters:
context
- A context to help generate SQL strings
-
-