Top Description Fields Constructors Methods
org.hibernate.generator.internal

public Class GeneratedGeneration

extends Object
implements OnExecutionGenerator
Class Inheritance
All Implemented Interfaces
org.hibernate.generator.OnExecutionGenerator, org.hibernate.generator.Generator, java.io.Serializable
Imports
org.hibernate.annotations.Generated, .GenerationTime, org.hibernate.dialect.Dialect, org.hibernate.generator.EventType, .OnExecutionGenerator, java.util.EnumSet

A fairly generic OnExecutionGenerator which marks a property as generated in the database with semantics given explicitly by a @Generated annotation.
Authors
Steve Ebersole, Gunnar Morling
See Also
Generated

Field Summary

Modifier and TypeField and Description
private final EnumSet<EventType>
private final String[]
private final boolean

Constructor Summary

AccessConstructor and Description
public
GeneratedGeneration(GenerationTime event)

Deprecated as a consequence of GenerationTime being deprecated.
public

Method Summary

Modifier and TypeMethod and Description
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.
public String[]
getReferencedColumnValues(Dialect
The SQL dialect, allowing generation of an expression in dialect-specific SQL.
dialect
)

Implements org.hibernate.generator.OnExecutionGenerator.getReferencedColumnValues.

A SQL expression indicating how to calculate the generated values when the mapped columns are included in the SQL statement.
public boolean
referenceColumnsInSql(Dialect dialect)

Implements org.hibernate.generator.OnExecutionGenerator.referenceColumnsInSql.

Determines if the columns whose values are generated are included in the column list of the SQL insert or update statement.
public boolean
writePropertyValue()

Implements org.hibernate.generator.OnExecutionGenerator.writePropertyValue.

Determines if the property values are written to JDBC as the argument of a JDBC ?
Inherited from java.lang.Object:
cloneequalsfinalizegetClasshashCodenotifynotifyAlltoStringwaitwaitwait

Field Detail

eventTypesback to summary
private final EnumSet<EventType> eventTypes
sqlback to summary
private final String[] sql
writableback to summary
private final boolean writable

Constructor Detail

GeneratedGenerationback to summary
public GeneratedGeneration(GenerationTime event)

Deprecated

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

GeneratedGenerationback to summary
public GeneratedGeneration(Generated annotation)

Method Detail

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
getReferencedColumnValuesback to summary
public String[] getReferencedColumnValues(Dialect dialect)

Implements org.hibernate.generator.OnExecutionGenerator.getReferencedColumnValues.

Doc from org.hibernate.generator.OnExecutionGenerator.getReferencedColumnValues.

A SQL expression indicating how to calculate the generated values when the mapped columns are included in the SQL statement. The SQL expressions might be:

  • function calls like current_timestamp or nextval('mysequence'), or
  • syntactic markers like default.
Parameters
dialect:Dialect

The SQL dialect, allowing generation of an expression in dialect-specific SQL.

Returns:String[]

The column value to be used in the generated SQL statement.

Annotations
@Override
referenceColumnsInSqlback to summary
public boolean referenceColumnsInSql(Dialect dialect)

Implements org.hibernate.generator.OnExecutionGenerator.referenceColumnsInSql.

Doc from org.hibernate.generator.OnExecutionGenerator.referenceColumnsInSql.

Determines if the columns whose values are generated are included in the column list of the SQL insert or update statement. For example, this method should return:

Returns:boolean

true if the column is included in the column list of the SQL statement.

Annotations
@Override
writePropertyValueback to summary
public boolean writePropertyValue()

Implements org.hibernate.generator.OnExecutionGenerator.writePropertyValue.

Doc from org.hibernate.generator.OnExecutionGenerator.writePropertyValue.

Determines if the property values are written to JDBC as the argument of a JDBC ? parameter.

Annotations
@Override