java.lang.Object
org.jooq.codegen.AbstractGeneratorStrategy
- All Implemented Interfaces:
GeneratorStrategy
- Direct Known Subclasses:
AbstractDelegatingGeneratorStrategy,DefaultGeneratorStrategy
Common base class for convenience method abstraction
- Author:
- Lukas Eder
-
Nested Class Summary
Nested classes/interfaces inherited from interface org.jooq.codegen.GeneratorStrategy
GeneratorStrategy.Mode -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionfinal Filefinal FilegetFile(Definition definition) final FilegetFile(Definition definition, GeneratorStrategy.Mode mode) final StringgetFileHeader(Definition definition) final StringgetFileName(Definition definition) final StringgetFileName(Definition definition, GeneratorStrategy.Mode mode) final Filefinal StringgetFullJavaClassName(Definition definition) final StringgetFullJavaClassName(Definition definition, GeneratorStrategy.Mode mode) This is the same as callinggetFullJavaClassName(definition, Mode.DEFAULT)final StringgetFullJavaIdentifier(Definition definition) This is applied to definitions that can result in reference static and instance members.getFullJavaIdentifiers(Collection<? extends Definition> definitions) getFullJavaIdentifiers(Definition... definitions) final FilegetGlobalReferencesFile(Definition container, Class<? extends Definition> objectType) final StringgetGlobalReferencesFileName(Definition container, Class<? extends Definition> objectType) final StringgetGlobalReferencesFullJavaClassName(Definition container, Class<? extends Definition> objectType) final StringgetJavaClassExtends(Definition definition) This is the same as callinggetJavaClassExtends(definition, Mode.DEFAULT)getJavaClassImplements(Definition definition) This is the same as callinggetJavaClassImplements(definition, Mode.DEFAULT)final StringgetJavaClassName(Definition definition) This is the same as callinggetJavaClassName(definition, Mode.DEFAULT)getJavaEnumLiterals(EnumDefinition definition, String... literals) getJavaEnumLiterals(EnumDefinition definition, Collection<? extends String> literals) final StringgetJavaGetterName(Definition definition) This is applied to definitions that can result in getters of a container.getJavaIdentifiers(Collection<? extends Definition> definitions) getJavaIdentifiers(Definition... definitions) final StringgetJavaMemberName(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).final StringgetJavaMethodName(Definition definition) This is applied to definitions that can result in methods.final StringgetJavaPackageName(Definition definition) This is the same as callinggetJavaPackageName(definition, Mode.DEFAULT)final StringgetJavaSetterName(Definition definition) This is applied to definitions that can result in setters of a container.Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.jooq.codegen.GeneratorStrategy
getFileHeader, getGlobalReferencesFileHeader, getGlobalReferencesJavaClassExtends, getGlobalReferencesJavaClassImplements, getGlobalReferencesJavaClassName, getGlobalReferencesJavaPackageName, getInstanceFields, getJavaBeansGettersAndSetters, getJavaClassExtends, getJavaClassImplements, getJavaClassName, getJavaEnumLiteral, getJavaGetterName, getJavaIdentifier, getJavaMemberName, getJavaMethodName, getJavaPackageName, getJavaSetterName, getOverloadSuffix, getTargetDirectory, getTargetLanguage, getTargetLocale, getTargetPackage, getUseTableNameForUnambiguousFKs, setInstanceFields, setJavaBeansGettersAndSetters, setTargetDirectory, setTargetLanguage, setTargetLocale, setTargetPackage, setUseTableNameForUnambiguousFKs
-
Constructor Details
-
AbstractGeneratorStrategy
public AbstractGeneratorStrategy()
-
-
Method Details
-
getGlobalReferencesFileName
public final String getGlobalReferencesFileName(Definition container, Class<? extends Definition> objectType) - Specified by:
getGlobalReferencesFileNamein interfaceGeneratorStrategy- Returns:
- The Java class file name of the global references class for a given definition type, e.g. [MyTable.java]
-
getFileName
- Specified by:
getFileNamein interfaceGeneratorStrategy- Returns:
- The Java class file name representing this object, e.g. [MyTable.java]
-
getFileName
- Specified by:
getFileNamein interfaceGeneratorStrategy- Returns:
- The Java class file name representing this object, e.g. [MyTableSuffix.java]
-
getFileRoot
- Specified by:
getFileRootin interfaceGeneratorStrategy- Returns:
- The directory containing all Java objects, e.g. [C:\org\jooq\generated]
-
getGlobalReferencesFile
public final File getGlobalReferencesFile(Definition container, Class<? extends Definition> objectType) - Specified by:
getGlobalReferencesFilein interfaceGeneratorStrategy- 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
- Specified by:
getFilein interfaceGeneratorStrategy- Returns:
- The Java class file name representing this object, e.g. [C:\org\jooq\generated\MyTable.java]
-
getFile
- Specified by:
getFilein interfaceGeneratorStrategy- Returns:
- The Java class file name representing this object, e.g. [C:\org\jooq\generated\MyTableSuffix.java]
-
getFile
- Specified by:
getFilein interfaceGeneratorStrategy- Returns:
- The Java class file name representing this object, e.g. [C:\org\jooq\generated\fileName]
-
getFileHeader
- Specified by:
getFileHeaderin interfaceGeneratorStrategy- Returns:
- The Java class file header, e.g.
This file is generated by jOOQ.
-
getFullJavaIdentifier
Description copied from interface:GeneratorStrategyThis is applied to definitions that can result in reference static and instance members. For instance, the reference instance of aTableDefinitionis a java identifier- Specified by:
getFullJavaIdentifierin interfaceGeneratorStrategy- Returns:
- The Java identifier representing this object, e.g. [my_table]
-
getJavaSetterName
Description copied from interface:GeneratorStrategyThis 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)- Specified by:
getJavaSetterNamein interfaceGeneratorStrategy- Returns:
- The Java setter method name representing this object, e.g. [setMyTable]
-
getJavaGetterName
Description copied from interface:GeneratorStrategyThis 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)- Specified by:
getJavaGetterNamein interfaceGeneratorStrategy- Returns:
- The Java getter method name representing this object, e.g. [getMyTable]
-
getJavaMethodName
Description copied from interface:GeneratorStrategyThis 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)- Specified by:
getJavaMethodNamein interfaceGeneratorStrategy- Returns:
- The Java method name representing this object, e.g. [myFunction]
-
getJavaClassExtends
Description copied from interface:GeneratorStrategyThis is the same as callinggetJavaClassExtends(definition, Mode.DEFAULT)- Specified by:
getJavaClassExtendsin interfaceGeneratorStrategy- 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.
-
getJavaClassImplements
Description copied from interface:GeneratorStrategyThis is the same as callinggetJavaClassImplements(definition, Mode.DEFAULT)- Specified by:
getJavaClassImplementsin interfaceGeneratorStrategy- 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.
-
getJavaClassName
Description copied from interface:GeneratorStrategyThis is the same as callinggetJavaClassName(definition, Mode.DEFAULT)- Specified by:
getJavaClassNamein interfaceGeneratorStrategy- Returns:
- The Java class name representing this object, e.g. [MyTable]
-
getJavaPackageName
Description copied from interface:GeneratorStrategyThis is the same as callinggetJavaPackageName(definition, Mode.DEFAULT)- Specified by:
getJavaPackageNamein interfaceGeneratorStrategy- Returns:
- The Java package name of this object, e.g. [org.jooq.generated]
-
getJavaMemberName
Description copied from interface:GeneratorStrategyThe "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)- Specified by:
getJavaMemberNamein interfaceGeneratorStrategy- Returns:
- The Java class name representing this object, starting with a lower case character, e.g. [myTable]
-
getGlobalReferencesFullJavaClassName
public final String getGlobalReferencesFullJavaClassName(Definition container, Class<? extends Definition> objectType) - Specified by:
getGlobalReferencesFullJavaClassNamein interfaceGeneratorStrategy- Returns:
- The full Java class name of the global references class for a given definition type, e.g. [org.jooq.generated.MyTable]
-
getFullJavaClassName
- Specified by:
getFullJavaClassNamein interfaceGeneratorStrategy- Returns:
- The full Java class name representing this object, e.g. [org.jooq.generated.MyTable]
-
getFullJavaClassName
Description copied from interface:GeneratorStrategyThis is the same as callinggetFullJavaClassName(definition, Mode.DEFAULT)- Specified by:
getFullJavaClassNamein interfaceGeneratorStrategy- Returns:
- The full Java class name representing this object, e.g. [org.jooq.generated.MyTable][suffix]
-
getJavaEnumLiterals
public final List<String> getJavaEnumLiterals(EnumDefinition definition, Collection<? extends String> literals) - Specified by:
getJavaEnumLiteralsin interfaceGeneratorStrategy- See Also:
-
getJavaEnumLiterals
- Specified by:
getJavaEnumLiteralsin interfaceGeneratorStrategy- See Also:
-
getJavaIdentifiers
- Specified by:
getJavaIdentifiersin interfaceGeneratorStrategy- See Also:
-
getJavaIdentifiers
- Specified by:
getJavaIdentifiersin interfaceGeneratorStrategy- See Also:
-
getFullJavaIdentifiers
- Specified by:
getFullJavaIdentifiersin interfaceGeneratorStrategy- See Also:
-
getFullJavaIdentifiers
- Specified by:
getFullJavaIdentifiersin interfaceGeneratorStrategy- See Also:
-