Class AbstractDelegatingGeneratorStrategy

java.lang.Object
org.jooq.codegen.AbstractGeneratorStrategy
org.jooq.codegen.AbstractDelegatingGeneratorStrategy
All Implemented Interfaces:
GeneratorStrategy
Direct Known Subclasses:
PrefixSuffixGeneratorStrategy

public abstract class AbstractDelegatingGeneratorStrategy extends AbstractGeneratorStrategy
A GeneratorStrategy that delegates to another one.
Author:
Lukas Eder
  • Field Details

  • Constructor Details

    • AbstractDelegatingGeneratorStrategy

      public AbstractDelegatingGeneratorStrategy()
    • AbstractDelegatingGeneratorStrategy

      public AbstractDelegatingGeneratorStrategy(GeneratorStrategy delegate)
  • Method Details

    • getTargetDirectory

      public String getTargetDirectory()
      Description copied from interface: GeneratorStrategy
      The target directory
    • setTargetDirectory

      public void setTargetDirectory(String directory)
      Description copied from interface: GeneratorStrategy
      Initialise the target directory
    • getTargetPackage

      public String getTargetPackage()
      Returns:
      Get the target package for the current configuration
    • setTargetPackage

      public void setTargetPackage(String packageName)
      Description copied from interface: GeneratorStrategy
      Initialise the target package name
    • getTargetLocale

      public Locale getTargetLocale()
      Returns:
      Get the target locale for the current configuration
    • setTargetLocale

      public void setTargetLocale(Locale targetLocale)
      Description copied from interface: GeneratorStrategy
      Initialise the target locale
    • getTargetLanguage

      public Language getTargetLanguage()
      Returns:
      Get the target language for the current configuration
    • setTargetLanguage

      public void setTargetLanguage(Language targetLanguage)
      Description copied from interface: GeneratorStrategy
      Initialise the target language
    • setInstanceFields

      public void setInstanceFields(boolean instanceFields)
      Description copied from interface: GeneratorStrategy
      Whether fields are instance fields (as opposed to static fields)
    • getInstanceFields

      public boolean getInstanceFields()
      Description copied from interface: GeneratorStrategy
      Whether fields are instance fields (as opposed to static fields)
    • setJavaBeansGettersAndSetters

      public void setJavaBeansGettersAndSetters(boolean javaBeansGettersAndSetters)
      Description copied from interface: GeneratorStrategy
      Whether getters and setters should be generated JavaBeans style (or jOOQ style).
    • getJavaBeansGettersAndSetters

      public boolean getJavaBeansGettersAndSetters()
      Description copied from interface: GeneratorStrategy
      Whether getters and setters should be generated JavaBeans style (or jOOQ style).
    • setUseTableNameForUnambiguousFKs

      public void setUseTableNameForUnambiguousFKs(boolean useTableNameForUnambiguousFKs)
      Description copied from interface: GeneratorStrategy
      Whether names of unambiguous ForeignKeyDefinition should be based on the referenced TableDefinition.

      When a child table has only one ForeignKeyDefinition towards a parent table, then that path is "unambiguous." In that case, some GeneratorStrategy implementations may choose to use the parent table's TableDefinition for implementations of GeneratorStrategy.getJavaMethodName(Definition), instead of the ForeignKeyDefinition, e.g. for implicit join paths.

      This flag allows for turning off this default behaviour.

    • getUseTableNameForUnambiguousFKs

      public boolean getUseTableNameForUnambiguousFKs()
      Description copied from interface: GeneratorStrategy
      Whether names of unambiguous ForeignKeyDefinition should be based on the referenced TableDefinition.

      When a child table has only one ForeignKeyDefinition towards a parent table, then that path is "unambiguous." In that case, some GeneratorStrategy implementations may choose to use the parent table's TableDefinition for implementations of GeneratorStrategy.getJavaMethodName(Definition), instead of the ForeignKeyDefinition, e.g. for implicit join paths.

      This flag allows for turning off this default behaviour.

    • getJavaEnumLiteral

      public String getJavaEnumLiteral(EnumDefinition definition, String literal)
      Description copied from interface: GeneratorStrategy
      This is applied to enum literals of a given EnumDefinition.
      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 null or an empty string, then no super class is extended.
    • getJavaClassExtends

      public String getJavaClassExtends(Definition definition, GeneratorStrategy.Mode mode)
      Returns:
      The super class name of the Java class representing this object, e.g. [com.example.AbstractPojo]. If this returns null or 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 null or an empty list, then no interfaces are implemented.
    • getJavaClassImplements

      public List<String> getJavaClassImplements(Definition definition, GeneratorStrategy.Mode mode)
      Returns:
      The implemented interface names of the Java class name representing this object, e.g. [com.example.Pojo]. If this returns null or 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

      public String getFileHeader(Definition definition, GeneratorStrategy.Mode mode)
      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