public class IdGeneratorInterpreterImpl extends java.lang.Object implements IdGeneratorStrategyInterpreter
IdGeneratorStrategyInterpreter.GeneratorNameDeterminationContext
Constructor and Description |
---|
IdGeneratorInterpreterImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addInterpreterDelegate(IdGeneratorStrategyInterpreter delegate) |
java.lang.String |
determineGeneratorName(javax.persistence.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. |
void |
disableLegacyFallback() |
void |
enableLegacyFallback() |
void |
interpretSequenceGenerator(javax.persistence.SequenceGenerator sequenceGeneratorAnnotation,
IdentifierGeneratorDefinition.Builder definitionBuilder)
Extract the IdentifierGeneratorDefinition related to the given SequenceGenerator annotation
|
void |
interpretTableGenerator(javax.persistence.TableGenerator tableGeneratorAnnotation,
IdentifierGeneratorDefinition.Builder definitionBuilder)
Extract the IdentifierGeneratorDefinition related to the given TableGenerator annotation
|
public java.lang.String determineGeneratorName(javax.persistence.GenerationType generationType, IdGeneratorStrategyInterpreter.GeneratorNameDeterminationContext context)
IdGeneratorStrategyInterpreter
null
to indicate that this interpreter
did not have a match and that any additional resolutions should be performed.determineGeneratorName
in interface IdGeneratorStrategyInterpreter
generationType
- The GeneratedValue.strategy()
valuecontext
- The context for resolution (method parameter object)public void interpretTableGenerator(javax.persistence.TableGenerator tableGeneratorAnnotation, IdentifierGeneratorDefinition.Builder definitionBuilder)
IdGeneratorStrategyInterpreter
interpretTableGenerator
in interface IdGeneratorStrategyInterpreter
tableGeneratorAnnotation
- The annotationdefinitionBuilder
- The IdentifierGeneratorDefinition builder to which to apply
any interpreted/extracted configurationpublic void interpretSequenceGenerator(javax.persistence.SequenceGenerator sequenceGeneratorAnnotation, IdentifierGeneratorDefinition.Builder definitionBuilder)
IdGeneratorStrategyInterpreter
interpretSequenceGenerator
in interface IdGeneratorStrategyInterpreter
sequenceGeneratorAnnotation
- The annotationdefinitionBuilder
- The IdentifierGeneratorDefinition builder to which to apply
any interpreted/extracted configurationpublic void enableLegacyFallback()
public void disableLegacyFallback()
public void addInterpreterDelegate(IdGeneratorStrategyInterpreter delegate)
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.