- All Implemented Interfaces:
GeneratorStrategy
- Direct Known Subclasses:
PrefixSuffixGeneratorStrategy
GeneratorStrategy that delegates to another one.- Author:
- Lukas Eder
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jooq.codegen.GeneratorStrategy
GeneratorStrategy.Mode -
Field Summary
Fields -
Constructor Summary
ConstructorsConstructorDescription -
Method Summary
Modifier and TypeMethodDescriptiongetFileHeader(Definition definition, GeneratorStrategy.Mode mode) getGlobalReferencesFileHeader(Definition container, Class<? extends Definition> objectType) getGlobalReferencesJavaClassExtends(Definition container, Class<? extends Definition> objectType) getGlobalReferencesJavaClassImplements(Definition container, Class<? extends Definition> objectType) getGlobalReferencesJavaClassName(Definition container, Class<? extends Definition> objectType) getGlobalReferencesJavaPackageName(Definition container, Class<? extends Definition> objectType) booleanWhether fields are instance fields (as opposed to static fields)booleanWhether getters and setters should be generated JavaBeans style (or jOOQ style).getJavaClassExtends(Definition definition, GeneratorStrategy.Mode mode) getJavaClassImplements(Definition definition, GeneratorStrategy.Mode mode) getJavaEnumLiteral(EnumDefinition definition, String literal) This is applied to enum literals of a givenEnumDefinition.getOverloadSuffix(Definition definition, GeneratorStrategy.Mode mode, String overloadIndex) The target directorybooleanWhether names of unambiguousForeignKeyDefinitionshould be based on the referencedTableDefinition.voidsetInstanceFields(boolean instanceFields) Whether fields are instance fields (as opposed to static fields)voidsetJavaBeansGettersAndSetters(boolean javaBeansGettersAndSetters) Whether getters and setters should be generated JavaBeans style (or jOOQ style).voidsetTargetDirectory(String directory) Initialise the target directoryvoidsetTargetLanguage(Language targetLanguage) Initialise the target languagevoidsetTargetLocale(Locale targetLocale) Initialise the target localevoidsetTargetPackage(String packageName) Initialise the target package namevoidsetUseTableNameForUnambiguousFKs(boolean useTableNameForUnambiguousFKs) Whether names of unambiguousForeignKeyDefinitionshould be based on the referencedTableDefinition.Methods inherited from class org.jooq.codegen.AbstractGeneratorStrategy
getFile, getFile, getFile, getFileHeader, getFileName, getFileName, getFileRoot, getFullJavaClassName, getFullJavaClassName, getFullJavaIdentifier, getFullJavaIdentifiers, getFullJavaIdentifiers, getGlobalReferencesFile, getGlobalReferencesFileName, getGlobalReferencesFullJavaClassName, getJavaClassExtends, getJavaClassImplements, getJavaClassName, getJavaEnumLiterals, getJavaEnumLiterals, getJavaGetterName, getJavaIdentifiers, getJavaIdentifiers, getJavaMemberName, getJavaMethodName, getJavaPackageName, getJavaSetterNameMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jooq.codegen.GeneratorStrategy
getJavaClassName, getJavaGetterName, getJavaIdentifier, getJavaMemberName, getJavaMethodName, getJavaPackageName, getJavaSetterName
-
Field Details
-
delegate
-
-
Constructor Details
-
AbstractDelegatingGeneratorStrategy
public AbstractDelegatingGeneratorStrategy() -
AbstractDelegatingGeneratorStrategy
-
-
Method Details
-
getTargetDirectory
Description copied from interface:GeneratorStrategyThe target directory -
setTargetDirectory
Description copied from interface:GeneratorStrategyInitialise the target directory -
getTargetPackage
- Returns:
- Get the target package for the current configuration
-
setTargetPackage
Description copied from interface:GeneratorStrategyInitialise the target package name -
getTargetLocale
- Returns:
- Get the target locale for the current configuration
-
setTargetLocale
Description copied from interface:GeneratorStrategyInitialise the target locale -
getTargetLanguage
- Returns:
- Get the target language for the current configuration
-
setTargetLanguage
Description copied from interface:GeneratorStrategyInitialise the target language -
setInstanceFields
public void setInstanceFields(boolean instanceFields) Description copied from interface:GeneratorStrategyWhether fields are instance fields (as opposed to static fields) -
getInstanceFields
public boolean getInstanceFields()Description copied from interface:GeneratorStrategyWhether fields are instance fields (as opposed to static fields) -
setJavaBeansGettersAndSetters
public void setJavaBeansGettersAndSetters(boolean javaBeansGettersAndSetters) Description copied from interface:GeneratorStrategyWhether getters and setters should be generated JavaBeans style (or jOOQ style). -
getJavaBeansGettersAndSetters
public boolean getJavaBeansGettersAndSetters()Description copied from interface:GeneratorStrategyWhether getters and setters should be generated JavaBeans style (or jOOQ style). -
setUseTableNameForUnambiguousFKs
public void setUseTableNameForUnambiguousFKs(boolean useTableNameForUnambiguousFKs) Description copied from interface:GeneratorStrategyWhether names of unambiguousForeignKeyDefinitionshould be based on the referencedTableDefinition.When a child table has only one
ForeignKeyDefinitiontowards a parent table, then that path is "unambiguous." In that case, someGeneratorStrategyimplementations may choose to use the parent table'sTableDefinitionfor implementations ofGeneratorStrategy.getJavaMethodName(Definition), instead of theForeignKeyDefinition, e.g. for implicit join paths.This flag allows for turning off this default behaviour.
-
getUseTableNameForUnambiguousFKs
public boolean getUseTableNameForUnambiguousFKs()Description copied from interface:GeneratorStrategyWhether names of unambiguousForeignKeyDefinitionshould be based on the referencedTableDefinition.When a child table has only one
ForeignKeyDefinitiontowards a parent table, then that path is "unambiguous." In that case, someGeneratorStrategyimplementations may choose to use the parent table'sTableDefinitionfor implementations ofGeneratorStrategy.getJavaMethodName(Definition), instead of theForeignKeyDefinition, e.g. for implicit join paths.This flag allows for turning off this default behaviour.
-
getJavaEnumLiteral
Description copied from interface:GeneratorStrategyThis is applied to enum literals of a givenEnumDefinition.- Returns:
- The Java identifier representing this enum literal, e.g. [OK]
-
getGlobalReferencesJavaClassExtends
public String getGlobalReferencesJavaClassExtends(Definition container, Class<? extends Definition> objectType) - Returns:
- The super class name of the global references class for a given
definition type, e.g. [com.example.AbstractPojo]. If this returns
nullor an empty string, then no super class is extended.
-
getJavaClassExtends
- Returns:
- The super class name of the Java class representing this object,
e.g. [com.example.AbstractPojo]. If this returns
nullor an empty string, then no super class is extended.
-
getGlobalReferencesJavaClassImplements
public List<String> getGlobalReferencesJavaClassImplements(Definition container, Class<? extends Definition> objectType) - Returns:
- The implemented interface names of the global references class
for a given definition type, e.g. [com.example.Pojo]. If this
returns
nullor an empty list, then no interfaces are implemented.
-
getJavaClassImplements
- Returns:
- The implemented interface names of the Java class name
representing this object, e.g. [com.example.Pojo]. If this
returns
nullor an empty list, then no interfaces are implemented.
-
getGlobalReferencesJavaClassName
public String getGlobalReferencesJavaClassName(Definition container, Class<? extends Definition> objectType) - Returns:
- The Java class name of the global references class for a given definition type, e.g. [MyTableSuffix]
-
getGlobalReferencesJavaPackageName
public String getGlobalReferencesJavaPackageName(Definition container, Class<? extends Definition> objectType) - Returns:
- The Java package name of the global references class for a given definition type, e.g. [org.jooq.generated]
-
getGlobalReferencesFileHeader
public String getGlobalReferencesFileHeader(Definition container, Class<? extends Definition> objectType) - Returns:
- The Java class file header of the global references class for a
given definition type, e.g.
This file is generated by jOOQ.
-
getFileHeader
- Returns:
- The Java class file header, e.g.
This file is generated by jOOQ.
-
getOverloadSuffix
public String getOverloadSuffix(Definition definition, GeneratorStrategy.Mode mode, String overloadIndex) - Returns:
- The overload suffix to be applied when generating overloaded
routine artefacts, e.g.
"_OverloadIndex_" + overloadIndex
-