- All Known Implementing Classes:
AbstractDelegatingGeneratorStrategy,AbstractGeneratorStrategy,DefaultGeneratorStrategy,JPrefixGeneratorStrategy,JVMArgsGeneratorStrategy,KeepNamesGeneratorStrategy,MatcherStrategy,PrefixSuffixGeneratorStrategy
Definition's- Author:
- Lukas Eder
-
Nested Class Summary
Nested ClassesModifier and TypeInterfaceDescriptionstatic enumThe "mode" by which an artefact should be named -
Method Summary
Modifier and TypeMethodDescriptiongetFile(Definition definition) getFile(Definition definition, GeneratorStrategy.Mode mode) getFileHeader(Definition definition) getFileHeader(Definition definition, GeneratorStrategy.Mode mode) getFileName(Definition definition) getFileName(Definition definition, GeneratorStrategy.Mode mode) getFullJavaClassName(Definition definition) getFullJavaClassName(Definition definition, GeneratorStrategy.Mode mode) This is the same as callinggetFullJavaClassName(definition, Mode.DEFAULT)getFullJavaIdentifier(Definition definition) This is applied to definitions that can result in reference static and instance members.getFullJavaIdentifiers(Collection<? extends Definition> definitions) getFullJavaIdentifiers(Definition... definitions) getGlobalNamesFile(Definition container, Class<? extends Definition> objectType) getGlobalNamesFileHeader(Definition container, Class<? extends Definition> objectType) getGlobalNamesFileName(Definition container, Class<? extends Definition> objectType) getGlobalNamesFullJavaClassName(Definition container, Class<? extends Definition> objectType) getGlobalNamesJavaClassExtends(Definition container, Class<? extends Definition> objectType) getGlobalNamesJavaClassImplements(Definition container, Class<? extends Definition> objectType) getGlobalNamesJavaClassName(Definition container, Class<? extends Definition> objectType) getGlobalNamesJavaPackageName(Definition container, Class<? extends Definition> objectType) getGlobalReferencesFile(Definition container, Class<? extends Definition> objectType) getGlobalReferencesFileHeader(Definition container, Class<? extends Definition> objectType) getGlobalReferencesFileName(Definition container, Class<? extends Definition> objectType) getGlobalReferencesFullJavaClassName(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) This is the same as callinggetJavaClassExtends(definition, Mode.DEFAULT)getJavaClassExtends(Definition definition, GeneratorStrategy.Mode mode) getJavaClassImplements(Definition definition) This is the same as callinggetJavaClassImplements(definition, Mode.DEFAULT)getJavaClassImplements(Definition definition, GeneratorStrategy.Mode mode) getJavaClassName(Definition definition) This is the same as callinggetJavaClassName(definition, Mode.DEFAULT)getJavaClassName(Definition definition, GeneratorStrategy.Mode mode) getJavaEnumLiteral(EnumDefinition definition, String literal) This is applied to enum literals of a givenEnumDefinition.getJavaEnumLiterals(EnumDefinition definition, String... literals) getJavaEnumLiterals(EnumDefinition definition, Collection<? extends String> literals) getJavaGetterName(Definition definition) This is applied to definitions that can result in getters of a container.getJavaGetterName(Definition definition, GeneratorStrategy.Mode mode) This is applied to definitions that can result in getters of a container.getJavaIdentifier(Definition definition) This is applied to definitions that can result in reference static and instance members.getJavaIdentifiers(Collection<? extends Definition> definitions) getJavaIdentifiers(Definition... definitions) getJavaMemberName(Definition definition) The "java member name" is applied where a definition is used as a member (for POJOs) or as a method argument (for setters).getJavaMemberName(Definition definition, GeneratorStrategy.Mode mode) The "java member name" is applied where a definition is used as a member (for POJOs) or as a method argument (for setters).getJavaMethodName(Definition definition) This is applied to definitions that can result in methods.getJavaMethodName(Definition definition, GeneratorStrategy.Mode mode) This is applied to definitions that can result in methods.getJavaPackageName(Definition definition) This is the same as callinggetJavaPackageName(definition, Mode.DEFAULT)getJavaPackageName(Definition definition, GeneratorStrategy.Mode mode) getJavaSetterName(Definition definition) This is applied to definitions that can result in setters of a container.getJavaSetterName(Definition definition, GeneratorStrategy.Mode mode) This is applied to definitions that can result in setters of a container.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.
-
Method Details
-
getTargetDirectory
String getTargetDirectory()The target directory -
setTargetDirectory
Initialise the target directory -
getTargetPackage
String getTargetPackage()- Returns:
- Get the target package for the current configuration
-
setTargetPackage
Initialise the target package name -
getTargetLocale
Locale getTargetLocale()- Returns:
- Get the target locale for the current configuration
-
setTargetLocale
Initialise the target locale -
getTargetLanguage
Language getTargetLanguage()- Returns:
- Get the target language for the current configuration
-
setTargetLanguage
Initialise the target language -
setInstanceFields
void setInstanceFields(boolean instanceFields) Whether fields are instance fields (as opposed to static fields) -
getInstanceFields
boolean getInstanceFields()Whether fields are instance fields (as opposed to static fields) -
setJavaBeansGettersAndSetters
void setJavaBeansGettersAndSetters(boolean javaBeansGettersAndSetters) Whether getters and setters should be generated JavaBeans style (or jOOQ style). -
getJavaBeansGettersAndSetters
boolean getJavaBeansGettersAndSetters()Whether getters and setters should be generated JavaBeans style (or jOOQ style). -
setUseTableNameForUnambiguousFKs
void setUseTableNameForUnambiguousFKs(boolean useTableNameForUnambiguousFKs) Whether 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 ofgetJavaMethodName(Definition), instead of theForeignKeyDefinition, e.g. for implicit join paths.This flag allows for turning off this default behaviour.
-
getUseTableNameForUnambiguousFKs
boolean getUseTableNameForUnambiguousFKs()Whether 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 ofgetJavaMethodName(Definition), instead of theForeignKeyDefinition, e.g. for implicit join paths.This flag allows for turning off this default behaviour.
-
getJavaEnumLiteral
This is applied to enum literals of a givenEnumDefinition.- Returns:
- The Java identifier representing this enum literal, e.g. [OK]
-
getJavaEnumLiterals
- See Also:
-
getJavaEnumLiterals
- See Also:
-
getJavaIdentifier
This is applied to definitions that can result in reference static and instance members. For instance, the reference instance of aTableDefinitionis a java identifier- Returns:
- The Java identifier representing this object, e.g. [my_table]
-
getJavaIdentifiers
- See Also:
-
getJavaIdentifiers
- See Also:
-
getFullJavaIdentifier
This is applied to definitions that can result in reference static and instance members. For instance, the reference instance of aTableDefinitionis a java identifier- Returns:
- The Java identifier representing this object, e.g. [my_table]
-
getFullJavaIdentifiers
- See Also:
-
getFullJavaIdentifiers
- See Also:
-
getJavaSetterName
This is applied to definitions that can result in setters of a container. For example, the definition could be aColumnDefinition, the container aTableDefinition. Then this would apply to records and POJOs. Also, the definition could be anAttributeDefinitionand the container aUDTDefinitionThis is the same as calling
getJavaSetterName(definition, Mode.DEFAULT)- Returns:
- The Java setter method name representing this object, e.g. [setMyTable]
-
getJavaSetterName
This is applied to definitions that can result in setters of a container. For example, the definition could be aColumnDefinition, the container aTableDefinition. Then this would apply to records and POJOs. Also, the definition could be anAttributeDefinitionand the container aUDTDefinition- Returns:
- The Java setter method name representing this object, e.g. [setMyTable]
-
getJavaGetterName
This is applied to definitions that can result in getters of a container. For example, the definition could be aColumnDefinition, the container aTableDefinition. Then this would apply to records and POJOs. Also, the definition could be anAttributeDefinitionand the container aUDTDefinitionThis is the same as calling
getJavaGetterName(definition, Mode.DEFAULT)- Returns:
- The Java getter method name representing this object, e.g. [getMyTable]
-
getJavaGetterName
This is applied to definitions that can result in getters of a container. For example, the definition could be aColumnDefinition, the container aTableDefinition. Then this would apply to records and POJOs. Also, the definition could be anAttributeDefinitionand the container aUDTDefinition- Returns:
- The Java getter method name representing this object, e.g. [getMyTable]
-
getJavaMethodName
This is applied to definitions that can result in methods. For example, the definition could be aRoutineDefinitionThis is the same as calling
getJavaMethodName(definition, Mode.DEFAULT)- Returns:
- The Java method name representing this object, e.g. [myFunction]
-
getJavaMethodName
This is applied to definitions that can result in methods. For example, the definition could be aRoutineDefinition- Returns:
- The Java method name representing this object, e.g. [myFunction]
-
getGlobalNamesJavaClassExtends
- Returns:
- The super class name of the global names class for a given
definition type, e.g. [com.example.AbstractPojo]. If this returns
nullor an empty string, then no super class is extended.
-
getGlobalReferencesJavaClassExtends
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
This is the same as callinggetJavaClassExtends(definition, Mode.DEFAULT)- 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.
-
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.
-
getGlobalNamesJavaClassImplements
List<String> getGlobalNamesJavaClassImplements(Definition container, Class<? extends Definition> objectType) - Returns:
- The implemented interface names of the global names class
for a given definition type, e.g. [com.example.Pojo]. If this
returns
nullor an empty list, then no interfaces are implemented.
-
getGlobalReferencesJavaClassImplements
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
This is the same as callinggetJavaClassImplements(definition, Mode.DEFAULT)- 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.
-
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.
-
getGlobalNamesJavaClassName
- Returns:
- The Java class name of the global names class for a given definition type, e.g. [TableNames]
-
getGlobalReferencesJavaClassName
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]
-
getJavaClassName
This is the same as callinggetJavaClassName(definition, Mode.DEFAULT)- Returns:
- The Java class name representing this object, e.g. [MyTable]
-
getJavaClassName
- Returns:
- The Java class name representing this object, e.g. [MyTableSuffix]
-
getGlobalNamesJavaPackageName
- Returns:
- The Java package name of the global names class for a given definition type, e.g. [org.jooq.generated]
-
getGlobalReferencesJavaPackageName
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]
-
getJavaPackageName
This is the same as callinggetJavaPackageName(definition, Mode.DEFAULT)- Returns:
- The Java package name of this object, e.g. [org.jooq.generated]
-
getJavaPackageName
- Returns:
- The Java package name of this object, e.g. [org.jooq.generated]
-
getJavaMemberName
The "java member name" is applied where a definition is used as a member (for POJOs) or as a method argument (for setters). Example definitions are This is the same as callinggetJavaMemberName(definition, Mode.DEFAULT)- Returns:
- The Java class name representing this object, starting with a lower case character, e.g. [myTable]
-
getJavaMemberName
The "java member name" is applied where a definition is used as a member (for POJOs) or as a method argument (for setters). Example definitions are- Returns:
- The Java class name representing this object, starting with a lower case character, e.g. [myTableSuffix]
-
getGlobalNamesFullJavaClassName
String getGlobalNamesFullJavaClassName(Definition container, Class<? extends Definition> objectType) - Returns:
- The full Java class name of the global names class for a given definition type, e.g. [org.jooq.generated.TableNames]
-
getGlobalReferencesFullJavaClassName
String getGlobalReferencesFullJavaClassName(Definition container, Class<? extends Definition> objectType) - Returns:
- The full Java class name of the global references class for a given definition type, e.g. [org.jooq.generated.MyTable]
-
getFullJavaClassName
- Returns:
- The full Java class name representing this object, e.g. [org.jooq.generated.MyTable]
-
getFullJavaClassName
This is the same as callinggetFullJavaClassName(definition, Mode.DEFAULT)- Returns:
- The full Java class name representing this object, e.g. [org.jooq.generated.MyTable][suffix]
-
getGlobalNamesFileName
- Returns:
- The Java class file name of the global names class for a given definition type, e.g. [TableNames.java]
-
getGlobalReferencesFileName
- Returns:
- The Java class file name of the global references class for a given definition type, e.g. [MyTable.java]
-
getFileName
- Returns:
- The Java class file name representing this object, e.g. [MyTable.java]
-
getFileName
- Returns:
- The Java class file name representing this object, e.g. [MyTableSuffix.java]
-
getFileRoot
File getFileRoot()- Returns:
- The directory containing all Java objects, e.g. [C:\org\jooq\generated]
-
getGlobalNamesFile
- Returns:
- The Java class file name of the global names class for a given definition type, e.g. [C:\org\jooq\generated\TableNames.java]
-
getGlobalReferencesFile
- Returns:
- The Java class file name of the global references class for a given definition type, e.g. [C:\org\jooq\generated\MyTable.java]
-
getFile
- Returns:
- The Java class file name representing this object, e.g. [C:\org\jooq\generated\MyTable.java]
-
getFile
- Returns:
- The Java class file name representing this object, e.g. [C:\org\jooq\generated\MyTableSuffix.java]
-
getFile
- Returns:
- The Java class file name representing this object, e.g. [C:\org\jooq\generated\fileName]
-
getGlobalNamesFileHeader
- Returns:
- The Java class file header of the global names class for a
given definition type, e.g.
This file is generated by jOOQ.
-
getGlobalReferencesFileHeader
- 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.
-
getFileHeader
- Returns:
- The Java class file header, e.g.
This file is generated by jOOQ.
-
getOverloadSuffix
- Returns:
- The overload suffix to be applied when generating overloaded
routine artefacts, e.g.
"_OverloadIndex_" + overloadIndex
-