Top Description Fields Constructors Methods
org.hibernate.tuple

public Class VmValueGeneration

extends Object
implements BeforeExecutionGenerator
Class Inheritance
All Implemented Interfaces
org.hibernate.generator.BeforeExecutionGenerator, org.hibernate.generator.Generator, java.io.Serializable
Annotations
@Internal
@Deprecated
since:6.2
Imports
java.lang.reflect.Constructor, java.util.EnumSet, org.hibernate.HibernateException, .Internal, org.hibernate.annotations.GeneratorType, org.hibernate.engine.spi.SharedSessionContractImplementor, org.hibernate.generator.EventType, .BeforeExecutionGenerator

Deprecated

since 6.2.

since GeneratorType is deprecated

A BeforeExecutionGenerator which delegates to a ValueGenerator. Underlies the GeneratorType annotation.
Author
Gunnar Morling

Field Summary

Modifier and TypeField and Description
private final EnumSet<EventType>
private final ValueGenerator<?>
generator

Deprecated as a consequence of ValueGenerator being deprecated.

Constructor Summary

AccessConstructor and Description
public
VmValueGeneration(GeneratorType annotation)

Deprecated as a consequence of GeneratorType being deprecated.

Method Summary

Modifier and TypeMethod and Description
public Object
generate(SharedSessionContractImplementor
The session from which the request originates.
session
,
Object
The instance of the object owning the attribute for which we are generating a value.
owner
,
Object
The current value assigned to the property, or null
currentValue
,
EventType
The type of event that has triggered generation of a new value
eventType
)

Implements org.hibernate.generator.BeforeExecutionGenerator.generate.

Generate a value.
public EnumSet<EventType>
getEventTypes()

Implements org.hibernate.generator.Generator.getEventTypes.

The event types for which this generator should be called to produce a new value.
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eventTypesback to summary
private final EnumSet<EventType> eventTypes
generatorback to summary
private final ValueGenerator<?> generator

Deprecated

as a consequence of ValueGenerator being deprecated. See corresponding docs for further information.

Constructor Detail

VmValueGenerationback to summary
public VmValueGeneration(GeneratorType annotation)

Deprecated

as a consequence of GeneratorType being deprecated. See corresponding docs for further information.

Method Detail

generateback to summary
public Object generate(SharedSessionContractImplementor session, Object owner, Object currentValue, EventType eventType)

Implements org.hibernate.generator.BeforeExecutionGenerator.generate.

Doc from org.hibernate.generator.BeforeExecutionGenerator.generate.

Generate a value.

Parameters
session:SharedSessionContractImplementor

The session from which the request originates.

owner:Object

The instance of the object owning the attribute for which we are generating a value.

currentValue:Object

The current value assigned to the property, or null

eventType:EventType

The type of event that has triggered generation of a new value

Returns:Object

The generated value

Annotations
@Override
getEventTypesback to summary
public EnumSet<EventType> getEventTypes()

Implements org.hibernate.generator.Generator.getEventTypes.

Doc from org.hibernate.generator.Generator.getEventTypes.

The event types for which this generator should be called to produce a new value.

Identifier generators must return EventTypeSets#INSERT_ONLY.

Returns:EnumSet<EventType>

a set of EventTypes.

Annotations
@Override