Class DefaultGeneratorStrategy

    • Constructor Detail

      • DefaultGeneratorStrategy

        public DefaultGeneratorStrategy()
    • Method Detail

      • 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).
      • 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
      • 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.
         
      • 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]
      • getJavaIdentifier

        public String getJavaIdentifier​(Definition definition)
        Description copied from interface: GeneratorStrategy
        This is applied to definitions that can result in reference static and instance members. For instance, the reference instance of a TableDefinition is a java identifier
        Returns:
        The Java identifier representing this object, e.g. [my_table]
      • 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]
      • 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