public class IdGeneratorInterpreterImpl extends Object implements IdGeneratorStrategyInterpreter
IdGeneratorStrategyInterpreter.GeneratorNameDeterminationContext
Constructor and Description |
---|
IdGeneratorInterpreterImpl() |
Modifier and Type | Method and Description |
---|---|
void |
addInterpreterDelegate(IdGeneratorStrategyInterpreter delegate) |
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. |
void |
disableLegacyFallback() |
void |
enableLegacyFallback() |
void |
interpretSequenceGenerator(SequenceGenerator sequenceGeneratorAnnotation,
IdentifierGeneratorDefinition.Builder definitionBuilder)
Extract the IdentifierGeneratorDefinition related to the given SequenceGenerator annotation
|
void |
interpretTableGenerator(TableGenerator tableGeneratorAnnotation,
IdentifierGeneratorDefinition.Builder definitionBuilder)
Extract the IdentifierGeneratorDefinition related to the given TableGenerator annotation
|
public String determineGeneratorName(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)IdentifierGenerator
name (FQN, short name, etc)public void interpretTableGenerator(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(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 © 2019 JBoss by Red Hat. All rights reserved.