- java.lang.Object
-
- org.jooq.codegen.JavaGenerator
-
- All Implemented Interfaces:
Generator
- Direct Known Subclasses:
DefaultGenerator
,KotlinGenerator
,ScalaGenerator
public class JavaGenerator extends Object
A default implementation for code generation.Replace this code with your own logic, if you need your database schema represented in a different way.
Note that you can also extend this class to generate POJO's or other stuff entirely independent of jOOQ.
- Author:
- Lukas Eder
-
-
Field Summary
Fields Modifier and Type Field Description protected org.jooq.codegen.GeneratorStrategyWrapper
strategy
protected boolean
targetClean
protected String
targetEncoding
-
Constructor Summary
Constructors Constructor Description JavaGenerator()
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description protected void
closeJavaWriter(JavaWriter out)
protected void
empty(File file, String suffix)
If file is a directory, recursively empty its children.protected void
empty(File file, String suffix, Set<File> keep, Set<File> ignore)
If file is a directory, recursively empty its children.protected String
escapeEntities(String comment)
boolean
fluentSetters()
Deprecated.String
fullyQualifiedTypes()
Deprecated.void
generate(Database db)
Do the code generationprotected void
generateArray(ArrayDefinition array, JavaWriter out)
protected void
generateArray(SchemaDefinition schema, ArrayDefinition array)
protected void
generateArrayClassFooter(ArrayDefinition array, JavaWriter out)
Subclasses may override this method to provide array class footer code.protected void
generateArrayClassJavadoc(ArrayDefinition array, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateArrays(SchemaDefinition schema)
protected void
generateCatalog(CatalogDefinition catalog)
protected void
generateCatalog(CatalogDefinition catalog, JavaWriter out)
protected void
generateCatalogClassFooter(CatalogDefinition schema, JavaWriter out)
Subclasses may override this method to provide catalog class footer code.protected void
generateCatalogClassJavadoc(CatalogDefinition catalog, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.boolean
generateComments()
Whether any SQL comments should be generated as Javadoc.boolean
generateCommentsOnAttributes()
Whether SQL comments on attributes should be generated as Javadoc.boolean
generateCommentsOnCatalogs()
Whether SQL comments on catalogs should be generated as Javadoc.boolean
generateCommentsOnColumns()
Whether SQL comments on columns should be generated as Javadoc.boolean
generateCommentsOnEmbeddables()
Whether SQL comments on embeddables should be generated as Javadoc.boolean
generateCommentsOnKeys()
Whether SQL comments on keys should be generated as Javadoc.boolean
generateCommentsOnLinks()
Whether SQL comments on links should be generated as Javadoc.boolean
generateCommentsOnPackages()
Whether SQL comments on packages should be generated as Javadoc.boolean
generateCommentsOnParameters()
Whether SQL comments on parameters should be generated as Javadoc.boolean
generateCommentsOnQueues()
Whether SQL comments on queues should be generated as Javadoc.boolean
generateCommentsOnRoutines()
Whether SQL comments on routines should be generated as Javadoc.boolean
generateCommentsOnSchemas()
Whether SQL comments on schemas should be generated as Javadoc.boolean
generateCommentsOnSequences()
Whether SQL comments on sequences should be generated as Javadoc.boolean
generateCommentsOnTables()
Whether SQL comments on tables should be generated as Javadoc.boolean
generateCommentsOnUDTs()
Whether SQL comments on UDTs should be generated as Javadoc.boolean
generateConstructorPropertiesAnnotation()
Whether theConstructorProperties
annotation should be generated.boolean
generateConstructorPropertiesAnnotationOnPojos()
Whether theConstructorProperties
annotation should be generated on POJOs.boolean
generateConstructorPropertiesAnnotationOnRecords()
Whether theConstructorProperties
annotation should be generated on records.protected void
generateDao(TableDefinition table)
protected void
generateDao(TableDefinition table, JavaWriter out)
protected void
generateDaoClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide dao class footer code.protected void
generateDaoClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.boolean
generateDaos()
Whether DAO's should be generated in addition to pojosprotected void
generateDaos(SchemaDefinition schema)
boolean
generateDeprecated()
Whether deprecated code should be generatedboolean
generateDeprecationOnUnknownTypes()
Whether deprecation should be generated on unknown types.String
generatedNonnullAnnotationType()
Which type of Nonnull annotation should be generated.String
generatedNullableAnnotationType()
Which type of Nullable annotation should be generated.protected void
generateDomain(DomainDefinition d)
Deprecated.- [#681] - 3.14.0 - This method is no longer being calledprotected void
generateDomain(DomainDefinition d, JavaWriter out)
Deprecated.- [#681] - 3.14.0 - This method is no longer being calledprotected void
generateDomainClassFooter(DomainDefinition d, JavaWriter out)
Deprecated.- [#681] - 3.14.0 - This method is no longer being calledprotected void
generateDomainClassJavadoc(DomainDefinition e, JavaWriter out)
Deprecated.- [#681] - 3.14.0 - This method is no longer being calledprotected void
generateDomainReferences(SchemaDefinition schema)
Generating central static domain accessprotected void
generateDomainReferencesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide domain references class footer code.protected void
generateDomains(SchemaDefinition schema)
Deprecated.- [#681] - 3.14.0 - This method is no longer being calledGeneratedSerialVersionUID
generatedSerialVersionUID()
The type ofserialVersionUID
that should be generated.protected void
generateEmbeddable(SchemaDefinition schema, EmbeddableDefinition embeddable)
protected void
generateEmbeddableClassFooter(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide record class footer code.protected void
generateEmbeddableClassJavadoc(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateEmbeddableGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own embeddable getters.protected void
generateEmbeddableInterface(EmbeddableDefinition embeddable)
protected void
generateEmbeddableInterfaceClassFooter(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide embeddable interface class footer code.protected void
generateEmbeddableInterfaceClassJavadoc(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateEmbeddableInterfaceGetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own interface getters.protected void
generateEmbeddableInterfaces(SchemaDefinition schema)
protected void
generateEmbeddableInterfaceSetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own interface setters.protected void
generateEmbeddablePojo(EmbeddableDefinition embeddable)
protected void
generateEmbeddablePojoClassFooter(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide embeddable POJO class footer code.protected void
generateEmbeddablePojoClassJavadoc(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateEmbeddablePojoGetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo getters.protected void
generateEmbeddablePojos(SchemaDefinition schema)
protected void
generateEmbeddablePojoSetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo setters.protected void
generateEmbeddableRecordGetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters for embeddables.protected void
generateEmbeddableRecordSetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters for embeddables.boolean
generateEmbeddables()
Whether embeddable types should be generatedprotected void
generateEmbeddables(SchemaDefinition schema)
protected void
generateEmbeddableSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own embeddable setters.boolean
generateEmptyCatalogs()
Whether empty catalogs should still be generated.boolean
generateEmptySchemas()
Whether empty schemas should still be generated.protected void
generateEnum(EnumDefinition e)
protected void
generateEnum(EnumDefinition e, JavaWriter out)
protected void
generateEnumClassFooter(EnumDefinition e, JavaWriter out)
Subclasses may override this method to provide enum class footer code.protected void
generateEnumClassJavadoc(EnumDefinition e, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateEnums(SchemaDefinition schema)
boolean
generateEnumsAsScalaSealedTraits()
Whether enums generated as Scala sealed traits by theScalaGenerator
.boolean
generateFluentSetters()
Whether fluent setters should be generatedString
generateFullyQualifiedTypes()
A regular expression matching all the types in generated code that should be fully qualified.boolean
generateGeneratedAnnotation()
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.boolean
generateGeneratedAnnotationDate()
GeneratedAnnotationType
generateGeneratedAnnotationType()
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.boolean
generateGlobalCatalogReferences()
Whether global catalog references should be generatedboolean
generateGlobalDomainReferences()
Whether global domain references should be generatedboolean
generateGlobalIndexReferences()
Whether global index references should be generatedboolean
generateGlobalKeyReferences()
Whether global key references should be generatedboolean
generateGlobalLinkReferences()
Whether global link references should be generatedboolean
generateGlobalObjectReferences()
Whether global object references should be generatedboolean
generateGlobalQueueReferences()
Whether global queue references should be generatedboolean
generateGlobalRoutineReferences()
Whether global routine references should be generatedboolean
generateGlobalSchemaReferences()
Whether global schema references should be generatedboolean
generateGlobalSequenceReferences()
Whether global sequence references should be generatedboolean
generateGlobalTableReferences()
Whether global table references should be generatedboolean
generateGlobalUDTReferences()
Whether global UDT references should be generatedboolean
generateImmutableInterfaces()
Whether immutable interfaces should be generated in addition to recordsboolean
generateImmutablePojos()
Whether immutable POJO's should be generated in addition to recordsboolean
generateImplicitJoinPathsToOne()
Whether implicit join path constructors on generated tables for outgoing foreign key relationships (to-one relationships) should be generated.String
generateIndentation()
The indentation character(s) to be used in generated code.boolean
generateIndexes()
Whether indexes should be generated.protected void
generateIndexes(SchemaDefinition schema)
protected void
generateIndexesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide index references class footer code.boolean
generateInstanceFields()
Whether instance fields should be generated (as opposed to static fields).protected void
generateInterface(TableDefinition table)
protected void
generateInterface(TableDefinition table, JavaWriter out)
protected void
generateInterfaceClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide interface class footer code.protected void
generateInterfaceClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateInterfaceGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface getters.boolean
generateInterfaces()
Whether interfaces should be generated to be implemented by records and POJO'sprotected void
generateInterfaces(SchemaDefinition schema)
protected void
generateInterfaceSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface setters.boolean
generateJavaBeansGettersAndSetters()
Whether getters and setters should be generated JavaBeans style (or jOOQ style).boolean
generateJavadoc()
Whether any Javadoc should be generated.boolean
generateJavaTimeTypes()
A flag indicating whether Java 8's java.time types should be used by the source code generator, rather than JDBC's java.sql types.boolean
generateJPAAnnotations()
Whether POJO's and records should be annotated with JPA annotationsString
generateJPAVersion()
The minimum JPA version that is supported by generated code (latest version if empty).boolean
generateKeys()
Whether key related code should be generatedboolean
generateKotlinSetterJvmNameAnnotationsOnIsPrefix()
Whether kotlin mutable properties should be annotated withset:JvmName
as a workaround for problems occurring when kotlin producessetX()
instead ofsetIsX()
setters for anisX
property.boolean
generateLinks()
Whether link related code should be generatedString
generateNewline()
The newline character(s) to be used in generated code.boolean
generateNonnullAnnotation()
Whether Nonnull annotations should be generated.boolean
generateNullableAnnotation()
Whether Nullable annotations should be generated.protected void
generatePackage(PackageDefinition pkg, JavaWriter out)
protected void
generatePackage(SchemaDefinition schema, PackageDefinition pkg)
protected void
generatePackageClassFooter(PackageDefinition pkg, JavaWriter out)
Subclasses may override this method to provide package class footer code.protected void
generatePackageClassJavadoc(PackageDefinition pkg, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generatePackages(SchemaDefinition schema)
protected void
generatePojo(TableDefinition table)
protected void
generatePojo(TableDefinition table, JavaWriter out)
protected void
generatePojoClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide POJO class footer code.protected void
generatePojoClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generatePojoCopyConstructor(Definition tableOrUDT, JavaWriter out)
Subclasses may override this method to provide their own pojo copy constructors.protected void
generatePojoDefaultConstructor(Definition tableOrUDT, JavaWriter out)
Subclasses may override this method to provide their own pojo default constructors.protected void
generatePojoEqualsAndHashCode(Definition tableOrUDT, JavaWriter out)
protected void
generatePojoGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo getters.protected void
generatePojoMultiConstructor(Definition tableOrUDT, JavaWriter out)
Subclasses may override this method to provide their own pojo copy constructors.boolean
generatePojos()
Whether POJO's should be generated in addition to recordsprotected void
generatePojos(SchemaDefinition schema)
boolean
generatePojosAsJavaRecordClasses()
Whether POJOs should be generated as Java records by theJavaGenerator
.boolean
generatePojosAsKotlinDataClasses()
Whether POJOs should be generated as Kotlin data classes by theKotlinGenerator
.boolean
generatePojosAsScalaCaseClasses()
Whether POJOs should be generated as Scala case classes by theScalaGenerator
.boolean
generatePojosEqualsAndHashCode()
Whetherequals()
andhashCode()
methods should be generated on POJOsprotected void
generatePojoSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo setters.boolean
generatePojosToString()
Whether atoString()
method should be generated on POJOsprotected void
generatePojoToString(Definition tableOrUDT, JavaWriter out)
int
generatePrintMarginForBlockComment()
The print margin for Javadoc and other block comments to be used in generated code.boolean
generateQueues()
Whether queue related code should be generatedprotected void
generateRecord(TableDefinition table)
protected void
generateRecord(TableDefinition table, JavaWriter out)
protected void
generateRecordClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide record class footer code.protected void
generateRecordClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateRecordGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters.boolean
generateRecords()
Whether TableRecords should be generated in addition to tablesprotected void
generateRecords(SchemaDefinition schema)
protected void
generateRecordSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record setters.boolean
generateRecordsImplementingRecordN()
Whether TableRecords should be generated in addition to tables, which implement Record[N] typesboolean
generateRelations()
Whether foreign key relations should be resolvedprotected void
generateRelations(SchemaDefinition schema)
protected void
generateRelationsClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide relations references class footer code.protected void
generateRoutine(RoutineDefinition routine, JavaWriter out)
protected void
generateRoutine(SchemaDefinition schema, RoutineDefinition routine)
protected void
generateRoutineClassFooter(RoutineDefinition routine, JavaWriter out)
Subclasses may override this method to provide routine class footer code.protected void
generateRoutineClassJavadoc(RoutineDefinition routine, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.boolean
generateRoutines()
Whether Routines should be generated.protected void
generateRoutines(SchemaDefinition schema)
protected void
generateRoutinesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide routine references class footer code.protected void
generateSchema(SchemaDefinition schema)
protected void
generateSchema(SchemaDefinition schema, JavaWriter out)
protected void
generateSchemaClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide schema class footer code.protected void
generateSchemaClassJavadoc(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.boolean
generateSequenceFlags()
Whether sequence flags should be generated.boolean
generateSequences()
Whether Sequences should be generated.protected void
generateSequences(SchemaDefinition schema)
protected void
generateSequencesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide sequence references class footer code.boolean
generateSerializableInterfaces()
Whether generated interfaces should extendSerializable
.boolean
generateSerializablePojos()
Whether generated POJO's should beSerializable
.boolean
generateSources()
Whether source code should be generated on any object type.boolean
generateSourcesOnViews()
Whether source code should be generated on views.boolean
generateSpringAnnotations()
Whether DAOs should be annotated with useful spring annotations such as@Repository
or@Autowired
protected void
generateTable(SchemaDefinition schema, TableDefinition table)
protected void
generateTable(TableDefinition table, JavaWriter out)
protected void
generateTableClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide table class footer code.protected void
generateTableClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateTableReferences(SchemaDefinition schema)
Generating central static table accessprotected void
generateTableReferencesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide table references class footer code.boolean
generateTables()
Whether Tables should be generatedprotected void
generateTables(SchemaDefinition schema)
boolean
generateTableValuedFunctions()
Whether table-valued functions should be generated as tables.protected void
generateUDT(SchemaDefinition schema, UDTDefinition udt)
protected void
generateUDT(UDTDefinition udt, JavaWriter out)
protected void
generateUDTClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide udt class footer code.protected void
generateUDTClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateUDTInterface(UDTDefinition udt)
protected void
generateUDTInterface(UDTDefinition udt, JavaWriter out)
protected void
generateUDTInterfaceClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide UDT interface class footer code.protected void
generateUDTInterfaceClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateUDTInterfaceGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface getters.protected void
generateUDTInterfaces(SchemaDefinition schema)
protected void
generateUDTInterfaceSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface setters.protected void
generateUDTPojo(UDTDefinition udt)
protected void
generateUDTPojo(UDTDefinition udt, JavaWriter out)
protected void
generateUDTPojoClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide UDT POJO class footer code.protected void
generateUDTPojoClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateUDTPojoGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo getters.protected void
generateUDTPojos(SchemaDefinition schema)
protected void
generateUDTPojoSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo setters.protected void
generateUDTRecord(UDTDefinition udt)
protected void
generateUDTRecord(UDTDefinition udt, JavaWriter out)
protected void
generateUDTRecordClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide udt record class footer code.protected void
generateUDTRecordClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.protected void
generateUDTRecordGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters.protected void
generateUDTRecords(SchemaDefinition schema)
Generating UDT record classesprotected void
generateUDTRecordSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record setters.protected void
generateUDTReferences(Definition schemaOrPackage)
Generating central static udt accessprotected void
generateUDTReferencesClassFooter(Definition schemaOrPackage, JavaWriter out)
Subclasses may override this method to provide UDT references class footer code.protected void
generateUDTReferencesClassFooter(PackageDefinition pkg, JavaWriter out)
Subclasses may override this method to provide UDT references class footer code.protected void
generateUDTRoutines(SchemaDefinition schema)
boolean
generateUDTs()
Whether UDTs should be generated.protected void
generateUDTs(SchemaDefinition schema)
boolean
generateValidationAnnotations()
Whether POJO's and records should be annotated with JSR-303 validation annotationsboolean
generateVarargsSetters()
Whether varargs setters should be generated for array types.VisibilityModifier
generateVisibilityModifier()
TheVisibilityModifier
that should be used in generated code.protected String
getArrayBaseType(String javaType)
protected File
getFile(Definition definition)
protected File
getFile(Definition definition, GeneratorStrategy.Mode mode)
protected String
getJavaType(DataTypeDefinition type, JavaWriter out)
protected String
getJavaType(DataTypeDefinition type, JavaWriter out, GeneratorStrategy.Mode udtMode)
protected String
getJavaTypeReference(Database db, DataTypeDefinition type, JavaWriter out)
GeneratorStrategy
getStrategy()
Get this generator's underlying naming strategyboolean
getTargetClean()
Whether the target package should be cleaned to contain only generated code after a generation run.String
getTargetDirectory()
The target directoryString
getTargetEncoding()
The target encodingLocale
getTargetLocale()
The target locale.String
getTargetPackage()
protected String
getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, String u, String javaType, String defaultType)
Deprecated.- 3.9.0 - [#330] - Use#getType(Database, SchemaDefinition, String, int, int, Name, String, String)
instead.protected String
getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, String u, String javaType, String defaultType, GeneratorStrategy.Mode udtMode)
Deprecated.- 3.9.0 - [#330] - Use#getType(Database, SchemaDefinition, String, int, int, Name, String, String, Mode)
instead.protected String
getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, Name u, String javaType, String defaultType)
protected String
getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, Name u, String javaType, String defaultType, GeneratorStrategy.Mode udtMode)
protected String
getTypeReference(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, int l, boolean n, boolean i, String d, Name u)
protected boolean
isArrayType(String javaType)
int
maxMembersPerInitialiser()
The maximum number of members per initialiser, to prevent reaching the 64kb byte code per method limit in generated code.protected JavaWriter
newJavaWriter(File file)
protected void
printClassAnnotations(JavaWriter out, Definition definition, GeneratorStrategy.Mode mode)
protected void
printClassAnnotations(JavaWriter out, SchemaDefinition schema)
Deprecated.- [#10355] - 3.14.0 - This method is no longer used by the code generator.protected void
printClassAnnotations(JavaWriter out, SchemaDefinition schema, CatalogDefinition catalog)
Deprecated.- [#10355] - 3.14.0 - This method is no longer used by the code generator.protected void
printClassJavadoc(JavaWriter out, String comment)
protected void
printClassJavadoc(JavaWriter out, Definition definition)
protected void
printColumnJPAAnnotation(JavaWriter out, ColumnDefinition column)
protected void
printColumnValidationAnnotation(JavaWriter out, ColumnDefinition column)
Deprecated.- This method is no longer used by the generator.protected void
printConstant(JavaWriter out, AttributeDefinition constant)
protected void
printConvenienceMethodFunction(JavaWriter out, RoutineDefinition function, boolean instance)
protected void
printConvenienceMethodFunctionAsField(JavaWriter out, RoutineDefinition function, boolean parametersAsField)
protected void
printConvenienceMethodProcedure(JavaWriter out, RoutineDefinition procedure, boolean instance)
protected void
printConvenienceMethodTableValuedFunction(JavaWriter out, TableDefinition function, String methodName)
protected void
printConvenienceMethodTableValuedFunctionAsField(JavaWriter out, TableDefinition function, boolean parametersAsField, String methodName)
protected void
printDaoConstructorAnnotations(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide alternative DAO constructor annotations, such as DI annotations. [#10801]protected void
printForeignKey(JavaWriter out, int foreignKeyCounter, ForeignKeyDefinition foreignKey, boolean distributeForeignKey)
protected void
printFromAndInto(JavaWriter out, TableDefinition table)
protected void
printGlobalReferencesPackage(JavaWriter out, Definition container, Class<? extends Definition> objectType)
protected void
printGlobalReferencesPackageComment(JavaWriter out, Definition container, Class<? extends Definition> objectType)
protected void
printIndex(JavaWriter out, int indexCounter, IndexDefinition index, boolean distributeIndexes)
protected void
printKotlinSetterAnnotation(JavaWriter out, TypedElementDefinition<?> column, GeneratorStrategy.Mode mode)
protected void
printNonnullAnnotation(JavaWriter out)
protected void
printNullableAnnotation(JavaWriter out)
protected void
printPackage(JavaWriter out, Definition definition)
protected void
printPackage(JavaWriter out, Definition definition, GeneratorStrategy.Mode mode)
protected void
printPackageComment(JavaWriter out, Definition definition, GeneratorStrategy.Mode mode)
protected void
printRecordTypeMethod(JavaWriter out, Definition definition)
protected void
printReferences(JavaWriter out, List<? extends Definition> definitions, Class<?> type, boolean isGeneric)
protected void
printRoutine(JavaWriter out, RoutineDefinition routine)
protected void
printSingletonInstance(JavaWriter out, Definition definition)
protected void
printTableJPAAnnotation(JavaWriter out, TableDefinition table)
protected void
printTableValuedFunction(JavaWriter out, TableDefinition table, String javaMethodName)
protected void
printUniqueKey(JavaWriter out, int uniqueKeyCounter, UniqueKeyDefinition uniqueKey, boolean distributeUniqueKeys)
protected String
refExtendsNumberType(JavaWriter out, DataTypeDefinition type)
protected String
refNumberType(JavaWriter out, DataTypeDefinition type)
protected JavaTypeResolver
resolver(JavaWriter out)
protected JavaTypeResolver
resolver(JavaWriter out, GeneratorStrategy.Mode mode)
void
setFluentSetters(boolean fluentSetters)
Deprecated.void
setFullyQualifiedTypes(String fullyQualifiedTypes)
Deprecated.void
setGenerateComments(boolean comments)
Whether any SQL comments should be generated as Javadoc.void
setGenerateCommentsOnAttributes(boolean commentsOnAttributes)
Whether SQL comments on attributes should be generated as Javadoc.void
setGenerateCommentsOnCatalogs(boolean commentsOnCatalogs)
Whether SQL comments on catalogs should be generated as Javadoc.void
setGenerateCommentsOnColumns(boolean commentsOnColumns)
Whether SQL comments on columns should be generated as Javadoc.void
setGenerateCommentsOnEmbeddables(boolean generateCommentsOnEmbeddables)
Whether SQL comments on embeddables should be generated as Javadoc.void
setGenerateCommentsOnKeys(boolean commentsOnKeys)
Whether SQL comments on keys should be generated as Javadoc.void
setGenerateCommentsOnLinks(boolean commentsOnLinks)
Whether SQL comments on links should be generated as Javadoc.void
setGenerateCommentsOnPackages(boolean commentsOnPackages)
Whether SQL comments on packages should be generated as Javadoc.void
setGenerateCommentsOnParameters(boolean commentsOnParameters)
Whether SQL comments on parameters should be generated as Javadoc.void
setGenerateCommentsOnQueues(boolean commentsOnQueues)
Whether SQL comments on queues should be generated as Javadoc.void
setGenerateCommentsOnRoutines(boolean commentsOnRoutines)
Whether SQL comments on routines should be generated as Javadoc.void
setGenerateCommentsOnSchemas(boolean commentsOnSchemas)
Whether SQL comments on schemas should be generated as Javadoc.void
setGenerateCommentsOnSequences(boolean commentsOnSequences)
Whether SQL comments on sequences should be generated as Javadoc.void
setGenerateCommentsOnTables(boolean commentsOnTables)
Whether SQL comments on tables should be generated as Javadoc.void
setGenerateCommentsOnUDTs(boolean commentsOnUDTs)
Whether SQL comments on UDTs should be generated as Javadoc.void
setGenerateConstructorPropertiesAnnotation(boolean generateConstructorPropertiesAnnotation)
Whether theConstructorProperties
annotation should be generated.void
setGenerateConstructorPropertiesAnnotationOnPojos(boolean generateConstructorPropertiesAnnotationOnPojos)
Whether theConstructorProperties
annotation should be generated on POJOs.void
setGenerateConstructorPropertiesAnnotationOnRecords(boolean generateConstructorPropertiesAnnotationOnRecords)
Whether theConstructorProperties
annotation should be generated on records.void
setGenerateDaos(boolean generateDaos)
Whether DAO's should be generated in addition to pojosvoid
setGenerateDeprecated(boolean generateDeprecated)
Whether deprecated code should be generatedvoid
setGenerateDeprecationOnUnknownTypes(boolean generateDeprecationOnUnknownTypes)
Whether deprecation should be generated on unknown types.void
setGeneratedNonnullAnnotationType(String generatedNonnullAnnotationType)
Which type of Nonnull annotation should be generated.void
setGeneratedNullableAnnotationType(String generatedNullableAnnotationType)
Which type of Nullable annotation should be generated.void
setGenerateEmbeddables(boolean generateEmbeddables)
Whether embeddable types should be generatedvoid
setGenerateEmptyCatalogs(boolean generateEmptyCatalogs)
Whether empty catalogs should still be generated.void
setGenerateEmptySchemas(boolean generateEmptySchemas)
Whether empty schemas should still be generated.void
setGenerateEnumsAsScalaSealedTraits(boolean generateEnumsAsScalaSealedTraits)
Whether enums generated as Scala sealed traits by theScalaGenerator
.void
setGenerateFluentSetters(boolean fluentSetters)
Whether fluent setters should be generatedvoid
setGenerateFullyQualifiedTypes(String generateFullyQualifiedTypes)
A regular expression matching all the types in generated code that should be fully qualified.void
setGenerateGeneratedAnnotation(boolean generateGeneratedAnnotation)
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.void
setGenerateGeneratedAnnotationDate(boolean generateGeneratedAnnotationDate)
void
setGenerateGeneratedAnnotationType(GeneratedAnnotationType generateGeneratedAnnotationType)
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.void
setGenerateGeneratedSerialVersionUID(GeneratedSerialVersionUID generatedSerialVersionUID)
The type ofserialVersionUID
that should be generated.void
setGenerateGlobalCatalogReferences(boolean globalCatalogReferences)
Whether global catalog references should be generatedvoid
setGenerateGlobalDomainReferences(boolean globalDomainReferences)
Whether global domain references should be generatedvoid
setGenerateGlobalIndexReferences(boolean globalIndexReferences)
Whether global index references should be generatedvoid
setGenerateGlobalKeyReferences(boolean globalKeyReferences)
Whether global key references should be generatedvoid
setGenerateGlobalLinkReferences(boolean globalLinkReferences)
Whether global link references should be generatedvoid
setGenerateGlobalObjectReferences(boolean generateGlobalObjectReferences)
Whether global object references should be generatedvoid
setGenerateGlobalQueueReferences(boolean globalQueueReferences)
Whether global queue references should be generatedvoid
setGenerateGlobalRoutineReferences(boolean generateGlobalRoutineReferences)
Whether global routine references should be generatedvoid
setGenerateGlobalSchemaReferences(boolean globalSchemaReferences)
Whether global schema references should be generatedvoid
setGenerateGlobalSequenceReferences(boolean generateGlobalSequenceReferences)
Whether global sequence references should be generatedvoid
setGenerateGlobalTableReferences(boolean generateGlobalTableReferences)
Whether global table references should be generatedvoid
setGenerateGlobalUDTReferences(boolean generateGlobalUDTReferences)
Whether global UDT references should be generatedvoid
setGenerateImmutableInterfaces(boolean generateImmutableInterfaces)
Whether immutable interfaces should be generated in addition to recordsvoid
setGenerateImmutablePojos(boolean generateImmutablePojos)
Whether immutable POJO's should be generated in addition to recordsvoid
setGenerateImplicitJoinPathsToOne(boolean generateImplicitJoinPathsToOne)
Whether implicit join path constructors on generated tables for outgoing foreign key relationships (to-one relationships) should be generated.void
setGenerateIndentation(String indentation)
The indentation character(s) to be used in generated code.void
setGenerateIndexes(boolean generateIndexes)
Whether indexes should be generated.void
setGenerateInstanceFields(boolean generateInstanceFields)
Whether instance fields should be generated (as opposed to static fields).void
setGenerateInterfaces(boolean generateInterfaces)
Whether interfaces should be generated to be implemented by records and POJO'svoid
setGenerateJavaBeansGettersAndSetters(boolean javaBeansGettersAndSetters)
Whether getters and setters should be generated JavaBeans style (or jOOQ style).void
setGenerateJavadoc(boolean javadoc)
Whether any Javadoc should be generated.void
setGenerateJavaTimeTypes(boolean generateJavaTimeTypes)
A flag indicating whether Java 8's java.time types should be used by the source code generator, rather than JDBC's java.sql types.void
setGenerateJPAAnnotations(boolean generateJPAAnnotations)
Whether POJO's and records should be annotated with JPA annotationsvoid
setGenerateJPAVersion(String generateJPAVersion)
The minimum JPA version that is supported by generated code (latest version if empty).void
setGenerateKeys(boolean keys)
Whether key related code should be generatedvoid
setGenerateKotlinSetterJvmNameAnnotationsOnIsPrefix(boolean generateKotlinSetterJvmNameAnnotationsOnIsPrefix)
Whether kotlin mutable properties should be annotated withset:JvmName
as a workaround for problems occurring when kotlin producessetX()
instead ofsetIsX()
setters for anisX
property.void
setGenerateLinks(boolean links)
Whether link related code should be generatedvoid
setGenerateNewline(String newline)
The newline character(s) to be used in generated code.void
setGenerateNonnullAnnotation(boolean generateNonnullAnnotation)
Whether Nonnull annotations should be generated.void
setGenerateNullableAnnotation(boolean generateNullableAnnotation)
Whether Nullable annotations should be generated.void
setGeneratePojos(boolean generatePojos)
Whether POJO's should be generated in addition to recordsvoid
setGeneratePojosAsJavaRecordClasses(boolean pojosAsJavaRecordClasses)
Whether POJOs should be generated as Java records by theJavaGenerator
.void
setGeneratePojosAsKotlinDataClasses(boolean pojosAsKotlinDataClasses)
Whether POJOs should be generated as Kotlin data classes by theKotlinGenerator
.void
setGeneratePojosAsScalaCaseClasses(boolean pojosAsScalaCaseClasses)
Whether POJOs should be generated as Scala case classes by theScalaGenerator
.void
setGeneratePojosEqualsAndHashCode(boolean generatePojosEqualsAndHashCode)
Whetherequals()
andhashCode()
methods should be generated on POJOsvoid
setGeneratePojosToString(boolean generatePojosToString)
Whether atoString()
method should be generated on POJOsvoid
setGeneratePrintMarginForBlockComment(int printMarginForBlockComment)
The print margin for Javadoc and other block comments to be used in generated code.void
setGenerateQueues(boolean queues)
Whether queue related code should be generatedvoid
setGenerateRecords(boolean generateRecords)
Whether TableRecords should be generated in addition to tablesvoid
setGenerateRecordsImplementingRecordN(boolean generateRecordsImplementingRecordN)
Whether TableRecords should be generated in addition to tables, which implement Record[N] typesvoid
setGenerateRelations(boolean generateRelations)
Whether foreign key relations should be resolvedvoid
setGenerateRoutines(boolean generateRoutines)
Whether Routines should be generated.void
setGenerateSequenceFlags(boolean generateSequenceFlags)
Whether sequence flags should be generated.void
setGenerateSequences(boolean generateSequences)
Whether Sequences should be generated.void
setGenerateSerializableInterfaces(boolean generateSerializableInterfaces)
Whether generated interfaces should extendSerializable
.void
setGenerateSerializablePojos(boolean generateSerializablePojos)
Whether generated POJO's should beSerializable
.void
setGenerateSources(boolean sources)
Whether source code should be generated on any object type.void
setGenerateSourcesOnViews(boolean sourcesOnViews)
Whether source code should be generated on views.void
setGenerateSpringAnnotations(boolean generateSpringAnnotations)
Whether DAOs should be annotated with useful spring annotations such as@Repository
or@Autowired
void
setGenerateTables(boolean generateTables)
Whether Tables should be generatedvoid
setGenerateTableValuedFunctions(boolean generateTableValuedFunctions)
Whether table-valued functions should be generated as tables.void
setGenerateUDTs(boolean generateUDTs)
Whether UDTs should be generated.void
setGenerateValidationAnnotations(boolean generateValidationAnnotations)
Whether POJO's and records should be annotated with JSR-303 validation annotationsvoid
setGenerateVarargsSetters(boolean varargsSetters)
Whether varargs setters should be generated for array types.void
setGenerateVisibilityModifier(VisibilityModifier generateVisibilityModifier)
TheVisibilityModifier
that should be used in generated code.void
setMaxMembersPerInitialiser(int maxMembersPerInitialiser)
The maximum number of members per initialiser, to prevent reaching the 64kb byte code per method limit in generated code.void
setStrategy(GeneratorStrategy strategy)
Set a naming strategy to this generatorvoid
setTargetClean(boolean clean)
Whether the target package should be cleaned to contain only generated code after a generation run.void
setTargetDirectory(String directory)
Initialise the target directoryvoid
setTargetEncoding(String encoding)
Initialise the target encodingvoid
setTargetLocale(Locale targetLocale)
The target locale.void
setTargetPackage(String packageName)
Initialise the target package namevoid
setUseCatalogVersionProvider(boolean useCatalogVersionProvider)
void
setUseSchemaVersionProvider(boolean useSchemaVersionProvider)
boolean
useCatalogVersionProvider()
boolean
useSchemaVersionProvider()
-
-
-
Field Detail
-
strategy
protected org.jooq.codegen.GeneratorStrategyWrapper strategy
-
targetEncoding
protected String targetEncoding
-
targetClean
protected boolean targetClean
-
-
Method Detail
-
generate
public final void generate(Database db)
Description copied from interface:Generator
Do the code generation
-
generateRelations
protected void generateRelations(SchemaDefinition schema)
-
generateRelationsClassFooter
protected void generateRelationsClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide relations references class footer code.
-
generateIndexes
protected void generateIndexes(SchemaDefinition schema)
-
generateIndexesClassFooter
protected void generateIndexesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide index references class footer code.
-
printIndex
protected void printIndex(JavaWriter out, int indexCounter, IndexDefinition index, boolean distributeIndexes)
-
printUniqueKey
protected void printUniqueKey(JavaWriter out, int uniqueKeyCounter, UniqueKeyDefinition uniqueKey, boolean distributeUniqueKeys)
-
printForeignKey
protected void printForeignKey(JavaWriter out, int foreignKeyCounter, ForeignKeyDefinition foreignKey, boolean distributeForeignKey)
-
generateRecords
protected void generateRecords(SchemaDefinition schema)
-
generateRecord
protected void generateRecord(TableDefinition table)
-
generateUDTRecord
protected void generateUDTRecord(UDTDefinition udt)
-
generateRecord
protected void generateRecord(TableDefinition table, JavaWriter out)
-
generateUDTRecord
protected void generateUDTRecord(UDTDefinition udt, JavaWriter out)
-
generateRecordSetter
protected void generateRecordSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record setters.
-
generateEmbeddableSetter
protected void generateEmbeddableSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own embeddable setters.
-
generateUDTRecordSetter
protected void generateUDTRecordSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record setters.
-
generateEmbeddableRecordSetter
protected void generateEmbeddableRecordSetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters for embeddables.
-
generateRecordGetter
protected void generateRecordGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters.
-
generateEmbeddableGetter
protected void generateEmbeddableGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own embeddable getters.
-
generateUDTRecordGetter
protected void generateUDTRecordGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters.
-
generateEmbeddableRecordGetter
protected void generateEmbeddableRecordGetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own record getters for embeddables.
-
generateRecordClassFooter
protected void generateRecordClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide record class footer code.
-
generateRecordClassJavadoc
protected void generateRecordClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateEmbeddableClassFooter
protected void generateEmbeddableClassFooter(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide record class footer code.
-
generateEmbeddableClassJavadoc
protected void generateEmbeddableClassJavadoc(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateInterfaces
protected void generateInterfaces(SchemaDefinition schema)
-
generateInterface
protected void generateInterface(TableDefinition table)
-
generateUDTInterface
protected void generateUDTInterface(UDTDefinition udt)
-
generateEmbeddableInterface
protected void generateEmbeddableInterface(EmbeddableDefinition embeddable)
-
generateInterface
protected void generateInterface(TableDefinition table, JavaWriter out)
-
generateUDTInterface
protected void generateUDTInterface(UDTDefinition udt, JavaWriter out)
-
generateInterfaceSetter
protected void generateInterfaceSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface setters.
-
generateEmbeddableInterfaceSetter
protected void generateEmbeddableInterfaceSetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own interface setters.
-
generateUDTInterfaceSetter
protected void generateUDTInterfaceSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface setters.
-
generateInterfaceGetter
protected void generateInterfaceGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface getters.
-
generateEmbeddableInterfaceGetter
protected void generateEmbeddableInterfaceGetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own interface getters.
-
generateUDTInterfaceGetter
protected void generateUDTInterfaceGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own interface getters.
-
generateInterfaceClassFooter
protected void generateInterfaceClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide interface class footer code.
-
generateInterfaceClassJavadoc
protected void generateInterfaceClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateUDTs
protected void generateUDTs(SchemaDefinition schema)
-
generateUDT
protected void generateUDT(SchemaDefinition schema, UDTDefinition udt)
-
generateUDT
protected void generateUDT(UDTDefinition udt, JavaWriter out)
-
generateUDTClassFooter
protected void generateUDTClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide udt class footer code.
-
generateUDTClassJavadoc
protected void generateUDTClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateUDTPojos
protected void generateUDTPojos(SchemaDefinition schema)
-
generateUDTPojoClassFooter
protected void generateUDTPojoClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide UDT POJO class footer code.
-
generateUDTPojoClassJavadoc
protected void generateUDTPojoClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateUDTInterfaces
protected void generateUDTInterfaces(SchemaDefinition schema)
-
generateUDTInterfaceClassFooter
protected void generateUDTInterfaceClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide UDT interface class footer code.
-
generateUDTInterfaceClassJavadoc
protected void generateUDTInterfaceClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateUDTRecords
protected void generateUDTRecords(SchemaDefinition schema)
Generating UDT record classes
-
generateUDTRecordClassFooter
protected void generateUDTRecordClassFooter(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide udt record class footer code.
-
generateUDTRecordClassJavadoc
protected void generateUDTRecordClassJavadoc(UDTDefinition udt, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateUDTRoutines
protected void generateUDTRoutines(SchemaDefinition schema)
-
generateUDTReferences
protected void generateUDTReferences(Definition schemaOrPackage)
Generating central static udt access
-
generateUDTReferencesClassFooter
protected void generateUDTReferencesClassFooter(Definition schemaOrPackage, JavaWriter out)
Subclasses may override this method to provide UDT references class footer code.
-
generateUDTReferencesClassFooter
protected void generateUDTReferencesClassFooter(PackageDefinition pkg, JavaWriter out)
Subclasses may override this method to provide UDT references class footer code.
-
generateDomainReferences
protected void generateDomainReferences(SchemaDefinition schema)
Generating central static domain access
-
generateDomainReferencesClassFooter
protected void generateDomainReferencesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide domain references class footer code.
-
generateArrays
protected void generateArrays(SchemaDefinition schema)
-
generateArray
protected void generateArray(SchemaDefinition schema, ArrayDefinition array)
-
generateArray
protected void generateArray(ArrayDefinition array, JavaWriter out)
-
generateArrayClassFooter
protected void generateArrayClassFooter(ArrayDefinition array, JavaWriter out)
Subclasses may override this method to provide array class footer code.
-
generateArrayClassJavadoc
protected void generateArrayClassJavadoc(ArrayDefinition array, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateEnums
protected void generateEnums(SchemaDefinition schema)
-
generateDomains
@Deprecated protected void generateDomains(SchemaDefinition schema)
Deprecated.- [#681] - 3.14.0 - This method is no longer being called
-
generateEnum
protected void generateEnum(EnumDefinition e)
-
generateEnum
protected void generateEnum(EnumDefinition e, JavaWriter out)
-
generateEnumClassFooter
protected void generateEnumClassFooter(EnumDefinition e, JavaWriter out)
Subclasses may override this method to provide enum class footer code.
-
generateEnumClassJavadoc
protected void generateEnumClassJavadoc(EnumDefinition e, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateDomain
@Deprecated protected void generateDomain(DomainDefinition d)
Deprecated.- [#681] - 3.14.0 - This method is no longer being called
-
generateDomain
@Deprecated protected void generateDomain(DomainDefinition d, JavaWriter out)
Deprecated.- [#681] - 3.14.0 - This method is no longer being called
-
generateDomainClassFooter
@Deprecated protected void generateDomainClassFooter(DomainDefinition d, JavaWriter out)
Deprecated.- [#681] - 3.14.0 - This method is no longer being called
-
generateDomainClassJavadoc
@Deprecated protected void generateDomainClassJavadoc(DomainDefinition e, JavaWriter out)
Deprecated.- [#681] - 3.14.0 - This method is no longer being called
-
generateRoutines
protected void generateRoutines(SchemaDefinition schema)
-
generateRoutinesClassFooter
protected void generateRoutinesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide routine references class footer code.
-
printConstant
protected void printConstant(JavaWriter out, AttributeDefinition constant)
-
printRoutine
protected void printRoutine(JavaWriter out, RoutineDefinition routine)
-
printTableValuedFunction
protected void printTableValuedFunction(JavaWriter out, TableDefinition table, String javaMethodName)
-
generatePackages
protected void generatePackages(SchemaDefinition schema)
-
generatePackage
protected void generatePackage(SchemaDefinition schema, PackageDefinition pkg)
-
generatePackage
protected void generatePackage(PackageDefinition pkg, JavaWriter out)
-
generatePackageClassFooter
protected void generatePackageClassFooter(PackageDefinition pkg, JavaWriter out)
Subclasses may override this method to provide package class footer code.
-
generatePackageClassJavadoc
protected void generatePackageClassJavadoc(PackageDefinition pkg, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateTableReferences
protected void generateTableReferences(SchemaDefinition schema)
Generating central static table access
-
generateTableReferencesClassFooter
protected void generateTableReferencesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide table references class footer code.
-
generateDaos
protected void generateDaos(SchemaDefinition schema)
-
generateDao
protected void generateDao(TableDefinition table)
-
generateDao
protected void generateDao(TableDefinition table, JavaWriter out)
-
printDaoConstructorAnnotations
protected void printDaoConstructorAnnotations(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide alternative DAO constructor annotations, such as DI annotations. [#10801]
-
generateDaoClassFooter
protected void generateDaoClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide dao class footer code.
-
generateDaoClassJavadoc
protected void generateDaoClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generatePojos
protected void generatePojos(SchemaDefinition schema)
-
generatePojo
protected void generatePojo(TableDefinition table)
-
generateEmbeddablePojo
protected void generateEmbeddablePojo(EmbeddableDefinition embeddable)
-
generateUDTPojo
protected void generateUDTPojo(UDTDefinition udt)
-
generatePojo
protected void generatePojo(TableDefinition table, JavaWriter out)
-
generateUDTPojo
protected void generateUDTPojo(UDTDefinition udt, JavaWriter out)
-
generatePojoMultiConstructor
protected void generatePojoMultiConstructor(Definition tableOrUDT, JavaWriter out)
Subclasses may override this method to provide their own pojo copy constructors.
-
generatePojoCopyConstructor
protected void generatePojoCopyConstructor(Definition tableOrUDT, JavaWriter out)
Subclasses may override this method to provide their own pojo copy constructors.
-
generatePojoDefaultConstructor
protected void generatePojoDefaultConstructor(Definition tableOrUDT, JavaWriter out)
Subclasses may override this method to provide their own pojo default constructors.
-
generatePojoGetter
protected void generatePojoGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo getters.
-
generateEmbeddablePojoGetter
protected void generateEmbeddablePojoGetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo getters.
-
generateUDTPojoGetter
protected void generateUDTPojoGetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo getters.
-
generatePojoSetter
protected void generatePojoSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo setters.
-
generateEmbeddablePojoSetter
protected void generateEmbeddablePojoSetter(EmbeddableDefinition embeddable, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo setters.
-
generateUDTPojoSetter
protected void generateUDTPojoSetter(TypedElementDefinition<?> column, int index, JavaWriter out)
Subclasses may override this method to provide their own pojo setters.
-
generatePojoEqualsAndHashCode
protected void generatePojoEqualsAndHashCode(Definition tableOrUDT, JavaWriter out)
-
generatePojoToString
protected void generatePojoToString(Definition tableOrUDT, JavaWriter out)
-
generatePojoClassFooter
protected void generatePojoClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide POJO class footer code.
-
generatePojoClassJavadoc
protected void generatePojoClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateTables
protected void generateTables(SchemaDefinition schema)
-
generateTable
protected void generateTable(SchemaDefinition schema, TableDefinition table)
-
generateTable
protected void generateTable(TableDefinition table, JavaWriter out)
-
generateEmbeddables
protected void generateEmbeddables(SchemaDefinition schema)
-
generateEmbeddable
protected void generateEmbeddable(SchemaDefinition schema, EmbeddableDefinition embeddable)
-
generateEmbeddablePojos
protected void generateEmbeddablePojos(SchemaDefinition schema)
-
generateEmbeddablePojoClassFooter
protected void generateEmbeddablePojoClassFooter(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide embeddable POJO class footer code.
-
generateEmbeddablePojoClassJavadoc
protected void generateEmbeddablePojoClassJavadoc(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateEmbeddableInterfaces
protected void generateEmbeddableInterfaces(SchemaDefinition schema)
-
generateEmbeddableInterfaceClassFooter
protected void generateEmbeddableInterfaceClassFooter(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide embeddable interface class footer code.
-
generateEmbeddableInterfaceClassJavadoc
protected void generateEmbeddableInterfaceClassJavadoc(EmbeddableDefinition embeddable, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateTableClassFooter
protected void generateTableClassFooter(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide table class footer code.
-
generateTableClassJavadoc
protected void generateTableClassJavadoc(TableDefinition table, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateSequences
protected void generateSequences(SchemaDefinition schema)
-
generateSequencesClassFooter
protected void generateSequencesClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide sequence references class footer code.
-
generateCatalog
protected void generateCatalog(CatalogDefinition catalog)
-
generateCatalog
protected void generateCatalog(CatalogDefinition catalog, JavaWriter out)
-
generateCatalogClassFooter
protected void generateCatalogClassFooter(CatalogDefinition schema, JavaWriter out)
Subclasses may override this method to provide catalog class footer code.
-
generateCatalogClassJavadoc
protected void generateCatalogClassJavadoc(CatalogDefinition catalog, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
generateSchema
protected void generateSchema(SchemaDefinition schema)
-
generateSchema
protected void generateSchema(SchemaDefinition schema, JavaWriter out)
-
generateSchemaClassFooter
protected void generateSchemaClassFooter(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide schema class footer code.
-
generateSchemaClassJavadoc
protected void generateSchemaClassJavadoc(SchemaDefinition schema, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
printFromAndInto
protected void printFromAndInto(JavaWriter out, TableDefinition table)
-
printReferences
protected void printReferences(JavaWriter out, List<? extends Definition> definitions, Class<?> type, boolean isGeneric)
-
printTableJPAAnnotation
protected void printTableJPAAnnotation(JavaWriter out, TableDefinition table)
-
printColumnJPAAnnotation
protected void printColumnJPAAnnotation(JavaWriter out, ColumnDefinition column)
-
printColumnValidationAnnotation
@Deprecated protected void printColumnValidationAnnotation(JavaWriter out, ColumnDefinition column)
Deprecated.- This method is no longer used by the generator.
-
printKotlinSetterAnnotation
protected void printKotlinSetterAnnotation(JavaWriter out, TypedElementDefinition<?> column, GeneratorStrategy.Mode mode)
-
printNullableAnnotation
protected void printNullableAnnotation(JavaWriter out)
-
printNonnullAnnotation
protected void printNonnullAnnotation(JavaWriter out)
-
generateRoutine
protected void generateRoutine(SchemaDefinition schema, RoutineDefinition routine)
-
generateRoutine
protected void generateRoutine(RoutineDefinition routine, JavaWriter out)
-
generateRoutineClassFooter
protected void generateRoutineClassFooter(RoutineDefinition routine, JavaWriter out)
Subclasses may override this method to provide routine class footer code.
-
generateRoutineClassJavadoc
protected void generateRoutineClassJavadoc(RoutineDefinition routine, JavaWriter out)
Subclasses may override this method to provide their own Javadoc.
-
printConvenienceMethodFunctionAsField
protected void printConvenienceMethodFunctionAsField(JavaWriter out, RoutineDefinition function, boolean parametersAsField)
-
printConvenienceMethodTableValuedFunctionAsField
protected void printConvenienceMethodTableValuedFunctionAsField(JavaWriter out, TableDefinition function, boolean parametersAsField, String methodName)
-
printConvenienceMethodFunction
protected void printConvenienceMethodFunction(JavaWriter out, RoutineDefinition function, boolean instance)
-
printConvenienceMethodProcedure
protected void printConvenienceMethodProcedure(JavaWriter out, RoutineDefinition procedure, boolean instance)
-
printConvenienceMethodTableValuedFunction
protected void printConvenienceMethodTableValuedFunction(JavaWriter out, TableDefinition function, String methodName)
-
printRecordTypeMethod
protected void printRecordTypeMethod(JavaWriter out, Definition definition)
-
printSingletonInstance
protected void printSingletonInstance(JavaWriter out, Definition definition)
-
printClassJavadoc
protected void printClassJavadoc(JavaWriter out, Definition definition)
-
printClassJavadoc
protected void printClassJavadoc(JavaWriter out, String comment)
-
printClassAnnotations
@Deprecated protected final void printClassAnnotations(JavaWriter out, SchemaDefinition schema)
Deprecated.- [#10355] - 3.14.0 - This method is no longer used by the code generator. Use aprintClassAnnotations(JavaWriter, Definition, Mode)
instead.
-
printClassAnnotations
@Deprecated protected final void printClassAnnotations(JavaWriter out, SchemaDefinition schema, CatalogDefinition catalog)
Deprecated.- [#10355] - 3.14.0 - This method is no longer used by the code generator. Use aprintClassAnnotations(JavaWriter, Definition, Mode)
instead.
-
printClassAnnotations
protected void printClassAnnotations(JavaWriter out, Definition definition, GeneratorStrategy.Mode mode)
-
printPackage
protected void printPackage(JavaWriter out, Definition definition)
-
printPackage
protected void printPackage(JavaWriter out, Definition definition, GeneratorStrategy.Mode mode)
-
printGlobalReferencesPackage
protected void printGlobalReferencesPackage(JavaWriter out, Definition container, Class<? extends Definition> objectType)
-
printPackageComment
protected void printPackageComment(JavaWriter out, Definition definition, GeneratorStrategy.Mode mode)
-
printGlobalReferencesPackageComment
protected void printGlobalReferencesPackageComment(JavaWriter out, Definition container, Class<? extends Definition> objectType)
-
refExtendsNumberType
protected String refExtendsNumberType(JavaWriter out, DataTypeDefinition type)
-
refNumberType
protected String refNumberType(JavaWriter out, DataTypeDefinition type)
-
getJavaTypeReference
protected String getJavaTypeReference(Database db, DataTypeDefinition type, JavaWriter out)
-
resolver
protected JavaTypeResolver resolver(JavaWriter out)
-
resolver
protected JavaTypeResolver resolver(JavaWriter out, GeneratorStrategy.Mode mode)
-
isArrayType
protected boolean isArrayType(String javaType)
-
getJavaType
protected String getJavaType(DataTypeDefinition type, JavaWriter out)
-
getJavaType
protected String getJavaType(DataTypeDefinition type, JavaWriter out, GeneratorStrategy.Mode udtMode)
-
getType
@Deprecated protected String getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, String u, String javaType, String defaultType)
Deprecated.- 3.9.0 - [#330] - Use#getType(Database, SchemaDefinition, String, int, int, Name, String, String)
instead.
-
getType
protected String getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, Name u, String javaType, String defaultType)
-
getType
@Deprecated protected String getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, String u, String javaType, String defaultType, GeneratorStrategy.Mode udtMode)
Deprecated.- 3.9.0 - [#330] - Use#getType(Database, SchemaDefinition, String, int, int, Name, String, String, Mode)
instead.
-
getType
protected String getType(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, Name u, String javaType, String defaultType, GeneratorStrategy.Mode udtMode)
-
getTypeReference
protected String getTypeReference(Database db, SchemaDefinition schema, JavaWriter out, String t, int p, int s, int l, boolean n, boolean i, String d, Name u)
-
newJavaWriter
protected JavaWriter newJavaWriter(File file)
-
getFile
protected File getFile(Definition definition)
-
getFile
protected File getFile(Definition definition, GeneratorStrategy.Mode mode)
-
closeJavaWriter
protected void closeJavaWriter(JavaWriter out)
-
setStrategy
public void setStrategy(GeneratorStrategy strategy)
Description copied from interface:Generator
Set a naming strategy to this generator- Specified by:
setStrategy
in interfaceGenerator
-
getStrategy
public GeneratorStrategy getStrategy()
Description copied from interface:Generator
Get this generator's underlying naming strategy- Specified by:
getStrategy
in interfaceGenerator
-
generateDeprecated
public boolean generateDeprecated()
Description copied from interface:Generator
Whether deprecated code should be generated- Specified by:
generateDeprecated
in interfaceGenerator
-
setGenerateDeprecated
public void setGenerateDeprecated(boolean generateDeprecated)
Description copied from interface:Generator
Whether deprecated code should be generated- Specified by:
setGenerateDeprecated
in interfaceGenerator
-
generateDeprecationOnUnknownTypes
public boolean generateDeprecationOnUnknownTypes()
Description copied from interface:Generator
Whether deprecation should be generated on unknown types.- Specified by:
generateDeprecationOnUnknownTypes
in interfaceGenerator
-
setGenerateDeprecationOnUnknownTypes
public void setGenerateDeprecationOnUnknownTypes(boolean generateDeprecationOnUnknownTypes)
Description copied from interface:Generator
Whether deprecation should be generated on unknown types.- Specified by:
setGenerateDeprecationOnUnknownTypes
in interfaceGenerator
-
generateIndexes
public boolean generateIndexes()
Description copied from interface:Generator
Whether indexes should be generated.- Specified by:
generateIndexes
in interfaceGenerator
-
setGenerateIndexes
public void setGenerateIndexes(boolean generateIndexes)
Description copied from interface:Generator
Whether indexes should be generated.- Specified by:
setGenerateIndexes
in interfaceGenerator
-
generateRelations
public boolean generateRelations()
Description copied from interface:Generator
Whether foreign key relations should be resolved- Specified by:
generateRelations
in interfaceGenerator
-
setGenerateRelations
public void setGenerateRelations(boolean generateRelations)
Description copied from interface:Generator
Whether foreign key relations should be resolved- Specified by:
setGenerateRelations
in interfaceGenerator
-
generateImplicitJoinPathsToOne
public boolean generateImplicitJoinPathsToOne()
Description copied from interface:Generator
Whether implicit join path constructors on generated tables for outgoing foreign key relationships (to-one relationships) should be generated.- Specified by:
generateImplicitJoinPathsToOne
in interfaceGenerator
-
setGenerateImplicitJoinPathsToOne
public void setGenerateImplicitJoinPathsToOne(boolean generateImplicitJoinPathsToOne)
Description copied from interface:Generator
Whether implicit join path constructors on generated tables for outgoing foreign key relationships (to-one relationships) should be generated.- Specified by:
setGenerateImplicitJoinPathsToOne
in interfaceGenerator
-
generateTableValuedFunctions
public boolean generateTableValuedFunctions()
Description copied from interface:Generator
Whether table-valued functions should be generated as tables.- Specified by:
generateTableValuedFunctions
in interfaceGenerator
-
setGenerateTableValuedFunctions
public void setGenerateTableValuedFunctions(boolean generateTableValuedFunctions)
Description copied from interface:Generator
Whether table-valued functions should be generated as tables.- Specified by:
setGenerateTableValuedFunctions
in interfaceGenerator
-
generateInstanceFields
public boolean generateInstanceFields()
Description copied from interface:Generator
Whether instance fields should be generated (as opposed to static fields).- Specified by:
generateInstanceFields
in interfaceGenerator
-
setGenerateInstanceFields
public void setGenerateInstanceFields(boolean generateInstanceFields)
Description copied from interface:Generator
Whether instance fields should be generated (as opposed to static fields).- Specified by:
setGenerateInstanceFields
in interfaceGenerator
-
setGenerateVisibilityModifier
public void setGenerateVisibilityModifier(VisibilityModifier generateVisibilityModifier)
Description copied from interface:Generator
TheVisibilityModifier
that should be used in generated code.- Specified by:
setGenerateVisibilityModifier
in interfaceGenerator
-
generateVisibilityModifier
public VisibilityModifier generateVisibilityModifier()
Description copied from interface:Generator
TheVisibilityModifier
that should be used in generated code.- Specified by:
generateVisibilityModifier
in interfaceGenerator
-
generateGeneratedAnnotation
public boolean generateGeneratedAnnotation()
Description copied from interface:Generator
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.- Specified by:
generateGeneratedAnnotation
in interfaceGenerator
-
setGenerateGeneratedAnnotation
public void setGenerateGeneratedAnnotation(boolean generateGeneratedAnnotation)
Description copied from interface:Generator
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.- Specified by:
setGenerateGeneratedAnnotation
in interfaceGenerator
-
generateGeneratedAnnotationType
public GeneratedAnnotationType generateGeneratedAnnotationType()
Description copied from interface:Generator
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.- Specified by:
generateGeneratedAnnotationType
in interfaceGenerator
-
setGenerateGeneratedAnnotationType
public void setGenerateGeneratedAnnotationType(GeneratedAnnotationType generateGeneratedAnnotationType)
Description copied from interface:Generator
Whether thejavax.annotation.Generated
orGenerated
annotation should be generated.- Specified by:
setGenerateGeneratedAnnotationType
in interfaceGenerator
-
generateGeneratedAnnotationDate
public boolean generateGeneratedAnnotationDate()
Description copied from interface:Generator
- Specified by:
generateGeneratedAnnotationDate
in interfaceGenerator
-
setGenerateGeneratedAnnotationDate
public void setGenerateGeneratedAnnotationDate(boolean generateGeneratedAnnotationDate)
Description copied from interface:Generator
- Specified by:
setGenerateGeneratedAnnotationDate
in interfaceGenerator
-
generateNonnullAnnotation
public boolean generateNonnullAnnotation()
Description copied from interface:Generator
Whether Nonnull annotations should be generated.In SQL and by consequence in jOOQ, non-nullability cannot be guaranteed statically. There may still be some cases (e.g. after unions, outer joins, etc.) where a normally non-null value turns out to be null!
- Specified by:
generateNonnullAnnotation
in interfaceGenerator
-
setGenerateNonnullAnnotation
public void setGenerateNonnullAnnotation(boolean generateNonnullAnnotation)
Description copied from interface:Generator
Whether Nonnull annotations should be generated.In SQL and by consequence in jOOQ, non-nullability cannot be guaranteed statically. There may still be some cases (e.g. after unions, outer joins, etc.) where a normally non-null value turns out to be null!
- Specified by:
setGenerateNonnullAnnotation
in interfaceGenerator
-
generatedNonnullAnnotationType
public String generatedNonnullAnnotationType()
Description copied from interface:Generator
Which type of Nonnull annotation should be generated.- Specified by:
generatedNonnullAnnotationType
in interfaceGenerator
-
setGeneratedNonnullAnnotationType
public void setGeneratedNonnullAnnotationType(String generatedNonnullAnnotationType)
Description copied from interface:Generator
Which type of Nonnull annotation should be generated.- Specified by:
setGeneratedNonnullAnnotationType
in interfaceGenerator
-
generateNullableAnnotation
public boolean generateNullableAnnotation()
Description copied from interface:Generator
Whether Nullable annotations should be generated.Unlike
Generator.generateNonnullAnnotation()
, nullability can be guaranteed as in SQL, and by consequence in jOOQ, every column expression can be made nullable using some SQL operation.- Specified by:
generateNullableAnnotation
in interfaceGenerator
-
setGenerateNullableAnnotation
public void setGenerateNullableAnnotation(boolean generateNullableAnnotation)
Description copied from interface:Generator
Whether Nullable annotations should be generated.Unlike
Generator.generateNonnullAnnotation()
, nullability can be guaranteed as in SQL, and by consequence in jOOQ, every column expression can be made nullable using some SQL operation.- Specified by:
setGenerateNullableAnnotation
in interfaceGenerator
-
generatedNullableAnnotationType
public String generatedNullableAnnotationType()
Description copied from interface:Generator
Which type of Nullable annotation should be generated.- Specified by:
generatedNullableAnnotationType
in interfaceGenerator
-
setGeneratedNullableAnnotationType
public void setGeneratedNullableAnnotationType(String generatedNullableAnnotationType)
Description copied from interface:Generator
Which type of Nullable annotation should be generated.- Specified by:
setGeneratedNullableAnnotationType
in interfaceGenerator
-
setGenerateConstructorPropertiesAnnotation
public void setGenerateConstructorPropertiesAnnotation(boolean generateConstructorPropertiesAnnotation)
Description copied from interface:Generator
Whether theConstructorProperties
annotation should be generated.- Specified by:
setGenerateConstructorPropertiesAnnotation
in interfaceGenerator
-
generateConstructorPropertiesAnnotation
public boolean generateConstructorPropertiesAnnotation()
Description copied from interface:Generator
Whether theConstructorProperties
annotation should be generated.- Specified by:
generateConstructorPropertiesAnnotation
in interfaceGenerator
-
setGenerateConstructorPropertiesAnnotationOnPojos
public void setGenerateConstructorPropertiesAnnotationOnPojos(boolean generateConstructorPropertiesAnnotationOnPojos)
Description copied from interface:Generator
Whether theConstructorProperties
annotation should be generated on POJOs.- Specified by:
setGenerateConstructorPropertiesAnnotationOnPojos
in interfaceGenerator
-
generateConstructorPropertiesAnnotationOnPojos
public boolean generateConstructorPropertiesAnnotationOnPojos()
Description copied from interface:Generator
Whether theConstructorProperties
annotation should be generated on POJOs.- Specified by:
generateConstructorPropertiesAnnotationOnPojos
in interfaceGenerator
-
setGenerateConstructorPropertiesAnnotationOnRecords
public void setGenerateConstructorPropertiesAnnotationOnRecords(boolean generateConstructorPropertiesAnnotationOnRecords)
Description copied from interface:Generator
Whether theConstructorProperties
annotation should be generated on records.- Specified by:
setGenerateConstructorPropertiesAnnotationOnRecords
in interfaceGenerator
-
generateConstructorPropertiesAnnotationOnRecords
public boolean generateConstructorPropertiesAnnotationOnRecords()
Description copied from interface:Generator
Whether theConstructorProperties
annotation should be generated on records.- Specified by:
generateConstructorPropertiesAnnotationOnRecords
in interfaceGenerator
-
useSchemaVersionProvider
public boolean useSchemaVersionProvider()
- Specified by:
useSchemaVersionProvider
in interfaceGenerator
-
setUseSchemaVersionProvider
public void setUseSchemaVersionProvider(boolean useSchemaVersionProvider)
- Specified by:
setUseSchemaVersionProvider
in interfaceGenerator
-
useCatalogVersionProvider
public boolean useCatalogVersionProvider()
- Specified by:
useCatalogVersionProvider
in interfaceGenerator
-
setUseCatalogVersionProvider
public void setUseCatalogVersionProvider(boolean useCatalogVersionProvider)
- Specified by:
setUseCatalogVersionProvider
in interfaceGenerator
-
generateRoutines
public boolean generateRoutines()
Description copied from interface:Generator
Whether Routines should be generated.- Specified by:
generateRoutines
in interfaceGenerator
-
setGenerateRoutines
public void setGenerateRoutines(boolean generateRoutines)
Description copied from interface:Generator
Whether Routines should be generated.- Specified by:
setGenerateRoutines
in interfaceGenerator
-
generateSequences
public boolean generateSequences()
Description copied from interface:Generator
Whether Sequences should be generated.- Specified by:
generateSequences
in interfaceGenerator
-
setGenerateSequences
public void setGenerateSequences(boolean generateSequences)
Description copied from interface:Generator
Whether Sequences should be generated.- Specified by:
setGenerateSequences
in interfaceGenerator
-
generateSequenceFlags
public boolean generateSequenceFlags()
Description copied from interface:Generator
Whether sequence flags should be generated.- Specified by:
generateSequenceFlags
in interfaceGenerator
-
setGenerateSequenceFlags
public void setGenerateSequenceFlags(boolean generateSequenceFlags)
Description copied from interface:Generator
Whether sequence flags should be generated.- Specified by:
setGenerateSequenceFlags
in interfaceGenerator
-
generateUDTs
public boolean generateUDTs()
Description copied from interface:Generator
Whether UDTs should be generated.- Specified by:
generateUDTs
in interfaceGenerator
-
setGenerateUDTs
public void setGenerateUDTs(boolean generateUDTs)
Description copied from interface:Generator
Whether UDTs should be generated.- Specified by:
setGenerateUDTs
in interfaceGenerator
-
generateTables
public boolean generateTables()
Description copied from interface:Generator
Whether Tables should be generated- Specified by:
generateTables
in interfaceGenerator
-
setGenerateTables
public void setGenerateTables(boolean generateTables)
Description copied from interface:Generator
Whether Tables should be generated- Specified by:
setGenerateTables
in interfaceGenerator
-
generateEmbeddables
public boolean generateEmbeddables()
Description copied from interface:Generator
Whether embeddable types should be generated- Specified by:
generateEmbeddables
in interfaceGenerator
-
setGenerateEmbeddables
public void setGenerateEmbeddables(boolean generateEmbeddables)
Description copied from interface:Generator
Whether embeddable types should be generated- Specified by:
setGenerateEmbeddables
in interfaceGenerator
-
generateRecords
public boolean generateRecords()
Description copied from interface:Generator
Whether TableRecords should be generated in addition to tables- Specified by:
generateRecords
in interfaceGenerator
-
setGenerateRecords
public void setGenerateRecords(boolean generateRecords)
Description copied from interface:Generator
Whether TableRecords should be generated in addition to tables- Specified by:
setGenerateRecords
in interfaceGenerator
-
generateRecordsImplementingRecordN
public boolean generateRecordsImplementingRecordN()
Description copied from interface:Generator
Whether TableRecords should be generated in addition to tables, which implement Record[N] types- Specified by:
generateRecordsImplementingRecordN
in interfaceGenerator
-
setGenerateRecordsImplementingRecordN
public void setGenerateRecordsImplementingRecordN(boolean generateRecordsImplementingRecordN)
Description copied from interface:Generator
Whether TableRecords should be generated in addition to tables, which implement Record[N] types- Specified by:
setGenerateRecordsImplementingRecordN
in interfaceGenerator
-
generateEnumsAsScalaSealedTraits
public boolean generateEnumsAsScalaSealedTraits()
Description copied from interface:Generator
Whether enums generated as Scala sealed traits by theScalaGenerator
.- Specified by:
generateEnumsAsScalaSealedTraits
in interfaceGenerator
-
setGenerateEnumsAsScalaSealedTraits
public void setGenerateEnumsAsScalaSealedTraits(boolean generateEnumsAsScalaSealedTraits)
Description copied from interface:Generator
Whether enums generated as Scala sealed traits by theScalaGenerator
.- Specified by:
setGenerateEnumsAsScalaSealedTraits
in interfaceGenerator
-
generatePojos
public boolean generatePojos()
Description copied from interface:Generator
Whether POJO's should be generated in addition to records- Specified by:
generatePojos
in interfaceGenerator
-
setGeneratePojos
public void setGeneratePojos(boolean generatePojos)
Description copied from interface:Generator
Whether POJO's should be generated in addition to records- Specified by:
setGeneratePojos
in interfaceGenerator
-
generatePojosAsJavaRecordClasses
public boolean generatePojosAsJavaRecordClasses()
Description copied from interface:Generator
Whether POJOs should be generated as Java records by theJavaGenerator
.- Specified by:
generatePojosAsJavaRecordClasses
in interfaceGenerator
-
setGeneratePojosAsJavaRecordClasses
public void setGeneratePojosAsJavaRecordClasses(boolean pojosAsJavaRecordClasses)
Description copied from interface:Generator
Whether POJOs should be generated as Java records by theJavaGenerator
.- Specified by:
setGeneratePojosAsJavaRecordClasses
in interfaceGenerator
-
generatePojosAsScalaCaseClasses
public boolean generatePojosAsScalaCaseClasses()
Description copied from interface:Generator
Whether POJOs should be generated as Scala case classes by theScalaGenerator
.- Specified by:
generatePojosAsScalaCaseClasses
in interfaceGenerator
-
setGeneratePojosAsScalaCaseClasses
public void setGeneratePojosAsScalaCaseClasses(boolean pojosAsScalaCaseClasses)
Description copied from interface:Generator
Whether POJOs should be generated as Scala case classes by theScalaGenerator
.- Specified by:
setGeneratePojosAsScalaCaseClasses
in interfaceGenerator
-
generatePojosAsKotlinDataClasses
public boolean generatePojosAsKotlinDataClasses()
Description copied from interface:Generator
Whether POJOs should be generated as Kotlin data classes by theKotlinGenerator
.- Specified by:
generatePojosAsKotlinDataClasses
in interfaceGenerator
-
setGeneratePojosAsKotlinDataClasses
public void setGeneratePojosAsKotlinDataClasses(boolean pojosAsKotlinDataClasses)
Description copied from interface:Generator
Whether POJOs should be generated as Kotlin data classes by theKotlinGenerator
.- Specified by:
setGeneratePojosAsKotlinDataClasses
in interfaceGenerator
-
generateImmutablePojos
public boolean generateImmutablePojos()
Description copied from interface:Generator
Whether immutable POJO's should be generated in addition to records- Specified by:
generateImmutablePojos
in interfaceGenerator
-
setGenerateImmutablePojos
public void setGenerateImmutablePojos(boolean generateImmutablePojos)
Description copied from interface:Generator
Whether immutable POJO's should be generated in addition to records- Specified by:
setGenerateImmutablePojos
in interfaceGenerator
-
generateSerializablePojos
public boolean generateSerializablePojos()
Description copied from interface:Generator
Whether generated POJO's should beSerializable
.- Specified by:
generateSerializablePojos
in interfaceGenerator
-
setGenerateSerializablePojos
public void setGenerateSerializablePojos(boolean generateSerializablePojos)
Description copied from interface:Generator
Whether generated POJO's should beSerializable
.- Specified by:
setGenerateSerializablePojos
in interfaceGenerator
-
generateInterfaces
public boolean generateInterfaces()
Description copied from interface:Generator
Whether interfaces should be generated to be implemented by records and POJO's- Specified by:
generateInterfaces
in interfaceGenerator
-
setGenerateInterfaces
public void setGenerateInterfaces(boolean generateInterfaces)
Description copied from interface:Generator
Whether interfaces should be generated to be implemented by records and POJO's- Specified by:
setGenerateInterfaces
in interfaceGenerator
-
generateImmutableInterfaces
public boolean generateImmutableInterfaces()
Description copied from interface:Generator
Whether immutable interfaces should be generated in addition to records- Specified by:
generateImmutableInterfaces
in interfaceGenerator
-
setGenerateImmutableInterfaces
public void setGenerateImmutableInterfaces(boolean generateImmutableInterfaces)
Description copied from interface:Generator
Whether immutable interfaces should be generated in addition to records- Specified by:
setGenerateImmutableInterfaces
in interfaceGenerator
-
generateSerializableInterfaces
public boolean generateSerializableInterfaces()
Description copied from interface:Generator
Whether generated interfaces should extendSerializable
.- Specified by:
generateSerializableInterfaces
in interfaceGenerator
-
setGenerateSerializableInterfaces
public void setGenerateSerializableInterfaces(boolean generateSerializableInterfaces)
Description copied from interface:Generator
Whether generated interfaces should extendSerializable
.- Specified by:
setGenerateSerializableInterfaces
in interfaceGenerator
-
generateDaos
public boolean generateDaos()
Description copied from interface:Generator
Whether DAO's should be generated in addition to pojos- Specified by:
generateDaos
in interfaceGenerator
-
setGenerateDaos
public void setGenerateDaos(boolean generateDaos)
Description copied from interface:Generator
Whether DAO's should be generated in addition to pojos- Specified by:
setGenerateDaos
in interfaceGenerator
-
generateJPAAnnotations
public boolean generateJPAAnnotations()
Description copied from interface:Generator
Whether POJO's and records should be annotated with JPA annotations- Specified by:
generateJPAAnnotations
in interfaceGenerator
-
setGenerateJPAAnnotations
public void setGenerateJPAAnnotations(boolean generateJPAAnnotations)
Description copied from interface:Generator
Whether POJO's and records should be annotated with JPA annotations- Specified by:
setGenerateJPAAnnotations
in interfaceGenerator
-
generateJPAVersion
public String generateJPAVersion()
Description copied from interface:Generator
The minimum JPA version that is supported by generated code (latest version if empty).- Specified by:
generateJPAVersion
in interfaceGenerator
-
setGenerateJPAVersion
public void setGenerateJPAVersion(String generateJPAVersion)
Description copied from interface:Generator
The minimum JPA version that is supported by generated code (latest version if empty).- Specified by:
setGenerateJPAVersion
in interfaceGenerator
-
generateValidationAnnotations
public boolean generateValidationAnnotations()
Description copied from interface:Generator
Whether POJO's and records should be annotated with JSR-303 validation annotations- Specified by:
generateValidationAnnotations
in interfaceGenerator
-
setGenerateValidationAnnotations
public void setGenerateValidationAnnotations(boolean generateValidationAnnotations)
Description copied from interface:Generator
Whether POJO's and records should be annotated with JSR-303 validation annotations- Specified by:
setGenerateValidationAnnotations
in interfaceGenerator
-
generateSpringAnnotations
public boolean generateSpringAnnotations()
Description copied from interface:Generator
Whether DAOs should be annotated with useful spring annotations such as@Repository
or@Autowired
- Specified by:
generateSpringAnnotations
in interfaceGenerator
-
setGenerateSpringAnnotations
public void setGenerateSpringAnnotations(boolean generateSpringAnnotations)
Description copied from interface:Generator
Whether DAOs should be annotated with useful spring annotations such as@Repository
or@Autowired
- Specified by:
setGenerateSpringAnnotations
in interfaceGenerator
-
generateKotlinSetterJvmNameAnnotationsOnIsPrefix
public boolean generateKotlinSetterJvmNameAnnotationsOnIsPrefix()
Description copied from interface:Generator
Whether kotlin mutable properties should be annotated withset:JvmName
as a workaround for problems occurring when kotlin producessetX()
instead ofsetIsX()
setters for anisX
property.- Specified by:
generateKotlinSetterJvmNameAnnotationsOnIsPrefix
in interfaceGenerator
-
setGenerateKotlinSetterJvmNameAnnotationsOnIsPrefix
public void setGenerateKotlinSetterJvmNameAnnotationsOnIsPrefix(boolean generateKotlinSetterJvmNameAnnotationsOnIsPrefix)
Description copied from interface:Generator
Whether kotlin mutable properties should be annotated withset:JvmName
as a workaround for problems occurring when kotlin producessetX()
instead ofsetIsX()
setters for anisX
property.- Specified by:
setGenerateKotlinSetterJvmNameAnnotationsOnIsPrefix
in interfaceGenerator
-
generatedSerialVersionUID
public GeneratedSerialVersionUID generatedSerialVersionUID()
Description copied from interface:Generator
The type ofserialVersionUID
that should be generated.- Specified by:
generatedSerialVersionUID
in interfaceGenerator
-
setGenerateGeneratedSerialVersionUID
public void setGenerateGeneratedSerialVersionUID(GeneratedSerialVersionUID generatedSerialVersionUID)
Description copied from interface:Generator
The type ofserialVersionUID
that should be generated.- Specified by:
setGenerateGeneratedSerialVersionUID
in interfaceGenerator
-
maxMembersPerInitialiser
public int maxMembersPerInitialiser()
Description copied from interface:Generator
The maximum number of members per initialiser, to prevent reaching the 64kb byte code per method limit in generated code.- Specified by:
maxMembersPerInitialiser
in interfaceGenerator
-
setMaxMembersPerInitialiser
public void setMaxMembersPerInitialiser(int maxMembersPerInitialiser)
Description copied from interface:Generator
The maximum number of members per initialiser, to prevent reaching the 64kb byte code per method limit in generated code.- Specified by:
setMaxMembersPerInitialiser
in interfaceGenerator
-
generateGlobalObjectReferences
public boolean generateGlobalObjectReferences()
Description copied from interface:Generator
Whether global object references should be generated- Specified by:
generateGlobalObjectReferences
in interfaceGenerator
-
setGenerateGlobalObjectReferences
public void setGenerateGlobalObjectReferences(boolean generateGlobalObjectReferences)
Description copied from interface:Generator
Whether global object references should be generated- Specified by:
setGenerateGlobalObjectReferences
in interfaceGenerator
-
generateGlobalCatalogReferences
public boolean generateGlobalCatalogReferences()
Description copied from interface:Generator
Whether global catalog references should be generated- Specified by:
generateGlobalCatalogReferences
in interfaceGenerator
-
setGenerateGlobalCatalogReferences
public void setGenerateGlobalCatalogReferences(boolean globalCatalogReferences)
Description copied from interface:Generator
Whether global catalog references should be generated- Specified by:
setGenerateGlobalCatalogReferences
in interfaceGenerator
-
generateGlobalSchemaReferences
public boolean generateGlobalSchemaReferences()
Description copied from interface:Generator
Whether global schema references should be generated- Specified by:
generateGlobalSchemaReferences
in interfaceGenerator
-
setGenerateGlobalSchemaReferences
public void setGenerateGlobalSchemaReferences(boolean globalSchemaReferences)
Description copied from interface:Generator
Whether global schema references should be generated- Specified by:
setGenerateGlobalSchemaReferences
in interfaceGenerator
-
generateGlobalRoutineReferences
public boolean generateGlobalRoutineReferences()
Description copied from interface:Generator
Whether global routine references should be generated- Specified by:
generateGlobalRoutineReferences
in interfaceGenerator
-
setGenerateGlobalRoutineReferences
public void setGenerateGlobalRoutineReferences(boolean generateGlobalRoutineReferences)
Description copied from interface:Generator
Whether global routine references should be generated- Specified by:
setGenerateGlobalRoutineReferences
in interfaceGenerator
-
generateGlobalSequenceReferences
public boolean generateGlobalSequenceReferences()
Description copied from interface:Generator
Whether global sequence references should be generated- Specified by:
generateGlobalSequenceReferences
in interfaceGenerator
-
setGenerateGlobalSequenceReferences
public void setGenerateGlobalSequenceReferences(boolean generateGlobalSequenceReferences)
Description copied from interface:Generator
Whether global sequence references should be generated- Specified by:
setGenerateGlobalSequenceReferences
in interfaceGenerator
-
generateGlobalTableReferences
public boolean generateGlobalTableReferences()
Description copied from interface:Generator
Whether global table references should be generated- Specified by:
generateGlobalTableReferences
in interfaceGenerator
-
setGenerateGlobalTableReferences
public void setGenerateGlobalTableReferences(boolean generateGlobalTableReferences)
Description copied from interface:Generator
Whether global table references should be generated- Specified by:
setGenerateGlobalTableReferences
in interfaceGenerator
-
generateGlobalDomainReferences
public boolean generateGlobalDomainReferences()
Description copied from interface:Generator
Whether global domain references should be generated- Specified by:
generateGlobalDomainReferences
in interfaceGenerator
-
setGenerateGlobalDomainReferences
public void setGenerateGlobalDomainReferences(boolean globalDomainReferences)
Description copied from interface:Generator
Whether global domain references should be generated- Specified by:
setGenerateGlobalDomainReferences
in interfaceGenerator
-
generateGlobalUDTReferences
public boolean generateGlobalUDTReferences()
Description copied from interface:Generator
Whether global UDT references should be generated- Specified by:
generateGlobalUDTReferences
in interfaceGenerator
-
setGenerateGlobalUDTReferences
public void setGenerateGlobalUDTReferences(boolean generateGlobalUDTReferences)
Description copied from interface:Generator
Whether global UDT references should be generated- Specified by:
setGenerateGlobalUDTReferences
in interfaceGenerator
-
generateGlobalQueueReferences
public boolean generateGlobalQueueReferences()
Description copied from interface:Generator
Whether global queue references should be generated- Specified by:
generateGlobalQueueReferences
in interfaceGenerator
-
setGenerateGlobalQueueReferences
public void setGenerateGlobalQueueReferences(boolean globalQueueReferences)
Description copied from interface:Generator
Whether global queue references should be generated- Specified by:
setGenerateGlobalQueueReferences
in interfaceGenerator
-
generateGlobalLinkReferences
public boolean generateGlobalLinkReferences()
Description copied from interface:Generator
Whether global link references should be generated- Specified by:
generateGlobalLinkReferences
in interfaceGenerator
-
setGenerateGlobalLinkReferences
public void setGenerateGlobalLinkReferences(boolean globalLinkReferences)
Description copied from interface:Generator
Whether global link references should be generated- Specified by:
setGenerateGlobalLinkReferences
in interfaceGenerator
-
generateGlobalKeyReferences
public boolean generateGlobalKeyReferences()
Description copied from interface:Generator
Whether global key references should be generated- Specified by:
generateGlobalKeyReferences
in interfaceGenerator
-
setGenerateGlobalKeyReferences
public void setGenerateGlobalKeyReferences(boolean globalKeyReferences)
Description copied from interface:Generator
Whether global key references should be generated- Specified by:
setGenerateGlobalKeyReferences
in interfaceGenerator
-
generateGlobalIndexReferences
public boolean generateGlobalIndexReferences()
Description copied from interface:Generator
Whether global index references should be generated- Specified by:
generateGlobalIndexReferences
in interfaceGenerator
-
setGenerateGlobalIndexReferences
public void setGenerateGlobalIndexReferences(boolean globalIndexReferences)
Description copied from interface:Generator
Whether global index references should be generated- Specified by:
setGenerateGlobalIndexReferences
in interfaceGenerator
-
generateQueues
public boolean generateQueues()
Description copied from interface:Generator
Whether queue related code should be generated- Specified by:
generateQueues
in interfaceGenerator
-
setGenerateQueues
public void setGenerateQueues(boolean queues)
Description copied from interface:Generator
Whether queue related code should be generated- Specified by:
setGenerateQueues
in interfaceGenerator
-
generateLinks
public boolean generateLinks()
Description copied from interface:Generator
Whether link related code should be generated- Specified by:
generateLinks
in interfaceGenerator
-
setGenerateLinks
public void setGenerateLinks(boolean links)
Description copied from interface:Generator
Whether link related code should be generated- Specified by:
setGenerateLinks
in interfaceGenerator
-
generateKeys
public boolean generateKeys()
Description copied from interface:Generator
Whether key related code should be generated- Specified by:
generateKeys
in interfaceGenerator
-
setGenerateKeys
public void setGenerateKeys(boolean keys)
Description copied from interface:Generator
Whether key related code should be generated- Specified by:
setGenerateKeys
in interfaceGenerator
-
generateJavadoc
public boolean generateJavadoc()
Description copied from interface:Generator
Whether any Javadoc should be generated.- Specified by:
generateJavadoc
in interfaceGenerator
-
setGenerateJavadoc
public void setGenerateJavadoc(boolean javadoc)
Description copied from interface:Generator
Whether any Javadoc should be generated.- Specified by:
setGenerateJavadoc
in interfaceGenerator
-
generateComments
public boolean generateComments()
Description copied from interface:Generator
Whether any SQL comments should be generated as Javadoc.- Specified by:
generateComments
in interfaceGenerator
-
setGenerateComments
public void setGenerateComments(boolean comments)
Description copied from interface:Generator
Whether any SQL comments should be generated as Javadoc.- Specified by:
setGenerateComments
in interfaceGenerator
-
generateCommentsOnAttributes
public boolean generateCommentsOnAttributes()
Description copied from interface:Generator
Whether SQL comments on attributes should be generated as Javadoc.- Specified by:
generateCommentsOnAttributes
in interfaceGenerator
-
setGenerateCommentsOnAttributes
public void setGenerateCommentsOnAttributes(boolean commentsOnAttributes)
Description copied from interface:Generator
Whether SQL comments on attributes should be generated as Javadoc.- Specified by:
setGenerateCommentsOnAttributes
in interfaceGenerator
-
generateCommentsOnCatalogs
public boolean generateCommentsOnCatalogs()
Description copied from interface:Generator
Whether SQL comments on catalogs should be generated as Javadoc.- Specified by:
generateCommentsOnCatalogs
in interfaceGenerator
-
setGenerateCommentsOnCatalogs
public void setGenerateCommentsOnCatalogs(boolean commentsOnCatalogs)
Description copied from interface:Generator
Whether SQL comments on catalogs should be generated as Javadoc.- Specified by:
setGenerateCommentsOnCatalogs
in interfaceGenerator
-
generateCommentsOnColumns
public boolean generateCommentsOnColumns()
Description copied from interface:Generator
Whether SQL comments on columns should be generated as Javadoc.- Specified by:
generateCommentsOnColumns
in interfaceGenerator
-
setGenerateCommentsOnColumns
public void setGenerateCommentsOnColumns(boolean commentsOnColumns)
Description copied from interface:Generator
Whether SQL comments on columns should be generated as Javadoc.- Specified by:
setGenerateCommentsOnColumns
in interfaceGenerator
-
generateCommentsOnKeys
public boolean generateCommentsOnKeys()
Description copied from interface:Generator
Whether SQL comments on keys should be generated as Javadoc.- Specified by:
generateCommentsOnKeys
in interfaceGenerator
-
setGenerateCommentsOnKeys
public void setGenerateCommentsOnKeys(boolean commentsOnKeys)
Description copied from interface:Generator
Whether SQL comments on keys should be generated as Javadoc.- Specified by:
setGenerateCommentsOnKeys
in interfaceGenerator
-
generateCommentsOnLinks
public boolean generateCommentsOnLinks()
Description copied from interface:Generator
Whether SQL comments on links should be generated as Javadoc.- Specified by:
generateCommentsOnLinks
in interfaceGenerator
-
setGenerateCommentsOnLinks
public void setGenerateCommentsOnLinks(boolean commentsOnLinks)
Description copied from interface:Generator
Whether SQL comments on links should be generated as Javadoc.- Specified by:
setGenerateCommentsOnLinks
in interfaceGenerator
-
generateCommentsOnPackages
public boolean generateCommentsOnPackages()
Description copied from interface:Generator
Whether SQL comments on packages should be generated as Javadoc.- Specified by:
generateCommentsOnPackages
in interfaceGenerator
-
setGenerateCommentsOnPackages
public void setGenerateCommentsOnPackages(boolean commentsOnPackages)
Description copied from interface:Generator
Whether SQL comments on packages should be generated as Javadoc.- Specified by:
setGenerateCommentsOnPackages
in interfaceGenerator
-
generateCommentsOnParameters
public boolean generateCommentsOnParameters()
Description copied from interface:Generator
Whether SQL comments on parameters should be generated as Javadoc.- Specified by:
generateCommentsOnParameters
in interfaceGenerator
-
setGenerateCommentsOnParameters
public void setGenerateCommentsOnParameters(boolean commentsOnParameters)
Description copied from interface:Generator
Whether SQL comments on parameters should be generated as Javadoc.- Specified by:
setGenerateCommentsOnParameters
in interfaceGenerator
-
generateCommentsOnQueues
public boolean generateCommentsOnQueues()
Description copied from interface:Generator
Whether SQL comments on queues should be generated as Javadoc.- Specified by:
generateCommentsOnQueues
in interfaceGenerator
-
setGenerateCommentsOnQueues
public void setGenerateCommentsOnQueues(boolean commentsOnQueues)
Description copied from interface:Generator
Whether SQL comments on queues should be generated as Javadoc.- Specified by:
setGenerateCommentsOnQueues
in interfaceGenerator
-
generateCommentsOnRoutines
public boolean generateCommentsOnRoutines()
Description copied from interface:Generator
Whether SQL comments on routines should be generated as Javadoc.- Specified by:
generateCommentsOnRoutines
in interfaceGenerator
-
setGenerateCommentsOnRoutines
public void setGenerateCommentsOnRoutines(boolean commentsOnRoutines)
Description copied from interface:Generator
Whether SQL comments on routines should be generated as Javadoc.- Specified by:
setGenerateCommentsOnRoutines
in interfaceGenerator
-
generateCommentsOnSchemas
public boolean generateCommentsOnSchemas()
Description copied from interface:Generator
Whether SQL comments on schemas should be generated as Javadoc.- Specified by:
generateCommentsOnSchemas
in interfaceGenerator
-
setGenerateCommentsOnSchemas
public void setGenerateCommentsOnSchemas(boolean commentsOnSchemas)
Description copied from interface:Generator
Whether SQL comments on schemas should be generated as Javadoc.- Specified by:
setGenerateCommentsOnSchemas
in interfaceGenerator
-
generateCommentsOnSequences
public boolean generateCommentsOnSequences()
Description copied from interface:Generator
Whether SQL comments on sequences should be generated as Javadoc.- Specified by:
generateCommentsOnSequences
in interfaceGenerator
-
setGenerateCommentsOnSequences
public void setGenerateCommentsOnSequences(boolean commentsOnSequences)
Description copied from interface:Generator
Whether SQL comments on sequences should be generated as Javadoc.- Specified by:
setGenerateCommentsOnSequences
in interfaceGenerator
-
generateCommentsOnTables
public boolean generateCommentsOnTables()
Description copied from interface:Generator
Whether SQL comments on tables should be generated as Javadoc.- Specified by:
generateCommentsOnTables
in interfaceGenerator
-
setGenerateCommentsOnTables
public void setGenerateCommentsOnTables(boolean commentsOnTables)
Description copied from interface:Generator
Whether SQL comments on tables should be generated as Javadoc.- Specified by:
setGenerateCommentsOnTables
in interfaceGenerator
-
generateCommentsOnEmbeddables
public boolean generateCommentsOnEmbeddables()
Description copied from interface:Generator
Whether SQL comments on embeddables should be generated as Javadoc.- Specified by:
generateCommentsOnEmbeddables
in interfaceGenerator
-
setGenerateCommentsOnEmbeddables
public void setGenerateCommentsOnEmbeddables(boolean generateCommentsOnEmbeddables)
Description copied from interface:Generator
Whether SQL comments on embeddables should be generated as Javadoc.- Specified by:
setGenerateCommentsOnEmbeddables
in interfaceGenerator
-
generateCommentsOnUDTs
public boolean generateCommentsOnUDTs()
Description copied from interface:Generator
Whether SQL comments on UDTs should be generated as Javadoc.- Specified by:
generateCommentsOnUDTs
in interfaceGenerator
-
setGenerateCommentsOnUDTs
public void setGenerateCommentsOnUDTs(boolean commentsOnUDTs)
Description copied from interface:Generator
Whether SQL comments on UDTs should be generated as Javadoc.- Specified by:
setGenerateCommentsOnUDTs
in interfaceGenerator
-
generateSources
public boolean generateSources()
Description copied from interface:Generator
Whether source code should be generated on any object type.- Specified by:
generateSources
in interfaceGenerator
-
setGenerateSources
public void setGenerateSources(boolean sources)
Description copied from interface:Generator
Whether source code should be generated on any object type.- Specified by:
setGenerateSources
in interfaceGenerator
-
generateSourcesOnViews
public boolean generateSourcesOnViews()
Description copied from interface:Generator
Whether source code should be generated on views.- Specified by:
generateSourcesOnViews
in interfaceGenerator
-
setGenerateSourcesOnViews
public void setGenerateSourcesOnViews(boolean sourcesOnViews)
Description copied from interface:Generator
Whether source code should be generated on views.- Specified by:
setGenerateSourcesOnViews
in interfaceGenerator
-
fluentSetters
@Deprecated public boolean fluentSetters()
Deprecated.Description copied from interface:Generator
Whether fluent setters should be generated- Specified by:
fluentSetters
in interfaceGenerator
-
setFluentSetters
@Deprecated public void setFluentSetters(boolean fluentSetters)
Deprecated.Description copied from interface:Generator
Whether fluent setters should be generated- Specified by:
setFluentSetters
in interfaceGenerator
-
generateFluentSetters
public boolean generateFluentSetters()
Description copied from interface:Generator
Whether fluent setters should be generated- Specified by:
generateFluentSetters
in interfaceGenerator
-
setGenerateFluentSetters
public void setGenerateFluentSetters(boolean fluentSetters)
Description copied from interface:Generator
Whether fluent setters should be generated- Specified by:
setGenerateFluentSetters
in interfaceGenerator
-
generateJavaBeansGettersAndSetters
public boolean generateJavaBeansGettersAndSetters()
Description copied from interface:Generator
Whether getters and setters should be generated JavaBeans style (or jOOQ style).- Specified by:
generateJavaBeansGettersAndSetters
in interfaceGenerator
-
setGenerateJavaBeansGettersAndSetters
public void setGenerateJavaBeansGettersAndSetters(boolean javaBeansGettersAndSetters)
Description copied from interface:Generator
Whether getters and setters should be generated JavaBeans style (or jOOQ style).- Specified by:
setGenerateJavaBeansGettersAndSetters
in interfaceGenerator
-
generateVarargsSetters
public boolean generateVarargsSetters()
Description copied from interface:Generator
Whether varargs setters should be generated for array types.- Specified by:
generateVarargsSetters
in interfaceGenerator
-
setGenerateVarargsSetters
public void setGenerateVarargsSetters(boolean varargsSetters)
Description copied from interface:Generator
Whether varargs setters should be generated for array types.- Specified by:
setGenerateVarargsSetters
in interfaceGenerator
-
generatePojosEqualsAndHashCode
public boolean generatePojosEqualsAndHashCode()
Description copied from interface:Generator
Whetherequals()
andhashCode()
methods should be generated on POJOs- Specified by:
generatePojosEqualsAndHashCode
in interfaceGenerator
-
setGeneratePojosEqualsAndHashCode
public void setGeneratePojosEqualsAndHashCode(boolean generatePojosEqualsAndHashCode)
Description copied from interface:Generator
Whetherequals()
andhashCode()
methods should be generated on POJOs- Specified by:
setGeneratePojosEqualsAndHashCode
in interfaceGenerator
-
generatePojosToString
public boolean generatePojosToString()
Description copied from interface:Generator
Whether atoString()
method should be generated on POJOs- Specified by:
generatePojosToString
in interfaceGenerator
-
setGeneratePojosToString
public void setGeneratePojosToString(boolean generatePojosToString)
Description copied from interface:Generator
Whether atoString()
method should be generated on POJOs- Specified by:
setGeneratePojosToString
in interfaceGenerator
-
fullyQualifiedTypes
@Deprecated public String fullyQualifiedTypes()
Deprecated.Description copied from interface:Generator
A regular expression matching all the types in generated code that should be fully qualified.- Specified by:
fullyQualifiedTypes
in interfaceGenerator
-
setFullyQualifiedTypes
@Deprecated public void setFullyQualifiedTypes(String fullyQualifiedTypes)
Deprecated.Description copied from interface:Generator
A regular expression matching all the types in generated code that should be fully qualified.- Specified by:
setFullyQualifiedTypes
in interfaceGenerator
-
generateFullyQualifiedTypes
public String generateFullyQualifiedTypes()
Description copied from interface:Generator
A regular expression matching all the types in generated code that should be fully qualified.- Specified by:
generateFullyQualifiedTypes
in interfaceGenerator
-
setGenerateFullyQualifiedTypes
public void setGenerateFullyQualifiedTypes(String generateFullyQualifiedTypes)
Description copied from interface:Generator
A regular expression matching all the types in generated code that should be fully qualified.- Specified by:
setGenerateFullyQualifiedTypes
in interfaceGenerator
-
generateJavaTimeTypes
public boolean generateJavaTimeTypes()
Description copied from interface:Generator
A flag indicating whether Java 8's java.time types should be used by the source code generator, rather than JDBC's java.sql types.This flag is ignored in the commercial Java 6 distribution of jOOQ 3.9+
- Specified by:
generateJavaTimeTypes
in interfaceGenerator
-
setGenerateJavaTimeTypes
public void setGenerateJavaTimeTypes(boolean generateJavaTimeTypes)
Description copied from interface:Generator
A flag indicating whether Java 8's java.time types should be used by the source code generator, rather than JDBC's java.sql types.This flag is ignored in the commercial Java 6 distribution of jOOQ 3.9+
- Specified by:
setGenerateJavaTimeTypes
in interfaceGenerator
-
generateEmptyCatalogs
public boolean generateEmptyCatalogs()
Description copied from interface:Generator
Whether empty catalogs should still be generated.- Specified by:
generateEmptyCatalogs
in interfaceGenerator
-
setGenerateEmptyCatalogs
public void setGenerateEmptyCatalogs(boolean generateEmptyCatalogs)
Description copied from interface:Generator
Whether empty catalogs should still be generated.- Specified by:
setGenerateEmptyCatalogs
in interfaceGenerator
-
generateEmptySchemas
public boolean generateEmptySchemas()
Description copied from interface:Generator
Whether empty schemas should still be generated.- Specified by:
generateEmptySchemas
in interfaceGenerator
-
setGenerateEmptySchemas
public void setGenerateEmptySchemas(boolean generateEmptySchemas)
Description copied from interface:Generator
Whether empty schemas should still be generated.- Specified by:
setGenerateEmptySchemas
in interfaceGenerator
-
generateNewline
public String generateNewline()
Description copied from interface:Generator
The newline character(s) to be used in generated code.- Specified by:
generateNewline
in interfaceGenerator
-
setGenerateNewline
public void setGenerateNewline(String newline)
Description copied from interface:Generator
The newline character(s) to be used in generated code.- Specified by:
setGenerateNewline
in interfaceGenerator
-
generateIndentation
public String generateIndentation()
Description copied from interface:Generator
The indentation character(s) to be used in generated code.- Specified by:
generateIndentation
in interfaceGenerator
-
setGenerateIndentation
public void setGenerateIndentation(String indentation)
Description copied from interface:Generator
The indentation character(s) to be used in generated code.- Specified by:
setGenerateIndentation
in interfaceGenerator
-
generatePrintMarginForBlockComment
public int generatePrintMarginForBlockComment()
Description copied from interface:Generator
The print margin for Javadoc and other block comments to be used in generated code.- Specified by:
generatePrintMarginForBlockComment
in interfaceGenerator
-
setGeneratePrintMarginForBlockComment
public void setGeneratePrintMarginForBlockComment(int printMarginForBlockComment)
Description copied from interface:Generator
The print margin for Javadoc and other block comments to be used in generated code.- Specified by:
setGeneratePrintMarginForBlockComment
in interfaceGenerator
-
setTargetDirectory
public void setTargetDirectory(String directory)
Description copied from interface:Generator
Initialise the target directory- Specified by:
setTargetDirectory
in interfaceGenerator
-
getTargetDirectory
public String getTargetDirectory()
Description copied from interface:Generator
The target directory- Specified by:
getTargetDirectory
in interfaceGenerator
-
setTargetPackage
public void setTargetPackage(String packageName)
Description copied from interface:Generator
Initialise the target package name- Specified by:
setTargetPackage
in interfaceGenerator
-
getTargetPackage
public String getTargetPackage()
- Specified by:
getTargetPackage
in interfaceGenerator
- Returns:
- Get the target package for the current configuration
-
getTargetEncoding
public String getTargetEncoding()
Description copied from interface:Generator
The target encoding- Specified by:
getTargetEncoding
in interfaceGenerator
-
setTargetEncoding
public void setTargetEncoding(String encoding)
Description copied from interface:Generator
Initialise the target encoding- Specified by:
setTargetEncoding
in interfaceGenerator
-
getTargetLocale
public Locale getTargetLocale()
Description copied from interface:Generator
The target locale.- Specified by:
getTargetLocale
in interfaceGenerator
-
setTargetLocale
public void setTargetLocale(Locale targetLocale)
Description copied from interface:Generator
The target locale.- Specified by:
setTargetLocale
in interfaceGenerator
-
getTargetClean
public boolean getTargetClean()
Description copied from interface:Generator
Whether the target package should be cleaned to contain only generated code after a generation run.- Specified by:
getTargetClean
in interfaceGenerator
-
setTargetClean
public void setTargetClean(boolean clean)
Description copied from interface:Generator
Whether the target package should be cleaned to contain only generated code after a generation run.- Specified by:
setTargetClean
in interfaceGenerator
-
empty
protected void empty(File file, String suffix)
If file is a directory, recursively empty its children. If file is a file, delete it.
-
-