- Alle implementierten Schnittstellen:
GeneratorStrategy
- Bekannte direkte Unterklassen:
JPrefixGeneratorStrategy
,JVMArgsGeneratorStrategy
,KeepNamesGeneratorStrategy
,MatcherStrategy
JavaGenerator
- Autor:
- Lukas Eder
-
Verschachtelte Klassen - Übersicht
Von Schnittstelle geerbte verschachtelte Klassen/Schnittstellen org.jooq.codegen.GeneratorStrategy
GeneratorStrategy.Mode
-
Konstruktorübersicht
-
Methodenübersicht
Modifizierer und TypMethodeBeschreibunggetFileHeader
(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) boolean
Whether fields are instance fields (as opposed to static fields)boolean
Whether getters and setters should be generated JavaBeans style (or jOOQ style).getJavaClassExtends
(Definition definition, GeneratorStrategy.Mode mode) getJavaClassImplements
(Definition definition, GeneratorStrategy.Mode mode) getJavaClassName
(Definition definition, GeneratorStrategy.Mode mode) getJavaEnumLiteral
(EnumDefinition definition, String literal) This is applied to enum literals of a givenEnumDefinition
.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.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, GeneratorStrategy.Mode mode) This is applied to definitions that can result in methods.getJavaPackageName
(Definition definition, GeneratorStrategy.Mode mode) 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 directoryboolean
Whether names of unambiguousForeignKeyDefinition
should be based on the referencedTableDefinition
.void
setInstanceFields
(boolean instanceFields) Whether fields are instance fields (as opposed to static fields)void
setJavaBeansGettersAndSetters
(boolean javaBeansGettersAndSetters) Whether getters and setters should be generated JavaBeans style (or jOOQ style).void
setTargetDirectory
(String directory) Initialise the target directoryvoid
setTargetLanguage
(Language targetLanguage) Initialise the target languagevoid
setTargetLocale
(Locale targetLocale) Initialise the target localevoid
setTargetPackage
(String packageName) Initialise the target package namevoid
setUseTableNameForUnambiguousFKs
(boolean useTableNameForUnambiguousFKs) Whether names of unambiguousForeignKeyDefinition
should be based on the referencedTableDefinition
.Von Klasse geerbte Methoden 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, getJavaSetterName
-
Konstruktordetails
-
DefaultGeneratorStrategy
public DefaultGeneratorStrategy()
-
-
Methodendetails
-
setInstanceFields
public void setInstanceFields(boolean instanceFields) Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Whether fields are instance fields (as opposed to static fields) -
getInstanceFields
public boolean getInstanceFields()Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Whether fields are instance fields (as opposed to static fields) -
setJavaBeansGettersAndSetters
public void setJavaBeansGettersAndSetters(boolean javaBeansGettersAndSetters) Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Whether getters and setters should be generated JavaBeans style (or jOOQ style). -
getJavaBeansGettersAndSetters
public boolean getJavaBeansGettersAndSetters()Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Whether getters and setters should be generated JavaBeans style (or jOOQ style). -
setUseTableNameForUnambiguousFKs
public void setUseTableNameForUnambiguousFKs(boolean useTableNameForUnambiguousFKs) Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Whether names of unambiguousForeignKeyDefinition
should be based on the referencedTableDefinition
.When a child table has only one
ForeignKeyDefinition
towards a parent table, then that path is "unambiguous." In that case, someGeneratorStrategy
implementations may choose to use the parent table'sTableDefinition
for 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()Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Whether names of unambiguousForeignKeyDefinition
should be based on the referencedTableDefinition
.When a child table has only one
ForeignKeyDefinition
towards a parent table, then that path is "unambiguous." In that case, someGeneratorStrategy
implementations may choose to use the parent table'sTableDefinition
for implementations ofGeneratorStrategy.getJavaMethodName(Definition)
, instead of theForeignKeyDefinition
, e.g. for implicit join paths.This flag allows for turning off this default behaviour.
-
getTargetDirectory
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
The target directory -
setTargetDirectory
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Initialise the target directory -
getTargetPackage
- Gibt zurück:
- Get the target package for the current configuration
-
setTargetPackage
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Initialise the target package name -
getTargetLocale
- Gibt zurück:
- Get the target locale for the current configuration
-
setTargetLocale
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Initialise the target locale -
getTargetLanguage
- Gibt zurück:
- Get the target language for the current configuration
-
setTargetLanguage
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
Initialise the target language -
getGlobalReferencesFileHeader
public String getGlobalReferencesFileHeader(Definition container, Class<? extends Definition> objectType) - Gibt zurück:
- The Java class file header of the global references class for a
given definition type, e.g.
This file is generated by jOOQ.
-
getFileHeader
- Gibt zurück:
- The Java class file header, e.g.
This file is generated by jOOQ.
-
getJavaEnumLiteral
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
This is applied to enum literals of a givenEnumDefinition
.- Gibt zurück:
- The Java identifier representing this enum literal, e.g. [OK]
-
getJavaIdentifier
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
This is applied to definitions that can result in reference static and instance members. For instance, the reference instance of aTableDefinition
is a java identifier- Gibt zurück:
- The Java identifier representing this object, e.g. [my_table]
-
getJavaSetterName
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
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 anAttributeDefinition
and the container aUDTDefinition
- Gibt zurück:
- The Java setter method name representing this object, e.g. [setMyTable]
-
getJavaGetterName
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
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 anAttributeDefinition
and the container aUDTDefinition
- Gibt zurück:
- The Java getter method name representing this object, e.g. [getMyTable]
-
getJavaMethodName
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
This is applied to definitions that can result in methods. For example, the definition could be aRoutineDefinition
- Gibt zurück:
- The Java method name representing this object, e.g. [myFunction]
-
getGlobalReferencesJavaClassExtends
public String getGlobalReferencesJavaClassExtends(Definition container, Class<? extends Definition> objectType) - Gibt zurück:
- 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
- Gibt zurück:
- 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) - Gibt zurück:
- 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
- Gibt zurück:
- 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) - Gibt zurück:
- The Java class name of the global references class for a given definition type, e.g. [MyTableSuffix]
-
getJavaClassName
- Gibt zurück:
- The Java class name representing this object, e.g. [MyTableSuffix]
-
getGlobalReferencesJavaPackageName
public String getGlobalReferencesJavaPackageName(Definition container, Class<? extends Definition> objectType) - Gibt zurück:
- The Java package name of the global references class for a given definition type, e.g. [org.jooq.generated]
-
getJavaPackageName
- Gibt zurück:
- The Java package name of this object, e.g. [org.jooq.generated]
-
getJavaMemberName
Beschreibung aus Schnittstelle kopiert:GeneratorStrategy
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- Gibt zurück:
- The Java class name representing this object, starting with a lower case character, e.g. [myTableSuffix]
-
getOverloadSuffix
public String getOverloadSuffix(Definition definition, GeneratorStrategy.Mode mode, String overloadIndex) - Gibt zurück:
- The overload suffix to be applied when generating overloaded
routine artefacts, e.g.
"_OverloadIndex_" + overloadIndex
-