Top Description Inners Methods
org.hibernate.boot.model

public Interface IdGeneratorStrategyInterpreter

Known Direct Implementers
org.hibernate.boot.internal.IdGeneratorInterpreterImpl, org.hibernate.boot.internal.IdGeneratorInterpreterImpl.LegacyFallbackInterpreter, org.hibernate.boot.internal.IdGeneratorInterpreterImpl.FallbackInterpreter
Imports
javax.persistence.GeneratedValue, .GenerationType, .SequenceGenerator, .TableGenerator

Strategy for interpreting identifier generator related information.
Author
Steve Ebersole

Nested and Inner Type Summary

Modifier and TypeClass and Description
public static interface

Method Summary

Modifier and TypeMethod and Description
public String

Returns:

The org.hibernate.id.IdentifierGenerator name (FQN, short name, etc)
determineGeneratorName
(GenerationType generationType, IdGeneratorStrategyInterpreter.GeneratorNameDeterminationContext
The context for resolution (method parameter object)
context
)

Determine the name of the generator which should be used based on the GenerationType, returning null to indicate that this interpreter did not have a match and that any additional resolutions should be performed.

public void
interpretSequenceGenerator(SequenceGenerator
The annotation
sequenceGeneratorAnnotation
,
IdentifierGeneratorDefinition.Builder
The IdentifierGeneratorDefinition builder to which to apply any interpreted/extracted configuration
definitionBuilder
)

Extract the IdentifierGeneratorDefinition related to the given SequenceGenerator annotation

public void
interpretTableGenerator(TableGenerator
The annotation
tableGeneratorAnnotation
,
IdentifierGeneratorDefinition.Builder
The IdentifierGeneratorDefinition builder to which to apply any interpreted/extracted configuration
definitionBuilder
)

Extract the IdentifierGeneratorDefinition related to the given TableGenerator annotation

Method Detail

determineGeneratorNameback to summary
public String determineGeneratorName(GenerationType generationType, IdGeneratorStrategyInterpreter.GeneratorNameDeterminationContext context)

Determine the name of the generator which should be used based on the GenerationType, returning null to indicate that this interpreter did not have a match and that any additional resolutions should be performed.

API Note

Not really a great name as it is a bit confusing. What is really being resolved here is the name of the org.hibernate.id.IdentifierGenerator to use. This is (generally) different than the GeneratedValue#generator() name for the GeneratedValue that is the source of the passed GenerationType. For implementations that need it, the GeneratedValue#generator() is passed as part of the `context`.

Parameters
generationType:GenerationType

The javax.persistence.GeneratedValue#strategy value

context:IdGeneratorStrategyInterpreter.GeneratorNameDeterminationContext

The context for resolution (method parameter object)

Returns:String

The org.hibernate.id.IdentifierGenerator name (FQN, short name, etc)

interpretSequenceGeneratorback to summary
public void interpretSequenceGenerator(SequenceGenerator sequenceGeneratorAnnotation, IdentifierGeneratorDefinition.Builder definitionBuilder)

Extract the IdentifierGeneratorDefinition related to the given SequenceGenerator annotation

Parameters
sequenceGeneratorAnnotation:SequenceGenerator

The annotation

definitionBuilder:IdentifierGeneratorDefinition.Builder

The IdentifierGeneratorDefinition builder to which to apply any interpreted/extracted configuration

interpretTableGeneratorback to summary
public void interpretTableGenerator(TableGenerator tableGeneratorAnnotation, IdentifierGeneratorDefinition.Builder definitionBuilder)

Extract the IdentifierGeneratorDefinition related to the given TableGenerator annotation

Parameters
tableGeneratorAnnotation:TableGenerator

The annotation

definitionBuilder:IdentifierGeneratorDefinition.Builder

The IdentifierGeneratorDefinition builder to which to apply any interpreted/extracted configuration

org.hibernate.boot.model back to summary

public Interface IdGeneratorStrategyInterpreter.GeneratorNameDeterminationContext


Method Summary

Modifier and TypeMethod and Description
public String
public Class<T>
getIdType()

The Java type of the attribute defining the id whose value is to be generated.

Method Detail

getGeneratedValueGeneratorNameback to summary
public String getGeneratedValueGeneratorName()

The GeneratedValue#generator() name.

getIdTypeback to summary
public Class<T> getIdType()

The Java type of the attribute defining the id whose value is to be generated.