diff --git a/.classpath b/.classpath index e16509f..ea7f567 100644 --- a/.classpath +++ b/.classpath @@ -6,7 +6,7 @@ - + diff --git a/.settings/org.eclipse.buildship.core.prefs b/.settings/org.eclipse.buildship.core.prefs index e889521..e479558 100644 --- a/.settings/org.eclipse.buildship.core.prefs +++ b/.settings/org.eclipse.buildship.core.prefs @@ -1,2 +1,13 @@ +arguments= +auto.sync=false +build.scans.enabled=false +connection.gradle.distribution=GRADLE_DISTRIBUTION(WRAPPER) connection.project.dir= eclipse.preferences.version=1 +gradle.user.home= +java.home= +jvm.arguments= +offline.mode=false +override.workspace.settings=false +show.console.view=false +show.executions.view=false diff --git a/.settings/org.eclipse.jdt.core.prefs b/.settings/org.eclipse.jdt.core.prefs index 18ad895..626e0e1 100644 --- a/.settings/org.eclipse.jdt.core.prefs +++ b/.settings/org.eclipse.jdt.core.prefs @@ -1,4 +1,4 @@ eclipse.preferences.version=1 -org.eclipse.jdt.core.compiler.codegen.targetPlatform=11 -org.eclipse.jdt.core.compiler.compliance=11 -org.eclipse.jdt.core.compiler.source=11 +org.eclipse.jdt.core.compiler.codegen.targetPlatform=17 +org.eclipse.jdt.core.compiler.compliance=17 +org.eclipse.jdt.core.compiler.source=17 diff --git a/build.gradle b/build.gradle index 6bfd825..212f565 100644 --- a/build.gradle +++ b/build.gradle @@ -7,15 +7,15 @@ buildscript { jcenter() } dependencies { - classpath 'org.jooq:jooq-codegen:3.15.1' - classpath 'org.postgresql:postgresql:42.2.23' + classpath 'org.jooq:jooq-codegen:3.18.6' + classpath 'org.postgresql:postgresql:42.6.0' classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:latest.release' - classpath 'nu.studer.jooq:nu.studer.jooq.gradle.plugin:6.0' + classpath 'nu.studer.jooq:nu.studer.jooq.gradle.plugin:8.2.1' } } plugins { - id 'nu.studer.jooq' version '6.0' + id 'nu.studer.jooq' version '8.2.1' } apply plugin: 'java' @@ -23,14 +23,14 @@ apply plugin: 'maven-publish' apply plugin: 'eclipse' group = 'de.jottyfan' -version = '0.1.1' +version = '0.1.2' def artifactId = 'timetrackjooq' def versionNumber = version description = """timetrackjooq""" -sourceCompatibility = 11 -targetCompatibility = 11 +sourceCompatibility = 17 +targetCompatibility = 17 tasks.withType(JavaCompile) { options.encoding = 'UTF-8' @@ -43,17 +43,17 @@ repositories { } dependencies { - implementation 'org.jooq:jooq:3.15.1' - implementation 'org.jooq:jooq-codegen:3.15.1' + implementation 'org.jooq:jooq:3.18.6' + implementation 'org.jooq:jooq-codegen:3.18.6' - implementation 'org.postgresql:postgresql:42.2.23' + implementation 'org.postgresql:postgresql:42.6.0' - jooqGenerator 'org.postgresql:postgresql:42.2.23' + jooqGenerator 'org.postgresql:postgresql:42.6.0' } jooq { edition = nu.studer.gradle.jooq.JooqEdition.OSS - version = '3.15.1' + version = '3.18.6' configurations { timetrack { generateSchemaSourceOnCompilation = false @@ -62,8 +62,8 @@ jooq { jdbc { driver = 'org.postgresql.Driver' url = 'jdbc:postgresql://localhost:5432/timetrack' - user = dbUsername - password = dbPassword + user = 'jooq' + password = 'jooq' } generator { name = 'org.jooq.codegen.DefaultGenerator' diff --git a/src/main/java/de/jottyfan/timetrack/db/DefaultCatalog.java b/src/main/java/de/jottyfan/timetrack/db/DefaultCatalog.java index a90e3ad..5db4552 100644 --- a/src/main/java/de/jottyfan/timetrack/db/DefaultCatalog.java +++ b/src/main/java/de/jottyfan/timetrack/db/DefaultCatalog.java @@ -12,6 +12,7 @@ import de.jottyfan.timetrack.db.profile.Profile; import java.util.Arrays; import java.util.List; +import org.jooq.Constants; import org.jooq.Schema; import org.jooq.impl.CatalogImpl; @@ -65,4 +66,12 @@ public class DefaultCatalog extends CatalogImpl { Profile.PROFILE ); } + + /** + * A reference to the 3.18 minor release of the code generator. If this + * doesn't compile, it's because the runtime library uses an older minor + * release, namely: 3.18. You can turn off the generation of this reference + * by specifying /configuration/generator/generate/jooqVersionReference + */ + private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_18; } diff --git a/src/main/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java b/src/main/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java index 93bbf2f..7fbd81a 100644 --- a/src/main/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java +++ b/src/main/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java @@ -52,4 +52,11 @@ public enum EnumContacttype implements EnumType { public String getLiteral() { return literal; } + + /** + * Lookup a value of this EnumType by its literal + */ + public static EnumContacttype lookupLiteral(String literal) { + return EnumType.lookupLiteral(EnumContacttype.class, literal); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/contact/tables/TContact.java b/src/main/java/de/jottyfan/timetrack/db/contact/tables/TContact.java index f20cc95..c232cba 100644 --- a/src/main/java/de/jottyfan/timetrack/db/contact/tables/TContact.java +++ b/src/main/java/de/jottyfan/timetrack/db/contact/tables/TContact.java @@ -9,13 +9,18 @@ import de.jottyfan.timetrack.db.contact.Keys; import de.jottyfan.timetrack.db.contact.enums.EnumContacttype; import de.jottyfan.timetrack.db.contact.tables.records.TContactRecord; +import java.util.function.Function; + import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function5; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row5; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -129,6 +134,11 @@ public class TContact extends TableImpl { return new TContact(alias, this); } + @Override + public TContact as(Table alias) { + return new TContact(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -145,6 +155,14 @@ public class TContact extends TableImpl { return new TContact(name, null); } + /** + * Rename this table + */ + @Override + public TContact rename(Table name) { + return new TContact(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row5 type methods // ------------------------------------------------------------------------- @@ -153,4 +171,19 @@ public class TContact extends TableImpl { public Row5 fieldsRow() { return (Row5) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function5 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function5 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java b/src/main/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java index 7a5440d..df8a798 100644 --- a/src/main/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java @@ -252,5 +252,6 @@ public class TContactRecord extends UpdatableRecordImpl implemen setSurname(surname); setContact(contact); setType(type); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/TBilling.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/TBilling.java index 2ffc2f1..c74a19b 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/TBilling.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/TBilling.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.done.tables.records.TBillingRecord; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function5; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row5; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -52,7 +56,7 @@ public class TBilling extends TableImpl { /** * The column done.t_billing.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_billing.pk. @@ -137,6 +141,11 @@ public class TBilling extends TableImpl { return new TBilling(alias, this); } + @Override + public TBilling as(Table alias) { + return new TBilling(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -153,6 +162,14 @@ public class TBilling extends TableImpl { return new TBilling(name, null); } + /** + * Rename this table + */ + @Override + public TBilling rename(Table name) { + return new TBilling(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row5 type methods // ------------------------------------------------------------------------- @@ -161,4 +178,19 @@ public class TBilling extends TableImpl { public Row5 fieldsRow() { return (Row5) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function5 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function5 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/TDone.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/TDone.java index fdf2663..b8d92c7 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/TDone.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/TDone.java @@ -12,14 +12,18 @@ import de.jottyfan.timetrack.db.profile.tables.TLogin; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function9; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row9; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -53,7 +57,7 @@ public class TDone extends TableImpl { /** * The column done.t_done.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_done.pk. @@ -154,6 +158,9 @@ public class TDone extends TableImpl { private transient TLogin _tLogin; private transient TBilling _tBilling; + /** + * Get the implicit join path to the done.t_project table. + */ public TProject tProject() { if (_tProject == null) _tProject = new TProject(this, Keys.T_DONE__T_DONE_FK_PROJECT_FKEY); @@ -161,6 +168,9 @@ public class TDone extends TableImpl { return _tProject; } + /** + * Get the implicit join path to the done.t_module table. + */ public TModule tModule() { if (_tModule == null) _tModule = new TModule(this, Keys.T_DONE__T_DONE_FK_JOB_FKEY); @@ -168,6 +178,9 @@ public class TDone extends TableImpl { return _tModule; } + /** + * Get the implicit join path to the done.t_job table. + */ public TJob tJob() { if (_tJob == null) _tJob = new TJob(this, Keys.T_DONE__T_DONE_FK_CATEGORY_FKEY); @@ -175,6 +188,9 @@ public class TDone extends TableImpl { return _tJob; } + /** + * Get the implicit join path to the profile.t_login table. + */ public TLogin tLogin() { if (_tLogin == null) _tLogin = new TLogin(this, Keys.T_DONE__T_DONE_FK_LOGIN_FKEY); @@ -182,6 +198,9 @@ public class TDone extends TableImpl { return _tLogin; } + /** + * Get the implicit join path to the done.t_billing table. + */ public TBilling tBilling() { if (_tBilling == null) _tBilling = new TBilling(this, Keys.T_DONE__T_DONE_FK_BILLING_FKEY); @@ -199,6 +218,11 @@ public class TDone extends TableImpl { return new TDone(alias, this); } + @Override + public TDone as(Table alias) { + return new TDone(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -215,6 +239,14 @@ public class TDone extends TableImpl { return new TDone(name, null); } + /** + * Rename this table + */ + @Override + public TDone rename(Table name) { + return new TDone(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row9 type methods // ------------------------------------------------------------------------- @@ -223,4 +255,19 @@ public class TDone extends TableImpl { public Row9 fieldsRow() { return (Row9) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function9 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function9 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/TJob.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/TJob.java index 69e0c0d..ecbf630 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/TJob.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/TJob.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.done.tables.records.TJobRecord; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -52,7 +56,7 @@ public class TJob extends TableImpl { /** * The column done.t_job.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_job.pk. @@ -127,6 +131,11 @@ public class TJob extends TableImpl { return new TJob(alias, this); } + @Override + public TJob as(Table alias) { + return new TJob(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -143,6 +152,14 @@ public class TJob extends TableImpl { return new TJob(name, null); } + /** + * Rename this table + */ + @Override + public TJob rename(Table name) { + return new TJob(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -151,4 +168,19 @@ public class TJob extends TableImpl { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/TModule.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/TModule.java index a67481a..db28568 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/TModule.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/TModule.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -52,7 +56,7 @@ public class TModule extends TableImpl { /** * The column done.t_module.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_module.pk. @@ -127,6 +131,11 @@ public class TModule extends TableImpl { return new TModule(alias, this); } + @Override + public TModule as(Table alias) { + return new TModule(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -143,6 +152,14 @@ public class TModule extends TableImpl { return new TModule(name, null); } + /** + * Rename this table + */ + @Override + public TModule rename(Table name) { + return new TModule(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -151,4 +168,19 @@ public class TModule extends TableImpl { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/TProject.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/TProject.java index 39cfd17..9513ced 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/TProject.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/TProject.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -52,7 +56,7 @@ public class TProject extends TableImpl { /** * The column done.t_project.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_project.pk. @@ -127,6 +131,11 @@ public class TProject extends TableImpl { return new TProject(alias, this); } + @Override + public TProject as(Table alias) { + return new TProject(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -143,6 +152,14 @@ public class TProject extends TableImpl { return new TProject(name, null); } + /** + * Rename this table + */ + @Override + public TProject rename(Table name) { + return new TProject(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -151,4 +168,19 @@ public class TProject extends TableImpl { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VBilling.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VBilling.java index cc8ef17..d3b6559 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VBilling.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VBilling.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VBillingRecord; import java.math.BigDecimal; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function5; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row5; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -117,6 +121,11 @@ public class VBilling extends TableImpl { return new VBilling(alias, this); } + @Override + public VBilling as(Table alias) { + return new VBilling(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -133,6 +142,14 @@ public class VBilling extends TableImpl { return new VBilling(name, null); } + /** + * Rename this table + */ + @Override + public VBilling rename(Table name) { + return new VBilling(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row5 type methods // ------------------------------------------------------------------------- @@ -141,4 +158,19 @@ public class VBilling extends TableImpl { public Row5 fieldsRow() { return (Row5) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function5 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function5 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaily.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaily.java index 68fe508..4fd671c 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaily.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaily.java @@ -7,12 +7,17 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDailyRecord; +import java.util.function.Function; + import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -111,6 +116,11 @@ public class VDaily extends TableImpl { return new VDaily(alias, this); } + @Override + public VDaily as(Table alias) { + return new VDaily(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -127,6 +137,14 @@ public class VDaily extends TableImpl { return new VDaily(name, null); } + /** + * Rename this table + */ + @Override + public VDaily rename(Table name) { + return new VDaily(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -135,4 +153,19 @@ public class VDaily extends TableImpl { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java index 01a562f..d4ad192 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java @@ -9,13 +9,17 @@ import de.jottyfan.timetrack.db.done.tables.records.VDaylimitsRecord; import java.time.LocalDateTime; import java.time.OffsetDateTime; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -113,6 +117,11 @@ public class VDaylimits extends TableImpl { return new VDaylimits(alias, this); } + @Override + public VDaylimits as(Table alias) { + return new VDaylimits(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -129,6 +138,14 @@ public class VDaylimits extends TableImpl { return new VDaylimits(name, null); } + /** + * Rename this table + */ + @Override + public VDaylimits rename(Table name) { + return new VDaylimits(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -137,4 +154,19 @@ public class VDaylimits extends TableImpl { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java index 2f74a00..2dda502 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java @@ -9,13 +9,17 @@ import de.jottyfan.timetrack.db.done.tables.records.VDaysummaryRecord; import java.time.LocalDateTime; import java.time.OffsetDateTime; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function7; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row7; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -129,6 +133,11 @@ public class VDaysummary extends TableImpl { return new VDaysummary(alias, this); } + @Override + public VDaysummary as(Table alias) { + return new VDaysummary(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -145,6 +154,14 @@ public class VDaysummary extends TableImpl { return new VDaysummary(name, null); } + /** + * Rename this table + */ + @Override + public VDaysummary rename(Table name) { + return new VDaysummary(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row7 type methods // ------------------------------------------------------------------------- @@ -153,4 +170,19 @@ public class VDaysummary extends TableImpl { public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function7 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function7 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDone.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDone.java index c1d3ba8..9cff628 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDone.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDone.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDoneRecord; import java.time.LocalDateTime; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function8; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row8; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -132,6 +136,11 @@ public class VDone extends TableImpl { return new VDone(alias, this); } + @Override + public VDone as(Table alias) { + return new VDone(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -148,6 +157,14 @@ public class VDone extends TableImpl { return new VDone(name, null); } + /** + * Rename this table + */ + @Override + public VDone rename(Table name) { + return new VDone(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row8 type methods // ------------------------------------------------------------------------- @@ -156,4 +173,19 @@ public class VDone extends TableImpl { public Row8 fieldsRow() { return (Row8) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function8 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function8 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDuration.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDuration.java index 481887d..f858408 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VDuration.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VDuration.java @@ -7,12 +7,17 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDurationRecord; +import java.util.function.Function; + import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function7; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row7; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -126,6 +131,11 @@ public class VDuration extends TableImpl { return new VDuration(alias, this); } + @Override + public VDuration as(Table alias) { + return new VDuration(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -142,6 +152,14 @@ public class VDuration extends TableImpl { return new VDuration(name, null); } + /** + * Rename this table + */ + @Override + public VDuration rename(Table name) { + return new VDuration(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row7 type methods // ------------------------------------------------------------------------- @@ -150,4 +168,19 @@ public class VDuration extends TableImpl { public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function7 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function7 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java index 8349f7d..107f6f9 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VEucanshareRecord; import java.time.LocalDate; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function8; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row8; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -133,6 +137,11 @@ public class VEucanshare extends TableImpl { return new VEucanshare(alias, this); } + @Override + public VEucanshare as(Table alias) { + return new VEucanshare(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -149,6 +158,14 @@ public class VEucanshare extends TableImpl { return new VEucanshare(name, null); } + /** + * Rename this table + */ + @Override + public VEucanshare rename(Table name) { + return new VEucanshare(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row8 type methods // ------------------------------------------------------------------------- @@ -157,4 +174,19 @@ public class VEucanshare extends TableImpl { public Row8 fieldsRow() { return (Row8) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function8 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function8 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamster.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamster.java index 1d5d911..406f522 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamster.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamster.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VHamsterRecord; import java.time.LocalDate; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -123,6 +127,11 @@ public class VHamster extends TableImpl { return new VHamster(alias, this); } + @Override + public VHamster as(Table alias) { + return new VHamster(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -139,6 +148,14 @@ public class VHamster extends TableImpl { return new VHamster(name, null); } + /** + * Rename this table + */ + @Override + public VHamster rename(Table name) { + return new VHamster(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -147,4 +164,19 @@ public class VHamster extends TableImpl { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java index 5dcd242..5b99bf8 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VHamstersummaryRecord; import java.time.LocalDate; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -122,6 +126,11 @@ public class VHamstersummary extends TableImpl { return new VHamstersummary(alias, this); } + @Override + public VHamstersummary as(Table alias) { + return new VHamstersummary(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -138,6 +147,14 @@ public class VHamstersummary extends TableImpl { return new VHamstersummary(name, null); } + /** + * Rename this table + */ + @Override + public VHamstersummary rename(Table name) { + return new VHamstersummary(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -146,4 +163,19 @@ public class VHamstersummary extends TableImpl { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VJob.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VJob.java index 06d2467..24ae454 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VJob.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VJob.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VJobRecord; import java.math.BigDecimal; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -107,6 +111,11 @@ public class VJob extends TableImpl { return new VJob(alias, this); } + @Override + public VJob as(Table alias) { + return new VJob(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -123,6 +132,14 @@ public class VJob extends TableImpl { return new VJob(name, null); } + /** + * Rename this table + */ + @Override + public VJob rename(Table name) { + return new VJob(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -131,4 +148,19 @@ public class VJob extends TableImpl { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VModule.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VModule.java index b71bbee..665c43d 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VModule.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VModule.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VModuleRecord; import java.math.BigDecimal; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -107,6 +111,11 @@ public class VModule extends TableImpl { return new VModule(alias, this); } + @Override + public VModule as(Table alias) { + return new VModule(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -123,6 +132,14 @@ public class VModule extends TableImpl { return new VModule(name, null); } + /** + * Rename this table + */ + @Override + public VModule rename(Table name) { + return new VModule(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -131,4 +148,19 @@ public class VModule extends TableImpl { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VProject.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VProject.java index a13acd3..279a2e2 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VProject.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VProject.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VProjectRecord; import java.math.BigDecimal; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -107,6 +111,11 @@ public class VProject extends TableImpl { return new VProject(alias, this); } + @Override + public VProject as(Table alias) { + return new VProject(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -123,6 +132,14 @@ public class VProject extends TableImpl { return new VProject(name, null); } + /** + * Rename this table + */ + @Override + public VProject rename(Table name) { + return new VProject(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -131,4 +148,19 @@ public class VProject extends TableImpl { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java index 87368fa..c7a0490 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java @@ -7,12 +7,17 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VTasklistRecord; +import java.util.function.Function; + import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -120,6 +125,11 @@ public class VTasklist extends TableImpl { return new VTasklist(alias, this); } + @Override + public VTasklist as(Table alias) { + return new VTasklist(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -136,6 +146,14 @@ public class VTasklist extends TableImpl { return new VTasklist(name, null); } + /** + * Rename this table + */ + @Override + public VTasklist rename(Table name) { + return new VTasklist(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -144,4 +162,19 @@ public class VTasklist extends TableImpl { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java index 4194c49..30ac417 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java @@ -7,12 +7,17 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VTimelengthRecord; +import java.util.function.Function; + import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -111,6 +116,11 @@ public class VTimelength extends TableImpl { return new VTimelength(alias, this); } + @Override + public VTimelength as(Table alias) { + return new VTimelength(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -127,6 +137,14 @@ public class VTimelength extends TableImpl { return new VTimelength(name, null); } + /** + * Rename this table + */ + @Override + public VTimelength rename(Table name) { + return new VTimelength(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -135,4 +153,19 @@ public class VTimelength extends TableImpl { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java index be572b9..c6c9b61 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java @@ -7,12 +7,17 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VTotalofdayRecord; +import java.util.function.Function; + import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -120,6 +125,11 @@ public class VTotalofday extends TableImpl { return new VTotalofday(alias, this); } + @Override + public VTotalofday as(Table alias) { + return new VTotalofday(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -136,6 +146,14 @@ public class VTotalofday extends TableImpl { return new VTotalofday(name, null); } + /** + * Rename this table + */ + @Override + public VTotalofday rename(Table name) { + return new VTotalofday(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -144,4 +162,19 @@ public class VTotalofday extends TableImpl { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java index ba5ed26..729c1b0 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java @@ -7,12 +7,17 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VWorktimeRecord; +import java.util.function.Function; + import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function9; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row9; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -135,6 +140,11 @@ public class VWorktime extends TableImpl { return new VWorktime(alias, this); } + @Override + public VWorktime as(Table alias) { + return new VWorktime(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -151,6 +161,14 @@ public class VWorktime extends TableImpl { return new VWorktime(name, null); } + /** + * Rename this table + */ + @Override + public VWorktime rename(Table name) { + return new VWorktime(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row9 type methods // ------------------------------------------------------------------------- @@ -159,4 +177,19 @@ public class VWorktime extends TableImpl { public Row9 fieldsRow() { return (Row9) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function9 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function9 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TBillingRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TBillingRecord.java index 2f295a9..b989942 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TBillingRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TBillingRecord.java @@ -253,5 +253,6 @@ public class TBillingRecord extends UpdatableRecordImpl implemen setName(name); setShortcut(shortcut); setCsskey(csskey); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java index ef6cae7..c15e3e3 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java @@ -401,5 +401,6 @@ public class TDoneRecord extends UpdatableRecordImpl implements Rec setFkJob(fkJob); setFkLogin(fkLogin); setFkBilling(fkBilling); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java index d4faeac..51e1ddc 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java @@ -179,5 +179,6 @@ public class TJobRecord extends UpdatableRecordImpl implements Recor setLastchange(lastchange); setPk(pk); setName(name); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TModuleRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TModuleRecord.java index f88a04e..0276abb 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TModuleRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TModuleRecord.java @@ -179,5 +179,6 @@ public class TModuleRecord extends UpdatableRecordImpl implements setLastchange(lastchange); setPk(pk); setName(name); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java index 8bb5238..194b3be 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java @@ -179,5 +179,6 @@ public class TProjectRecord extends UpdatableRecordImpl implemen setLastchange(lastchange); setPk(pk); setName(name); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VBillingRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VBillingRecord.java index 85c8eb0..16d43fb 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VBillingRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VBillingRecord.java @@ -243,5 +243,6 @@ public class VBillingRecord extends TableRecordImpl implements R setShortcut(shortcut); setCsskey(csskey); setPercentUsage(percentUsage); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java index d95c898..4e14922 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java @@ -205,5 +205,6 @@ public class VDailyRecord extends TableRecordImpl implements Recor setDay(day); setLogin(login); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java index e8d9ab4..2da7579 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java @@ -207,5 +207,6 @@ public class VDaylimitsRecord extends TableRecordImpl implemen setWorkEnd(workEnd); setDay(day); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java index 0d78791..800c6ae 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java @@ -319,5 +319,6 @@ public class VDaysummaryRecord extends TableRecordImpl implem setDay(day); setLogin(login); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java index 04b8cb8..4888e4e 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java @@ -354,5 +354,6 @@ public class VDoneRecord extends TableRecordImpl implements Record8 setModuleName(moduleName); setJobName(jobName); setLogin(login); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java index a62ce90..787a439 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java @@ -316,5 +316,6 @@ public class VDurationRecord extends TableRecordImpl implements setJobName(jobName); setLogin(login); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java index edd2279..63a8692 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java @@ -355,5 +355,6 @@ public class VEucanshareRecord extends TableRecordImpl implem setJobName(jobName); setBillingName(billingName); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java index 4f0869f..f380fa1 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java @@ -281,5 +281,6 @@ public class VHamsterRecord extends TableRecordImpl implements R setModuleName(moduleName); setJobName(jobName); setLogin(login); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java index 6120c9b..fe4d533 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java @@ -280,5 +280,6 @@ public class VHamstersummaryRecord extends TableRecordImpl implements Record3 implements Rec setPk(pk); setName(name); setPercentUsage(percentUsage); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VProjectRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VProjectRecord.java index 1db81d4..d65c61b 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VProjectRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VProjectRecord.java @@ -169,5 +169,6 @@ public class VProjectRecord extends TableRecordImpl implements R setPk(pk); setName(name); setPercentUsage(percentUsage); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTasklistRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTasklistRecord.java index c63bffa..ada67be 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTasklistRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTasklistRecord.java @@ -278,5 +278,6 @@ public class VTasklistRecord extends TableRecordImpl implements setModuleName(moduleName); setJobName(jobName); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java index f9ef4c3..d4ee4bc 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java @@ -205,5 +205,6 @@ public class VTimelengthRecord extends TableRecordImpl implem setDuration(duration); setFkDone(fkDone); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java index 8f58736..27e5656 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java @@ -278,5 +278,6 @@ public class VTotalofdayRecord extends TableRecordImpl implem setEndtime(endtime); setDay(day); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java index 86b0201..d52721c 100644 --- a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java @@ -389,5 +389,6 @@ public class VWorktimeRecord extends TableRecordImpl implements setBillingShortcut(billingShortcut); setBillingCsskey(billingCsskey); setFkLogin(fkLogin); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java b/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java index 4fc2f8f..a354d03 100644 --- a/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java +++ b/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java @@ -58,4 +58,11 @@ public enum EnumCategory implements EnumType { public String getLiteral() { return literal; } + + /** + * Lookup a value of this EnumType by its literal + */ + public static EnumCategory lookupLiteral(String literal) { + return EnumType.lookupLiteral(EnumCategory.class, literal); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java b/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java index 5149106..512e18c 100644 --- a/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java +++ b/src/main/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java @@ -46,4 +46,11 @@ public enum EnumNotetype implements EnumType { public String getLiteral() { return literal; } + + /** + * Lookup a value of this EnumType by its literal + */ + public static EnumNotetype lookupLiteral(String literal) { + return EnumType.lookupLiteral(EnumNotetype.class, literal); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/note/tables/TNote.java b/src/main/java/de/jottyfan/timetrack/db/note/tables/TNote.java index 7346951..8e24901 100644 --- a/src/main/java/de/jottyfan/timetrack/db/note/tables/TNote.java +++ b/src/main/java/de/jottyfan/timetrack/db/note/tables/TNote.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.note.enums.EnumNotetype; import de.jottyfan.timetrack.db.note.tables.records.TNoteRecord; import java.time.LocalDateTime; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function6; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row6; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -77,7 +81,7 @@ public class TNote extends TableImpl { /** * The column note.t_note.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); private TNote(Name alias, Table aliased) { this(alias, aliased, null); @@ -137,6 +141,11 @@ public class TNote extends TableImpl { return new TNote(alias, this); } + @Override + public TNote as(Table alias) { + return new TNote(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -153,6 +162,14 @@ public class TNote extends TableImpl { return new TNote(name, null); } + /** + * Rename this table + */ + @Override + public TNote rename(Table name) { + return new TNote(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row6 type methods // ------------------------------------------------------------------------- @@ -161,4 +178,19 @@ public class TNote extends TableImpl { public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function6 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function6 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java b/src/main/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java index 7025d59..6a94b19 100644 --- a/src/main/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java @@ -292,5 +292,6 @@ public class TNoteRecord extends UpdatableRecordImpl implements Rec setNotetype(notetype); setContent(content); setLastchange(lastchange); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/Keys.java b/src/main/java/de/jottyfan/timetrack/db/profile/Keys.java index 8432206..071dad4 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/Keys.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/Keys.java @@ -6,9 +6,11 @@ package de.jottyfan.timetrack.db.profile; import de.jottyfan.timetrack.db.profile.tables.TLogin; import de.jottyfan.timetrack.db.profile.tables.TLoginrole; +import de.jottyfan.timetrack.db.profile.tables.TProfile; import de.jottyfan.timetrack.db.profile.tables.TRole; import de.jottyfan.timetrack.db.profile.tables.records.TLoginRecord; import de.jottyfan.timetrack.db.profile.tables.records.TLoginroleRecord; +import de.jottyfan.timetrack.db.profile.tables.records.TProfileRecord; import de.jottyfan.timetrack.db.profile.tables.records.TRoleRecord; import org.jooq.ForeignKey; @@ -33,6 +35,8 @@ public class Keys { public static final UniqueKey T_LOGIN_PKEY = Internal.createUniqueKey(TLogin.T_LOGIN, DSL.name("t_login_pkey"), new TableField[] { TLogin.T_LOGIN.PK }, true); public static final UniqueKey T_LOGINROLE_FK_LOGIN_FK_ROLE_KEY = Internal.createUniqueKey(TLoginrole.T_LOGINROLE, DSL.name("t_loginrole_fk_login_fk_role_key"), new TableField[] { TLoginrole.T_LOGINROLE.FK_LOGIN, TLoginrole.T_LOGINROLE.FK_ROLE }, true); public static final UniqueKey T_LOGINROLE_PKEY = Internal.createUniqueKey(TLoginrole.T_LOGINROLE, DSL.name("t_loginrole_pkey"), new TableField[] { TLoginrole.T_LOGINROLE.PK }, true); + public static final UniqueKey T_PROFILE_PKEY = Internal.createUniqueKey(TProfile.T_PROFILE, DSL.name("t_profile_pkey"), new TableField[] { TProfile.T_PROFILE.PK_PROFILE }, true); + public static final UniqueKey T_PROFILE_USERNAME_KEY = Internal.createUniqueKey(TProfile.T_PROFILE, DSL.name("t_profile_username_key"), new TableField[] { TProfile.T_PROFILE.USERNAME }, true); public static final UniqueKey T_ROLE_NAME_KEY = Internal.createUniqueKey(TRole.T_ROLE, DSL.name("t_role_name_key"), new TableField[] { TRole.T_ROLE.NAME }, true); public static final UniqueKey T_ROLE_PKEY = Internal.createUniqueKey(TRole.T_ROLE, DSL.name("t_role_pkey"), new TableField[] { TRole.T_ROLE.PK }, true); diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/Profile.java b/src/main/java/de/jottyfan/timetrack/db/profile/Profile.java index ddc5dff..dca4db1 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/Profile.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/Profile.java @@ -7,6 +7,7 @@ package de.jottyfan.timetrack.db.profile; import de.jottyfan.timetrack.db.DefaultCatalog; import de.jottyfan.timetrack.db.profile.tables.TLogin; import de.jottyfan.timetrack.db.profile.tables.TLoginrole; +import de.jottyfan.timetrack.db.profile.tables.TProfile; import de.jottyfan.timetrack.db.profile.tables.TRole; import de.jottyfan.timetrack.db.profile.tables.VLoginrole; @@ -41,6 +42,11 @@ public class Profile extends SchemaImpl { */ public final TLoginrole T_LOGINROLE = TLoginrole.T_LOGINROLE; + /** + * The table profile.t_profile. + */ + public final TProfile T_PROFILE = TProfile.T_PROFILE; + /** * The table profile.t_role. */ @@ -69,6 +75,7 @@ public class Profile extends SchemaImpl { return Arrays.asList( TLogin.T_LOGIN, TLoginrole.T_LOGINROLE, + TProfile.T_PROFILE, TRole.T_ROLE, VLoginrole.V_LOGINROLE ); diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/Tables.java b/src/main/java/de/jottyfan/timetrack/db/profile/Tables.java index 65898c0..cb61157 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/Tables.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/Tables.java @@ -6,6 +6,7 @@ package de.jottyfan.timetrack.db.profile; import de.jottyfan.timetrack.db.profile.tables.TLogin; import de.jottyfan.timetrack.db.profile.tables.TLoginrole; +import de.jottyfan.timetrack.db.profile.tables.TProfile; import de.jottyfan.timetrack.db.profile.tables.TRole; import de.jottyfan.timetrack.db.profile.tables.VLoginrole; @@ -26,6 +27,11 @@ public class Tables { */ public static final TLoginrole T_LOGINROLE = TLoginrole.T_LOGINROLE; + /** + * The table profile.t_profile. + */ + public static final TProfile T_PROFILE = TProfile.T_PROFILE; + /** * The table profile.t_role. */ diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java index d9e4f89..64a0cfe 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.profile.tables.records.TLoginRecord; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function7; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row7; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -52,7 +56,7 @@ public class TLogin extends TableImpl { /** * The column profile.t_login.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column profile.t_login.pk. @@ -147,6 +151,11 @@ public class TLogin extends TableImpl { return new TLogin(alias, this); } + @Override + public TLogin as(Table alias) { + return new TLogin(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -163,6 +172,14 @@ public class TLogin extends TableImpl { return new TLogin(name, null); } + /** + * Rename this table + */ + @Override + public TLogin rename(Table name) { + return new TLogin(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row7 type methods // ------------------------------------------------------------------------- @@ -171,4 +188,19 @@ public class TLogin extends TableImpl { public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function7 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function7 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java index e8cd297..86981ff 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.profile.tables.records.TLoginroleRecord; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function4; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row4; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -52,7 +56,7 @@ public class TLoginrole extends TableImpl { /** * The column profile.t_loginrole.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column profile.t_loginrole.pk. @@ -130,6 +134,9 @@ public class TLoginrole extends TableImpl { private transient TLogin _tLogin; private transient TRole _tRole; + /** + * Get the implicit join path to the profile.t_login table. + */ public TLogin tLogin() { if (_tLogin == null) _tLogin = new TLogin(this, Keys.T_LOGINROLE__T_LOGINROLE_FK_LOGIN_FKEY); @@ -137,6 +144,9 @@ public class TLoginrole extends TableImpl { return _tLogin; } + /** + * Get the implicit join path to the profile.t_role table. + */ public TRole tRole() { if (_tRole == null) _tRole = new TRole(this, Keys.T_LOGINROLE__T_LOGINROLE_FK_ROLE_FKEY); @@ -154,6 +164,11 @@ public class TLoginrole extends TableImpl { return new TLoginrole(alias, this); } + @Override + public TLoginrole as(Table alias) { + return new TLoginrole(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -170,6 +185,14 @@ public class TLoginrole extends TableImpl { return new TLoginrole(name, null); } + /** + * Rename this table + */ + @Override + public TLoginrole rename(Table name) { + return new TLoginrole(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row4 type methods // ------------------------------------------------------------------------- @@ -178,4 +201,19 @@ public class TLoginrole extends TableImpl { public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/TProfile.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TProfile.java new file mode 100644 index 0000000..4e37732 --- /dev/null +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TProfile.java @@ -0,0 +1,191 @@ +/* + * This file is generated by jOOQ. + */ +package de.jottyfan.timetrack.db.profile.tables; + + +import de.jottyfan.timetrack.db.profile.Keys; +import de.jottyfan.timetrack.db.profile.Profile; +import de.jottyfan.timetrack.db.profile.tables.records.TProfileRecord; + +import java.time.LocalDateTime; +import java.util.Arrays; +import java.util.List; +import java.util.function.Function; + +import org.jooq.Field; +import org.jooq.ForeignKey; +import org.jooq.Function4; +import org.jooq.Identity; +import org.jooq.Name; +import org.jooq.Record; +import org.jooq.Records; +import org.jooq.Row4; +import org.jooq.Schema; +import org.jooq.SelectField; +import org.jooq.Table; +import org.jooq.TableField; +import org.jooq.TableOptions; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; +import org.jooq.impl.TableImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TProfile extends TableImpl { + + private static final long serialVersionUID = 1L; + + /** + * The reference instance of profile.t_profile + */ + public static final TProfile T_PROFILE = new TProfile(); + + /** + * The class holding records for this type + */ + @Override + public Class getRecordType() { + return TProfileRecord.class; + } + + /** + * The column profile.t_profile.lastchange. + */ + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); + + /** + * The column profile.t_profile.pk_profile. + */ + public final TableField PK_PROFILE = createField(DSL.name("pk_profile"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); + + /** + * The column profile.t_profile.username. + */ + public final TableField USERNAME = createField(DSL.name("username"), SQLDataType.CLOB.nullable(false), this, ""); + + /** + * The column profile.t_profile.theme. + */ + public final TableField THEME = createField(DSL.name("theme"), SQLDataType.CLOB.nullable(false).defaultValue(DSL.field(DSL.raw("'light'::text"), SQLDataType.CLOB)), this, ""); + + private TProfile(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TProfile(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); + } + + /** + * Create an aliased profile.t_profile table reference + */ + public TProfile(String alias) { + this(DSL.name(alias), T_PROFILE); + } + + /** + * Create an aliased profile.t_profile table reference + */ + public TProfile(Name alias) { + this(alias, T_PROFILE); + } + + /** + * Create a profile.t_profile table reference + */ + public TProfile() { + this(DSL.name("t_profile"), null); + } + + public TProfile(Table child, ForeignKey key) { + super(child, key, T_PROFILE); + } + + @Override + public Schema getSchema() { + return aliased() ? null : Profile.PROFILE; + } + + @Override + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_PROFILE_PKEY; + } + + @Override + public List> getUniqueKeys() { + return Arrays.asList(Keys.T_PROFILE_USERNAME_KEY); + } + + @Override + public TProfile as(String alias) { + return new TProfile(DSL.name(alias), this); + } + + @Override + public TProfile as(Name alias) { + return new TProfile(alias, this); + } + + @Override + public TProfile as(Table alias) { + return new TProfile(alias.getQualifiedName(), this); + } + + /** + * Rename this table + */ + @Override + public TProfile rename(String name) { + return new TProfile(DSL.name(name), null); + } + + /** + * Rename this table + */ + @Override + public TProfile rename(Name name) { + return new TProfile(name, null); + } + + /** + * Rename this table + */ + @Override + public TProfile rename(Table name) { + return new TProfile(name.getQualifiedName(), null); + } + + // ------------------------------------------------------------------------- + // Row4 type methods + // ------------------------------------------------------------------------- + + @Override + public Row4 fieldsRow() { + return (Row4) super.fieldsRow(); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function4 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function4 from) { + return convertFrom(toType, Records.mapping(from)); + } +} diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/TRole.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TRole.java index ac66a09..4a947eb 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/TRole.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/TRole.java @@ -11,14 +11,18 @@ import de.jottyfan.timetrack.db.profile.tables.records.TRoleRecord; import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function3; import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row3; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -52,7 +56,7 @@ public class TRole extends TableImpl { /** * The column profile.t_role.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, ""); /** * The column profile.t_role.pk. @@ -127,6 +131,11 @@ public class TRole extends TableImpl { return new TRole(alias, this); } + @Override + public TRole as(Table alias) { + return new TRole(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -143,6 +152,14 @@ public class TRole extends TableImpl { return new TRole(name, null); } + /** + * Rename this table + */ + @Override + public TRole rename(Table name) { + return new TRole(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row3 type methods // ------------------------------------------------------------------------- @@ -151,4 +168,19 @@ public class TRole extends TableImpl { public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function3 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function3 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java index 150e1e8..c51f9b6 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java @@ -8,13 +8,17 @@ import de.jottyfan.timetrack.db.profile.Profile; import de.jottyfan.timetrack.db.profile.tables.records.VLoginroleRecord; import java.time.LocalDateTime; +import java.util.function.Function; import org.jooq.Field; import org.jooq.ForeignKey; +import org.jooq.Function5; import org.jooq.Name; import org.jooq.Record; +import org.jooq.Records; import org.jooq.Row5; import org.jooq.Schema; +import org.jooq.SelectField; import org.jooq.Table; import org.jooq.TableField; import org.jooq.TableOptions; @@ -117,6 +121,11 @@ public class VLoginrole extends TableImpl { return new VLoginrole(alias, this); } + @Override + public VLoginrole as(Table alias) { + return new VLoginrole(alias.getQualifiedName(), this); + } + /** * Rename this table */ @@ -133,6 +142,14 @@ public class VLoginrole extends TableImpl { return new VLoginrole(name, null); } + /** + * Rename this table + */ + @Override + public VLoginrole rename(Table name) { + return new VLoginrole(name.getQualifiedName(), null); + } + // ------------------------------------------------------------------------- // Row5 type methods // ------------------------------------------------------------------------- @@ -141,4 +158,19 @@ public class VLoginrole extends TableImpl { public Row5 fieldsRow() { return (Row5) super.fieldsRow(); } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Function)}. + */ + public SelectField mapping(Function5 from) { + return convertFrom(Records.mapping(from)); + } + + /** + * Convenience mapping calling {@link SelectField#convertFrom(Class, + * Function)}. + */ + public SelectField mapping(Class toType, Function5 from) { + return convertFrom(toType, Records.mapping(from)); + } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java index fc223ab..e8cca2d 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java @@ -327,5 +327,6 @@ public class TLoginRecord extends UpdatableRecordImpl implements R setSurname(surname); setDuedate(duedate); setPassword(password); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java index a690d68..bd80f34 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java @@ -216,5 +216,6 @@ public class TLoginroleRecord extends UpdatableRecordImpl impl setPk(pk); setFkLogin(fkLogin); setFkRole(fkRole); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TProfileRecord.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TProfileRecord.java new file mode 100644 index 0000000..05d55c7 --- /dev/null +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TProfileRecord.java @@ -0,0 +1,221 @@ +/* + * This file is generated by jOOQ. + */ +package de.jottyfan.timetrack.db.profile.tables.records; + + +import de.jottyfan.timetrack.db.profile.tables.TProfile; + +import java.time.LocalDateTime; + +import org.jooq.Field; +import org.jooq.Record1; +import org.jooq.Record4; +import org.jooq.Row4; +import org.jooq.impl.UpdatableRecordImpl; + + +/** + * This class is generated by jOOQ. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class TProfileRecord extends UpdatableRecordImpl implements Record4 { + + private static final long serialVersionUID = 1L; + + /** + * Setter for profile.t_profile.lastchange. + */ + public void setLastchange(LocalDateTime value) { + set(0, value); + } + + /** + * Getter for profile.t_profile.lastchange. + */ + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); + } + + /** + * Setter for profile.t_profile.pk_profile. + */ + public void setPkProfile(Integer value) { + set(1, value); + } + + /** + * Getter for profile.t_profile.pk_profile. + */ + public Integer getPkProfile() { + return (Integer) get(1); + } + + /** + * Setter for profile.t_profile.username. + */ + public void setUsername(String value) { + set(2, value); + } + + /** + * Getter for profile.t_profile.username. + */ + public String getUsername() { + return (String) get(2); + } + + /** + * Setter for profile.t_profile.theme. + */ + public void setTheme(String value) { + set(3, value); + } + + /** + * Getter for profile.t_profile.theme. + */ + public String getTheme() { + return (String) get(3); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + + // ------------------------------------------------------------------------- + // Record4 type implementation + // ------------------------------------------------------------------------- + + @Override + public Row4 fieldsRow() { + return (Row4) super.fieldsRow(); + } + + @Override + public Row4 valuesRow() { + return (Row4) super.valuesRow(); + } + + @Override + public Field field1() { + return TProfile.T_PROFILE.LASTCHANGE; + } + + @Override + public Field field2() { + return TProfile.T_PROFILE.PK_PROFILE; + } + + @Override + public Field field3() { + return TProfile.T_PROFILE.USERNAME; + } + + @Override + public Field field4() { + return TProfile.T_PROFILE.THEME; + } + + @Override + public LocalDateTime component1() { + return getLastchange(); + } + + @Override + public Integer component2() { + return getPkProfile(); + } + + @Override + public String component3() { + return getUsername(); + } + + @Override + public String component4() { + return getTheme(); + } + + @Override + public LocalDateTime value1() { + return getLastchange(); + } + + @Override + public Integer value2() { + return getPkProfile(); + } + + @Override + public String value3() { + return getUsername(); + } + + @Override + public String value4() { + return getTheme(); + } + + @Override + public TProfileRecord value1(LocalDateTime value) { + setLastchange(value); + return this; + } + + @Override + public TProfileRecord value2(Integer value) { + setPkProfile(value); + return this; + } + + @Override + public TProfileRecord value3(String value) { + setUsername(value); + return this; + } + + @Override + public TProfileRecord value4(String value) { + setTheme(value); + return this; + } + + @Override + public TProfileRecord values(LocalDateTime value1, Integer value2, String value3, String value4) { + value1(value1); + value2(value2); + value3(value3); + value4(value4); + return this; + } + + // ------------------------------------------------------------------------- + // Constructors + // ------------------------------------------------------------------------- + + /** + * Create a detached TProfileRecord + */ + public TProfileRecord() { + super(TProfile.T_PROFILE); + } + + /** + * Create a detached, initialised TProfileRecord + */ + public TProfileRecord(LocalDateTime lastchange, Integer pkProfile, String username, String theme) { + super(TProfile.T_PROFILE); + + setLastchange(lastchange); + setPkProfile(pkProfile); + setUsername(username); + setTheme(theme); + resetChangedOnNotNull(); + } +} diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java index 95e6613..7bb5ba0 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java @@ -179,5 +179,6 @@ public class TRoleRecord extends UpdatableRecordImpl implements Rec setLastchange(lastchange); setPk(pk); setName(name); + resetChangedOnNotNull(); } } diff --git a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java index 50b8ac4..fe1360d 100644 --- a/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java +++ b/src/main/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java @@ -243,5 +243,6 @@ public class VLoginroleRecord extends TableRecordImpl implemen setSurname(surname); setDuedate(duedate); setRoleName(roleName); + resetChangedOnNotNull(); } }