From a2d01b41e31ac1b9381ddfa33179529a1edc91d7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?J=C3=B6rg=20Henke?= Date: Fri, 26 Feb 2021 17:33:18 +0100 Subject: [PATCH] library upgrades --- .classpath | 9 +- .settings/org.eclipse.wst.common.component | 7 +- build.gradle | 124 ++++--- .../jottyfan/timetrack/db/DefaultCatalog.java | 28 +- .../timetrack/db/contact/Contact.java | 20 +- .../timetrack/db/contact/Indexes.java | 42 --- .../jottyfan/timetrack/db/contact/Keys.java | 28 ++ .../jottyfan/timetrack/db/contact/Tables.java | 11 +- .../db/contact/enums/EnumContacttype.java | 11 +- .../timetrack/db/contact/tables/TContact.java | 64 ++-- .../tables/records/TContactRecord.java | 35 +- .../de/jottyfan/timetrack/db/done/Done.java | 50 +-- .../jottyfan/timetrack/db/done/Indexes.java | 57 --- .../de/jottyfan/timetrack/db/done/Keys.java | 52 +++ .../de/jottyfan/timetrack/db/done/Tables.java | 11 +- .../timetrack/db/done/tables/TDone.java | 98 +++-- .../timetrack/db/done/tables/TJob.java | 64 ++-- .../timetrack/db/done/tables/TModule.java | 64 ++-- .../timetrack/db/done/tables/TProject.java | 64 ++-- .../timetrack/db/done/tables/VDaily.java | 43 +-- .../timetrack/db/done/tables/VDaylimits.java | 47 +-- .../timetrack/db/done/tables/VDaysummary.java | 53 ++- .../timetrack/db/done/tables/VDone.java | 55 ++- .../timetrack/db/done/tables/VDuration.java | 49 ++- .../timetrack/db/done/tables/VEucanshare.java | 55 ++- .../timetrack/db/done/tables/VHamster.java | 51 ++- .../db/done/tables/VHamstersummary.java | 51 ++- .../timetrack/db/done/tables/VTasklist.java | 47 +-- .../timetrack/db/done/tables/VTimelength.java | 43 +-- .../timetrack/db/done/tables/VTotalofday.java | 47 +-- .../timetrack/db/done/tables/VWorktime.java | 51 ++- .../db/done/tables/records/TDoneRecord.java | 95 ++--- .../db/done/tables/records/TJobRecord.java | 55 +-- .../db/done/tables/records/TModuleRecord.java | 55 +-- .../done/tables/records/TProjectRecord.java | 55 +-- .../db/done/tables/records/VDailyRecord.java | 19 +- .../done/tables/records/VDaylimitsRecord.java | 45 +-- .../tables/records/VDaysummaryRecord.java | 51 ++- .../db/done/tables/records/VDoneRecord.java | 67 ++-- .../done/tables/records/VDurationRecord.java | 25 +- .../tables/records/VEucanshareRecord.java | 53 ++- .../done/tables/records/VHamsterRecord.java | 49 +-- .../tables/records/VHamstersummaryRecord.java | 49 +-- .../done/tables/records/VTasklistRecord.java | 23 +- .../tables/records/VTimelengthRecord.java | 19 +- .../tables/records/VTotalofdayRecord.java | 23 +- .../done/tables/records/VWorktimeRecord.java | 27 +- .../jottyfan/timetrack/db/note/Indexes.java | 42 --- .../de/jottyfan/timetrack/db/note/Keys.java | 28 ++ .../de/jottyfan/timetrack/db/note/Note.java | 20 +- .../de/jottyfan/timetrack/db/note/Tables.java | 11 +- .../timetrack/db/note/enums/EnumCategory.java | 11 +- .../timetrack/db/note/enums/EnumNotetype.java | 11 +- .../timetrack/db/note/tables/TNote.java | 70 ++-- .../db/note/tables/records/TNoteRecord.java | 61 +-- .../timetrack/db/profile/Indexes.java | 54 --- .../jottyfan/timetrack/db/profile/Keys.java | 45 +++ .../timetrack/db/profile/Profile.java | 26 +- .../jottyfan/timetrack/db/profile/Tables.java | 11 +- .../timetrack/db/profile/tables/TLogin.java | 72 ++-- .../db/profile/tables/TLoginrole.java | 79 ++-- .../timetrack/db/profile/tables/TRole.java | 64 ++-- .../db/profile/tables/VLoginrole.java | 49 ++- .../profile/tables/records/TLoginRecord.java | 77 ++-- .../tables/records/TLoginroleRecord.java | 57 +-- .../profile/tables/records/TRoleRecord.java | 55 +-- .../tables/records/VLoginroleRecord.java | 47 +-- .../jooqfaces/EJooqFacesApplicationScope.java | 50 +++ .../jooqfaces/EJooqFacesConnectionPool.java | 24 ++ .../de/jooqfaces/EJooqFacesSessionScope.java | 20 + .../java/de/jooqfaces/JooqFacesContext.java | 350 ++++++++++++++++++ .../de/jooqfaces/JooqFacesContextFactory.java | 26 ++ .../java/de/jooqfaces/JooqFacesException.java | 18 + .../java/de/jooqfaces/PoollessDataSource.java | 72 ++++ .../PropertiesDeploymentListener.java | 90 +++++ .../timetrack/modules/JooqGateway.java | 8 +- .../timetrack/modules/SessionControl.java | 2 +- .../timetrack/modules/SessionGateway.java | 8 +- .../timetrack/modules/SessionModel.java | 2 +- .../modules/contact/ContactControl.java | 2 +- .../modules/contact/ContactGateway.java | 14 +- .../modules/contact/ContactModel.java | 2 +- .../timetrack/modules/done/DoneBean.java | 44 ++- .../timetrack/modules/done/DoneControl.java | 14 +- .../timetrack/modules/done/DoneGateway.java | 64 ++-- .../timetrack/modules/done/DoneModel.java | 2 +- .../timetrack/modules/note/NoteBean.java | 10 +- .../timetrack/modules/note/NoteControl.java | 2 +- .../timetrack/modules/note/NoteGateway.java | 12 +- .../timetrack/modules/note/NoteModel.java | 2 +- src/main/webapp/WEB-INF/faces-config.xml | 2 +- src/main/webapp/WEB-INF/web.xml | 2 +- src/main/webapp/pages/start.xhtml | 5 + .../timetrack/moduls/done/TestDoneBean.java | 20 +- 94 files changed, 2118 insertions(+), 1780 deletions(-) delete mode 100644 src/jooq/java/de/jottyfan/timetrack/db/contact/Indexes.java create mode 100644 src/jooq/java/de/jottyfan/timetrack/db/contact/Keys.java delete mode 100644 src/jooq/java/de/jottyfan/timetrack/db/done/Indexes.java create mode 100644 src/jooq/java/de/jottyfan/timetrack/db/done/Keys.java delete mode 100644 src/jooq/java/de/jottyfan/timetrack/db/note/Indexes.java create mode 100644 src/jooq/java/de/jottyfan/timetrack/db/note/Keys.java delete mode 100644 src/jooq/java/de/jottyfan/timetrack/db/profile/Indexes.java create mode 100644 src/jooq/java/de/jottyfan/timetrack/db/profile/Keys.java create mode 100644 src/main/java/de/jooqfaces/EJooqFacesApplicationScope.java create mode 100644 src/main/java/de/jooqfaces/EJooqFacesConnectionPool.java create mode 100644 src/main/java/de/jooqfaces/EJooqFacesSessionScope.java create mode 100644 src/main/java/de/jooqfaces/JooqFacesContext.java create mode 100644 src/main/java/de/jooqfaces/JooqFacesContextFactory.java create mode 100644 src/main/java/de/jooqfaces/JooqFacesException.java create mode 100644 src/main/java/de/jooqfaces/PoollessDataSource.java create mode 100644 src/main/java/de/jooqfaces/PropertiesDeploymentListener.java diff --git a/.classpath b/.classpath index 194ebe5..c52a066 100644 --- a/.classpath +++ b/.classpath @@ -6,13 +6,7 @@ - - - - - - - + @@ -37,5 +31,6 @@ + diff --git a/.settings/org.eclipse.wst.common.component b/.settings/org.eclipse.wst.common.component index f2b9a59..a9bc648 100644 --- a/.settings/org.eclipse.wst.common.component +++ b/.settings/org.eclipse.wst.common.component @@ -8,14 +8,9 @@ - - - - - - + diff --git a/build.gradle b/build.gradle index ab221b9..11a5bd2 100644 --- a/build.gradle +++ b/build.gradle @@ -7,22 +7,25 @@ buildscript { jcenter() } dependencies { - classpath 'com.google.code.gson:gson:2.8.5' - classpath 'org.jooq:jooq-codegen:3.12.1' - classpath 'org.postgresql:postgresql:42.2.6' + classpath 'com.google.code.gson:gson:2.8.6' + classpath 'org.jooq:jooq-codegen:3.14.4' + classpath 'org.postgresql:postgresql:42.2.19' classpath 'org.jfrog.buildinfo:build-info-extractor-gradle:latest.release' - classpath 'nu.studer:gradle-jooq-plugin:3.0.3' + classpath 'nu.studer.jooq:nu.studer.jooq.gradle.plugin:5.2' } } +plugins { + id 'nu.studer.jooq' version '5.2' +} + apply plugin: 'java' apply plugin: 'maven' apply plugin: 'war' apply plugin: 'eclipse' -apply plugin: 'nu.studer.jooq' group = 'jottyfan' -version = '1.1.3' +version = '1.1.4' description = """timetrack""" @@ -43,65 +46,70 @@ repositories { dependencies { compile 'org.jboss.weld.servlet:weld-servlet:2.4.8.Final' - compile 'org.apache.myfaces.core:myfaces-api:2.3.4' - compile 'org.apache.myfaces.core:myfaces-impl:2.3.4' - compile 'net.bootsfaces:bootsfaces:1.4.2' - compile 'de.jooqFaces:jooqFaces:0.4.6' - compile 'org.postgresql:postgresql:42.2.6' - compile 'org.jooq:jooq:3.12.1' - compile 'org.jooq:jooq-codegen:3.12.1' - compile 'com.google.code.gson:gson:2.8.5' + compile 'org.apache.myfaces.core:myfaces-api:2.3.8' + compile 'org.apache.myfaces.core:myfaces-impl:2.3.8' + compile 'net.bootsfaces:bootsfaces:1.5.0' + compile 'org.postgresql:postgresql:42.2.19' + compile 'org.jooq:jooq:3.14.4' + compile 'org.jooq:jooq-codegen:3.14.4' + compile 'com.google.code.gson:gson:2.8.6' compile 'org.jasypt:jasypt:1.9.3' compile 'javax.servlet:javax.servlet-api:4.0.1' - compile 'org.apache.logging.log4j:log4j-core:2.12.1' - compile 'org.apache.logging.log4j:log4j-api:2.12.1' + compile 'org.apache.logging.log4j:log4j-core:2.14.0' + compile 'org.apache.logging.log4j:log4j-api:2.14.0' - testCompile 'org.junit.jupiter:junit-jupiter-api:5.5.2' - testCompile 'org.junit.jupiter:junit-jupiter-engine:5.5.2' + testCompile 'org.junit.jupiter:junit-jupiter-api:5.8.0-M1' + testCompile 'org.junit.jupiter:junit-jupiter-engine:5.8.0-M1' - runtime 'org.postgresql:postgresql:42.2.6' + runtime 'org.postgresql:postgresql:42.2.19' - jooqRuntime 'org.postgresql:postgresql:42.2.6' + jooqGenerator 'org.postgresql:postgresql:42.2.19' } jooq { - edition = 'OSS' - version = '3.12.1' - timetrack (sourceSets.main) { - jdbc { - driver = 'org.postgresql.Driver' - url = 'jdbc:postgresql://localhost:5432/timetrack' - user = "jooq" - password = "" - } - generator { - name = 'org.jooq.codegen.DefaultGenerator' - database { - name = 'org.jooq.meta.postgres.PostgresDatabase' - schemata { - schema { - inputSchema = 'done' - } - schema { - inputSchema = 'profile' - } - schema { - inputSchema = 'contact' - } - schema { - inputSchema = 'note' - } - } - includes = '.*' - } - generate { - relations = true - records = true - } - target { - packageName = 'de.jottyfan.timetrack.db' - directory = 'src/jooq/java' - } + edition = nu.studer.gradle.jooq.JooqEdition.OSS + version = '3.14.4' + configurations { + timetrack { + generateSchemaSourceOnCompilation = false + generationTool { + logging = org.jooq.meta.jaxb.Logging.WARN + jdbc { + driver = 'org.postgresql.Driver' + url = 'jdbc:postgresql://localhost:5432/timetrack' + user = dbUsername + password = dbPassword + } + generator { + name = 'org.jooq.codegen.DefaultGenerator' + database { + name = 'org.jooq.meta.postgres.PostgresDatabase' + schemata { + schema { + inputSchema = 'done' + } + schema { + inputSchema = 'profile' + } + schema { + inputSchema = 'contact' + } + schema { + inputSchema = 'note' + } + } + includes = '.*' + } + generate { + relations = true + records = true + } + target { + packageName = 'de.jottyfan.timetrack.db' + directory = 'src/jooq/java' + } + } + } } } } @@ -113,6 +121,6 @@ war { } } // removes the task dependency from compileJava to generateTimetrackJooqSchemaSource -project.tasks.getByName('compileJava').dependsOn -= 'generateTimetrackJooqSchemaSource' +project.tasks.getByName('compileJava').dependsOn -= 'generateTimetrackJooq' diff --git a/src/jooq/java/de/jottyfan/timetrack/db/DefaultCatalog.java b/src/jooq/java/de/jottyfan/timetrack/db/DefaultCatalog.java index a179fee..74b7445 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/DefaultCatalog.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/DefaultCatalog.java @@ -9,12 +9,9 @@ import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.note.Note; import de.jottyfan.timetrack.db.profile.Profile; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Schema; import org.jooq.impl.CatalogImpl; @@ -22,42 +19,35 @@ import org.jooq.impl.CatalogImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class DefaultCatalog extends CatalogImpl { - private static final long serialVersionUID = 1609733166; + private static final long serialVersionUID = 1L; /** - * The reference instance of + * The reference instance of DEFAULT_CATALOG */ public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog(); /** * The schema contact. */ - public final Contact CONTACT = de.jottyfan.timetrack.db.contact.Contact.CONTACT; + public final Contact CONTACT = Contact.CONTACT; /** * The schema done. */ - public final Done DONE = de.jottyfan.timetrack.db.done.Done.DONE; + public final Done DONE = Done.DONE; /** * The schema note. */ - public final Note NOTE = de.jottyfan.timetrack.db.note.Note.NOTE; + public final Note NOTE = Note.NOTE; /** * The schema profile. */ - public final Profile PROFILE = de.jottyfan.timetrack.db.profile.Profile.PROFILE; + public final Profile PROFILE = Profile.PROFILE; /** * No further instances allowed @@ -68,12 +58,6 @@ public class DefaultCatalog extends CatalogImpl { @Override public final List getSchemas() { - List result = new ArrayList(); - result.addAll(getSchemas0()); - return result; - } - - private final List getSchemas0() { return Arrays.asList( Contact.CONTACT, Done.DONE, diff --git a/src/jooq/java/de/jottyfan/timetrack/db/contact/Contact.java b/src/jooq/java/de/jottyfan/timetrack/db/contact/Contact.java index fbbc824..a986ddc 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/contact/Contact.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/contact/Contact.java @@ -7,12 +7,9 @@ package de.jottyfan.timetrack.db.contact; import de.jottyfan.timetrack.db.DefaultCatalog; import de.jottyfan.timetrack.db.contact.tables.TContact; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Catalog; import org.jooq.Table; import org.jooq.impl.SchemaImpl; @@ -21,17 +18,10 @@ import org.jooq.impl.SchemaImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Contact extends SchemaImpl { - private static final long serialVersionUID = -253386273; + private static final long serialVersionUID = 1L; /** * The reference instance of contact @@ -41,7 +31,7 @@ public class Contact extends SchemaImpl { /** * The table contact.t_contact. */ - public final TContact T_CONTACT = de.jottyfan.timetrack.db.contact.tables.TContact.T_CONTACT; + public final TContact T_CONTACT = TContact.T_CONTACT; /** * No further instances allowed @@ -58,12 +48,6 @@ public class Contact extends SchemaImpl { @Override public final List> getTables() { - List result = new ArrayList(); - result.addAll(getTables0()); - return result; - } - - private final List> getTables0() { return Arrays.>asList( TContact.T_CONTACT); } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/contact/Indexes.java b/src/jooq/java/de/jottyfan/timetrack/db/contact/Indexes.java deleted file mode 100644 index 2c91112..0000000 --- a/src/jooq/java/de/jottyfan/timetrack/db/contact/Indexes.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package de.jottyfan.timetrack.db.contact; - - -import de.jottyfan.timetrack.db.contact.tables.TContact; - -import javax.annotation.processing.Generated; - -import org.jooq.Index; -import org.jooq.OrderField; -import org.jooq.impl.Internal; - - -/** - * A class modelling indexes of tables of the contact schema. - */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Indexes { - - // ------------------------------------------------------------------------- - // INDEX definitions - // ------------------------------------------------------------------------- - - public static final Index T_CONTACT_PKEY = Indexes0.T_CONTACT_PKEY; - - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- - - private static class Indexes0 { - public static Index T_CONTACT_PKEY = Internal.createIndex("t_contact_pkey", TContact.T_CONTACT, new OrderField[] { TContact.T_CONTACT.PK }, true); - } -} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/contact/Keys.java b/src/jooq/java/de/jottyfan/timetrack/db/contact/Keys.java new file mode 100644 index 0000000..ec1e6d4 --- /dev/null +++ b/src/jooq/java/de/jottyfan/timetrack/db/contact/Keys.java @@ -0,0 +1,28 @@ +/* + * This file is generated by jOOQ. + */ +package de.jottyfan.timetrack.db.contact; + + +import de.jottyfan.timetrack.db.contact.tables.TContact; +import de.jottyfan.timetrack.db.contact.tables.records.TContactRecord; + +import org.jooq.TableField; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.Internal; + + +/** + * A class modelling foreign key relationships and constraints of tables in + * contact. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Keys { + + // ------------------------------------------------------------------------- + // UNIQUE and PRIMARY KEY definitions + // ------------------------------------------------------------------------- + + public static final UniqueKey T_CONTACT_PKEY = Internal.createUniqueKey(TContact.T_CONTACT, DSL.name("t_contact_pkey"), new TableField[] { TContact.T_CONTACT.PK }, true); +} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/contact/Tables.java b/src/jooq/java/de/jottyfan/timetrack/db/contact/Tables.java index 36a7c61..3ab72fe 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/contact/Tables.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/contact/Tables.java @@ -6,19 +6,10 @@ package de.jottyfan.timetrack.db.contact; import de.jottyfan.timetrack.db.contact.tables.TContact; -import javax.annotation.processing.Generated; - /** - * Convenience access to all tables in contact + * Convenience access to all tables in contact. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java b/src/jooq/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java index 709086a..93bbf2f 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/contact/enums/EnumContacttype.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.contact.enums; import de.jottyfan.timetrack.db.contact.Contact; -import javax.annotation.processing.Generated; - import org.jooq.Catalog; import org.jooq.EnumType; import org.jooq.Schema; @@ -16,13 +14,6 @@ import org.jooq.Schema; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public enum EnumContacttype implements EnumType { @@ -44,7 +35,7 @@ public enum EnumContacttype implements EnumType { @Override public Catalog getCatalog() { - return getSchema() == null ? null : getSchema().getCatalog(); + return getSchema().getCatalog(); } @Override diff --git a/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/TContact.java b/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/TContact.java index a1444cb..00ec6a6 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/TContact.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/TContact.java @@ -5,42 +5,36 @@ package de.jottyfan.timetrack.db.contact.tables; import de.jottyfan.timetrack.db.contact.Contact; -import de.jottyfan.timetrack.db.contact.Indexes; +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.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row5; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TContact extends TableImpl { - private static final long serialVersionUID = 1122078543; + private static final long serialVersionUID = 1L; /** * The reference instance of contact.t_contact @@ -58,33 +52,34 @@ public class TContact extends TableImpl { /** * The column contact.t_contact.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column contact.t_contact.forename. */ - public final TableField FORENAME = createField(DSL.name("forename"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField FORENAME = createField(DSL.name("forename"), SQLDataType.CLOB.nullable(false), this, ""); /** * The column contact.t_contact.surname. */ - public final TableField SURNAME = createField(DSL.name("surname"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField SURNAME = createField(DSL.name("surname"), SQLDataType.CLOB.nullable(false), this, ""); /** * The column contact.t_contact.contact. */ - public final TableField CONTACT = createField(DSL.name("contact"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField CONTACT = createField(DSL.name("contact"), SQLDataType.CLOB.nullable(false), this, ""); /** * The column contact.t_contact.type. */ - public final TableField TYPE = createField(DSL.name("type"), org.jooq.impl.SQLDataType.VARCHAR.nullable(false).asEnumDataType(de.jottyfan.timetrack.db.contact.enums.EnumContacttype.class), this, ""); + public final TableField TYPE = createField(DSL.name("type"), SQLDataType.VARCHAR.nullable(false).asEnumDataType(de.jottyfan.timetrack.db.contact.enums.EnumContacttype.class), this, ""); - /** - * Create a contact.t_contact table reference - */ - public TContact() { - this(DSL.name("t_contact"), null); + private TContact(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TContact(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -101,12 +96,11 @@ public class TContact extends TableImpl { this(alias, T_CONTACT); } - private TContact(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TContact(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a contact.t_contact table reference + */ + public TContact() { + this(DSL.name("t_contact"), null); } public TContact(Table child, ForeignKey key) { @@ -119,8 +113,18 @@ public class TContact extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_CONTACT_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_CONTACT_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_CONTACT_PKEY); } @Override diff --git a/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java index 75f950f..7a5440d 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/contact/tables/records/TContactRecord.java @@ -7,28 +7,20 @@ package de.jottyfan.timetrack.db.contact.tables.records; import de.jottyfan.timetrack.db.contact.enums.EnumContacttype; import de.jottyfan.timetrack.db.contact.tables.TContact; -import javax.annotation.processing.Generated; - import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record5; import org.jooq.Row5; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TContactRecord extends TableRecordImpl implements Record5 { +public class TContactRecord extends UpdatableRecordImpl implements Record5 { - private static final long serialVersionUID = 1184347110; + private static final long serialVersionUID = 1L; /** * Setter for contact.t_contact.pk. @@ -100,6 +92,15 @@ public class TContactRecord extends TableRecordImpl implements R return (EnumContacttype) get(4); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record5 type implementation // ------------------------------------------------------------------------- @@ -246,10 +247,10 @@ public class TContactRecord extends TableRecordImpl implements R public TContactRecord(Integer pk, String forename, String surname, String contact, EnumContacttype type) { super(TContact.T_CONTACT); - set(0, pk); - set(1, forename); - set(2, surname); - set(3, contact); - set(4, type); + setPk(pk); + setForename(forename); + setSurname(surname); + setContact(contact); + setType(type); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/Done.java b/src/jooq/java/de/jottyfan/timetrack/db/done/Done.java index 535c134..99f0429 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/Done.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/Done.java @@ -22,12 +22,9 @@ import de.jottyfan.timetrack.db.done.tables.VTimelength; import de.jottyfan.timetrack.db.done.tables.VTotalofday; import de.jottyfan.timetrack.db.done.tables.VWorktime; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Catalog; import org.jooq.Table; import org.jooq.impl.SchemaImpl; @@ -36,17 +33,10 @@ import org.jooq.impl.SchemaImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Done extends SchemaImpl { - private static final long serialVersionUID = -1147316456; + private static final long serialVersionUID = 1L; /** * The reference instance of done @@ -56,82 +46,82 @@ public class Done extends SchemaImpl { /** * The table done.t_done. */ - public final TDone T_DONE = de.jottyfan.timetrack.db.done.tables.TDone.T_DONE; + public final TDone T_DONE = TDone.T_DONE; /** * The table done.t_job. */ - public final TJob T_JOB = de.jottyfan.timetrack.db.done.tables.TJob.T_JOB; + public final TJob T_JOB = TJob.T_JOB; /** * The table done.t_module. */ - public final TModule T_MODULE = de.jottyfan.timetrack.db.done.tables.TModule.T_MODULE; + public final TModule T_MODULE = TModule.T_MODULE; /** * The table done.t_project. */ - public final TProject T_PROJECT = de.jottyfan.timetrack.db.done.tables.TProject.T_PROJECT; + public final TProject T_PROJECT = TProject.T_PROJECT; /** * The table done.v_daily. */ - public final VDaily V_DAILY = de.jottyfan.timetrack.db.done.tables.VDaily.V_DAILY; + public final VDaily V_DAILY = VDaily.V_DAILY; /** * The table done.v_daylimits. */ - public final VDaylimits V_DAYLIMITS = de.jottyfan.timetrack.db.done.tables.VDaylimits.V_DAYLIMITS; + public final VDaylimits V_DAYLIMITS = VDaylimits.V_DAYLIMITS; /** * The table done.v_daysummary. */ - public final VDaysummary V_DAYSUMMARY = de.jottyfan.timetrack.db.done.tables.VDaysummary.V_DAYSUMMARY; + public final VDaysummary V_DAYSUMMARY = VDaysummary.V_DAYSUMMARY; /** * The table done.v_done. */ - public final VDone V_DONE = de.jottyfan.timetrack.db.done.tables.VDone.V_DONE; + public final VDone V_DONE = VDone.V_DONE; /** * The table done.v_duration. */ - public final VDuration V_DURATION = de.jottyfan.timetrack.db.done.tables.VDuration.V_DURATION; + public final VDuration V_DURATION = VDuration.V_DURATION; /** * The table done.v_eucanshare. */ - public final VEucanshare V_EUCANSHARE = de.jottyfan.timetrack.db.done.tables.VEucanshare.V_EUCANSHARE; + public final VEucanshare V_EUCANSHARE = VEucanshare.V_EUCANSHARE; /** * The table done.v_hamster. */ - public final VHamster V_HAMSTER = de.jottyfan.timetrack.db.done.tables.VHamster.V_HAMSTER; + public final VHamster V_HAMSTER = VHamster.V_HAMSTER; /** * The table done.v_hamstersummary. */ - public final VHamstersummary V_HAMSTERSUMMARY = de.jottyfan.timetrack.db.done.tables.VHamstersummary.V_HAMSTERSUMMARY; + public final VHamstersummary V_HAMSTERSUMMARY = VHamstersummary.V_HAMSTERSUMMARY; /** * The table done.v_tasklist. */ - public final VTasklist V_TASKLIST = de.jottyfan.timetrack.db.done.tables.VTasklist.V_TASKLIST; + public final VTasklist V_TASKLIST = VTasklist.V_TASKLIST; /** * The table done.v_timelength. */ - public final VTimelength V_TIMELENGTH = de.jottyfan.timetrack.db.done.tables.VTimelength.V_TIMELENGTH; + public final VTimelength V_TIMELENGTH = VTimelength.V_TIMELENGTH; /** * The table done.v_totalofday. */ - public final VTotalofday V_TOTALOFDAY = de.jottyfan.timetrack.db.done.tables.VTotalofday.V_TOTALOFDAY; + public final VTotalofday V_TOTALOFDAY = VTotalofday.V_TOTALOFDAY; /** * The table done.v_worktime. */ - public final VWorktime V_WORKTIME = de.jottyfan.timetrack.db.done.tables.VWorktime.V_WORKTIME; + public final VWorktime V_WORKTIME = VWorktime.V_WORKTIME; /** * No further instances allowed @@ -148,12 +138,6 @@ public class Done extends SchemaImpl { @Override public final List> getTables() { - List result = new ArrayList(); - result.addAll(getTables0()); - return result; - } - - private final List> getTables0() { return Arrays.>asList( TDone.T_DONE, TJob.T_JOB, diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/Indexes.java b/src/jooq/java/de/jottyfan/timetrack/db/done/Indexes.java deleted file mode 100644 index 9029e33..0000000 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/Indexes.java +++ /dev/null @@ -1,57 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package de.jottyfan.timetrack.db.done; - - -import de.jottyfan.timetrack.db.done.tables.TDone; -import de.jottyfan.timetrack.db.done.tables.TJob; -import de.jottyfan.timetrack.db.done.tables.TModule; -import de.jottyfan.timetrack.db.done.tables.TProject; - -import javax.annotation.processing.Generated; - -import org.jooq.Index; -import org.jooq.OrderField; -import org.jooq.impl.Internal; - - -/** - * A class modelling indexes of tables of the done schema. - */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Indexes { - - // ------------------------------------------------------------------------- - // INDEX definitions - // ------------------------------------------------------------------------- - - public static final Index T_DONE_PKEY = Indexes0.T_DONE_PKEY; - public static final Index T_CATEGORY_NAME_KEY = Indexes0.T_CATEGORY_NAME_KEY; - public static final Index T_CATEGORY_PKEY = Indexes0.T_CATEGORY_PKEY; - public static final Index T_JOB_NAME_KEY = Indexes0.T_JOB_NAME_KEY; - public static final Index T_JOB_PKEY = Indexes0.T_JOB_PKEY; - public static final Index T_PROJECT_NAME_KEY = Indexes0.T_PROJECT_NAME_KEY; - public static final Index T_PROJECT_PKEY = Indexes0.T_PROJECT_PKEY; - - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- - - private static class Indexes0 { - public static Index T_DONE_PKEY = Internal.createIndex("t_done_pkey", TDone.T_DONE, new OrderField[] { TDone.T_DONE.PK }, true); - public static Index T_CATEGORY_NAME_KEY = Internal.createIndex("t_category_name_key", TJob.T_JOB, new OrderField[] { TJob.T_JOB.NAME }, true); - public static Index T_CATEGORY_PKEY = Internal.createIndex("t_category_pkey", TJob.T_JOB, new OrderField[] { TJob.T_JOB.PK }, true); - public static Index T_JOB_NAME_KEY = Internal.createIndex("t_job_name_key", TModule.T_MODULE, new OrderField[] { TModule.T_MODULE.NAME }, true); - public static Index T_JOB_PKEY = Internal.createIndex("t_job_pkey", TModule.T_MODULE, new OrderField[] { TModule.T_MODULE.PK }, true); - public static Index T_PROJECT_NAME_KEY = Internal.createIndex("t_project_name_key", TProject.T_PROJECT, new OrderField[] { TProject.T_PROJECT.NAME }, true); - public static Index T_PROJECT_PKEY = Internal.createIndex("t_project_pkey", TProject.T_PROJECT, new OrderField[] { TProject.T_PROJECT.PK }, true); - } -} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/Keys.java b/src/jooq/java/de/jottyfan/timetrack/db/done/Keys.java new file mode 100644 index 0000000..9043af4 --- /dev/null +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/Keys.java @@ -0,0 +1,52 @@ +/* + * This file is generated by jOOQ. + */ +package de.jottyfan.timetrack.db.done; + + +import de.jottyfan.timetrack.db.done.tables.TDone; +import de.jottyfan.timetrack.db.done.tables.TJob; +import de.jottyfan.timetrack.db.done.tables.TModule; +import de.jottyfan.timetrack.db.done.tables.TProject; +import de.jottyfan.timetrack.db.done.tables.records.TDoneRecord; +import de.jottyfan.timetrack.db.done.tables.records.TJobRecord; +import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord; +import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord; +import de.jottyfan.timetrack.db.profile.tables.TLogin; +import de.jottyfan.timetrack.db.profile.tables.records.TLoginRecord; + +import org.jooq.ForeignKey; +import org.jooq.TableField; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.Internal; + + +/** + * A class modelling foreign key relationships and constraints of tables in + * done. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Keys { + + // ------------------------------------------------------------------------- + // UNIQUE and PRIMARY KEY definitions + // ------------------------------------------------------------------------- + + public static final UniqueKey T_DONE_PKEY = Internal.createUniqueKey(TDone.T_DONE, DSL.name("t_done_pkey"), new TableField[] { TDone.T_DONE.PK }, true); + public static final UniqueKey T_CATEGORY_NAME_KEY = Internal.createUniqueKey(TJob.T_JOB, DSL.name("t_category_name_key"), new TableField[] { TJob.T_JOB.NAME }, true); + public static final UniqueKey T_CATEGORY_PKEY = Internal.createUniqueKey(TJob.T_JOB, DSL.name("t_category_pkey"), new TableField[] { TJob.T_JOB.PK }, true); + public static final UniqueKey T_JOB_NAME_KEY = Internal.createUniqueKey(TModule.T_MODULE, DSL.name("t_job_name_key"), new TableField[] { TModule.T_MODULE.NAME }, true); + public static final UniqueKey T_JOB_PKEY = Internal.createUniqueKey(TModule.T_MODULE, DSL.name("t_job_pkey"), new TableField[] { TModule.T_MODULE.PK }, true); + public static final UniqueKey T_PROJECT_NAME_KEY = Internal.createUniqueKey(TProject.T_PROJECT, DSL.name("t_project_name_key"), new TableField[] { TProject.T_PROJECT.NAME }, true); + public static final UniqueKey T_PROJECT_PKEY = Internal.createUniqueKey(TProject.T_PROJECT, DSL.name("t_project_pkey"), new TableField[] { TProject.T_PROJECT.PK }, true); + + // ------------------------------------------------------------------------- + // FOREIGN KEY definitions + // ------------------------------------------------------------------------- + + public static final ForeignKey T_DONE__T_DONE_FK_CATEGORY_FKEY = Internal.createForeignKey(TDone.T_DONE, DSL.name("t_done_fk_category_fkey"), new TableField[] { TDone.T_DONE.FK_JOB }, Keys.T_CATEGORY_PKEY, new TableField[] { TJob.T_JOB.PK }, true); + public static final ForeignKey T_DONE__T_DONE_FK_JOB_FKEY = Internal.createForeignKey(TDone.T_DONE, DSL.name("t_done_fk_job_fkey"), new TableField[] { TDone.T_DONE.FK_MODULE }, Keys.T_JOB_PKEY, new TableField[] { TModule.T_MODULE.PK }, true); + public static final ForeignKey T_DONE__T_DONE_FK_LOGIN_FKEY = Internal.createForeignKey(TDone.T_DONE, DSL.name("t_done_fk_login_fkey"), new TableField[] { TDone.T_DONE.FK_LOGIN }, de.jottyfan.timetrack.db.profile.Keys.T_LOGIN_PKEY, new TableField[] { TLogin.T_LOGIN.PK }, true); + public static final ForeignKey T_DONE__T_DONE_FK_PROJECT_FKEY = Internal.createForeignKey(TDone.T_DONE, DSL.name("t_done_fk_project_fkey"), new TableField[] { TDone.T_DONE.FK_PROJECT }, Keys.T_PROJECT_PKEY, new TableField[] { TProject.T_PROJECT.PK }, true); +} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/Tables.java b/src/jooq/java/de/jottyfan/timetrack/db/done/Tables.java index 0eb523d..a48ec8b 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/Tables.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/Tables.java @@ -21,19 +21,10 @@ import de.jottyfan.timetrack.db.done.tables.VTimelength; import de.jottyfan.timetrack.db.done.tables.VTotalofday; import de.jottyfan.timetrack.db.done.tables.VWorktime; -import javax.annotation.processing.Generated; - /** - * Convenience access to all tables in done + * Convenience access to all tables in done. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TDone.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TDone.java index e95c895..5eeaa5e 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TDone.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TDone.java @@ -5,42 +5,37 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; -import de.jottyfan.timetrack.db.done.Indexes; +import de.jottyfan.timetrack.db.done.Keys; import de.jottyfan.timetrack.db.done.tables.records.TDoneRecord; +import de.jottyfan.timetrack.db.profile.tables.TLogin; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row9; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TDone extends TableImpl { - private static final long serialVersionUID = -1009395311; + private static final long serialVersionUID = 1L; /** * The reference instance of done.t_done @@ -58,53 +53,54 @@ public class TDone extends TableImpl { /** * The column done.t_done.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_done.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column done.t_done.time_from. */ - public final TableField TIME_FROM = createField(DSL.name("time_from"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField TIME_FROM = createField(DSL.name("time_from"), SQLDataType.LOCALDATETIME(6), this, ""); /** * The column done.t_done.time_until. */ - public final TableField TIME_UNTIL = createField(DSL.name("time_until"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField TIME_UNTIL = createField(DSL.name("time_until"), SQLDataType.LOCALDATETIME(6), this, ""); /** * The column done.t_done.fk_project. */ - public final TableField FK_PROJECT = createField(DSL.name("fk_project"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_PROJECT = createField(DSL.name("fk_project"), SQLDataType.INTEGER, this, ""); /** * The column done.t_done.fk_module. */ - public final TableField FK_MODULE = createField(DSL.name("fk_module"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_MODULE = createField(DSL.name("fk_module"), SQLDataType.INTEGER, this, ""); /** * The column done.t_done.fk_job. */ - public final TableField FK_JOB = createField(DSL.name("fk_job"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_JOB = createField(DSL.name("fk_job"), SQLDataType.INTEGER, this, ""); /** * The column done.t_done.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column done.t_done.wp. */ - public final TableField WP = createField(DSL.name("wp"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField WP = createField(DSL.name("wp"), SQLDataType.CLOB, this, ""); - /** - * Create a done.t_done table reference - */ - public TDone() { - this(DSL.name("t_done"), null); + private TDone(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TDone(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -121,12 +117,11 @@ public class TDone extends TableImpl { this(alias, T_DONE); } - private TDone(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TDone(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.t_done table reference + */ + public TDone() { + this(DSL.name("t_done"), null); } public TDone(Table child, ForeignKey key) { @@ -139,8 +134,39 @@ public class TDone extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_DONE_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_DONE_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_DONE_PKEY); + } + + @Override + public List> getReferences() { + return Arrays.>asList(Keys.T_DONE__T_DONE_FK_PROJECT_FKEY, Keys.T_DONE__T_DONE_FK_JOB_FKEY, Keys.T_DONE__T_DONE_FK_CATEGORY_FKEY, Keys.T_DONE__T_DONE_FK_LOGIN_FKEY); + } + + public TProject tProject() { + return new TProject(this, Keys.T_DONE__T_DONE_FK_PROJECT_FKEY); + } + + public TModule tModule() { + return new TModule(this, Keys.T_DONE__T_DONE_FK_JOB_FKEY); + } + + public TJob tJob() { + return new TJob(this, Keys.T_DONE__T_DONE_FK_CATEGORY_FKEY); + } + + public TLogin tLogin() { + return new TLogin(this, Keys.T_DONE__T_DONE_FK_LOGIN_FKEY); } @Override @@ -174,7 +200,7 @@ public class TDone extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row9 fieldsRow() { + public Row9 fieldsRow() { return (Row9) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TJob.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TJob.java index 0f4fab4..caec656 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TJob.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TJob.java @@ -5,42 +5,36 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; -import de.jottyfan.timetrack.db.done.Indexes; +import de.jottyfan.timetrack.db.done.Keys; import de.jottyfan.timetrack.db.done.tables.records.TJobRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TJob extends TableImpl { - private static final long serialVersionUID = 1198013806; + private static final long serialVersionUID = 1L; /** * The reference instance of done.t_job @@ -58,23 +52,24 @@ public class TJob extends TableImpl { /** * The column done.t_job.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_job.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column done.t_job.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.CLOB.nullable(false), this, ""); - /** - * Create a done.t_job table reference - */ - public TJob() { - this(DSL.name("t_job"), null); + private TJob(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TJob(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -91,12 +86,11 @@ public class TJob extends TableImpl { this(alias, T_JOB); } - private TJob(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TJob(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.t_job table reference + */ + public TJob() { + this(DSL.name("t_job"), null); } public TJob(Table child, ForeignKey key) { @@ -109,8 +103,18 @@ public class TJob extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_CATEGORY_NAME_KEY, Indexes.T_CATEGORY_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_CATEGORY_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_CATEGORY_PKEY, Keys.T_CATEGORY_NAME_KEY); } @Override @@ -144,7 +148,7 @@ public class TJob extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TModule.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TModule.java index 0ddda86..793ac1d 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TModule.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TModule.java @@ -5,42 +5,36 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; -import de.jottyfan.timetrack.db.done.Indexes; +import de.jottyfan.timetrack.db.done.Keys; import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TModule extends TableImpl { - private static final long serialVersionUID = 1195797689; + private static final long serialVersionUID = 1L; /** * The reference instance of done.t_module @@ -58,23 +52,24 @@ public class TModule extends TableImpl { /** * The column done.t_module.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_module.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column done.t_module.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.CLOB.nullable(false), this, ""); - /** - * Create a done.t_module table reference - */ - public TModule() { - this(DSL.name("t_module"), null); + private TModule(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TModule(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -91,12 +86,11 @@ public class TModule extends TableImpl { this(alias, T_MODULE); } - private TModule(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TModule(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.t_module table reference + */ + public TModule() { + this(DSL.name("t_module"), null); } public TModule(Table child, ForeignKey key) { @@ -109,8 +103,18 @@ public class TModule extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_JOB_NAME_KEY, Indexes.T_JOB_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_JOB_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_JOB_PKEY, Keys.T_JOB_NAME_KEY); } @Override @@ -144,7 +148,7 @@ public class TModule extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TProject.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TProject.java index 21b3994..907509d 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TProject.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/TProject.java @@ -5,42 +5,36 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; -import de.jottyfan.timetrack.db.done.Indexes; +import de.jottyfan.timetrack.db.done.Keys; import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TProject extends TableImpl { - private static final long serialVersionUID = 760221750; + private static final long serialVersionUID = 1L; /** * The reference instance of done.t_project @@ -58,23 +52,24 @@ public class TProject extends TableImpl { /** * The column done.t_project.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); /** * The column done.t_project.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column done.t_project.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.CLOB.nullable(false), this, ""); - /** - * Create a done.t_project table reference - */ - public TProject() { - this(DSL.name("t_project"), null); + private TProject(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TProject(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -91,12 +86,11 @@ public class TProject extends TableImpl { this(alias, T_PROJECT); } - private TProject(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TProject(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.t_project table reference + */ + public TProject() { + this(DSL.name("t_project"), null); } public TProject(Table child, ForeignKey key) { @@ -109,8 +103,18 @@ public class TProject extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_PROJECT_NAME_KEY, Indexes.T_PROJECT_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_PROJECT_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_PROJECT_PKEY, Keys.T_PROJECT_NAME_KEY); } @Override @@ -144,7 +148,7 @@ public class TProject extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaily.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaily.java index 1498f29..4cbee0c 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaily.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaily.java @@ -7,8 +7,6 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDailyRecord; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -17,7 +15,9 @@ import org.jooq.Row4; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.types.YearToSecond; @@ -25,17 +25,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VDaily extends TableImpl { - private static final long serialVersionUID = -310161174; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_daily @@ -53,28 +46,29 @@ public class VDaily extends TableImpl { /** * The column done.v_daily.worktime. */ - public final TableField WORKTIME = createField(DSL.name("worktime"), org.jooq.impl.SQLDataType.INTERVAL, this, ""); + public final TableField WORKTIME = createField(DSL.name("worktime"), SQLDataType.INTERVAL, this, ""); /** * The column done.v_daily.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_daily.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB, this, ""); /** * The column done.v_daily.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_daily table reference - */ - public VDaily() { - this(DSL.name("v_daily"), null); + private VDaily(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VDaily(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -91,12 +85,11 @@ public class VDaily extends TableImpl { this(alias, V_DAILY); } - private VDaily(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VDaily(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_daily table reference + */ + public VDaily() { + this(DSL.name("v_daily"), null); } public VDaily(Table child, ForeignKey key) { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java index b01f020..de46be2 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaylimits.java @@ -7,11 +7,9 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDaylimitsRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.time.OffsetDateTime; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -20,24 +18,19 @@ import org.jooq.Row4; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VDaylimits extends TableImpl { - private static final long serialVersionUID = -1022072072; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_daylimits @@ -55,28 +48,29 @@ public class VDaylimits extends TableImpl { /** * The column done.v_daylimits.work_start. */ - public final TableField WORK_START = createField(DSL.name("work_start"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField WORK_START = createField(DSL.name("work_start"), SQLDataType.LOCALDATETIME(6), this, ""); /** * The column done.v_daylimits.work_end. */ - public final TableField WORK_END = createField(DSL.name("work_end"), org.jooq.impl.SQLDataType.TIMESTAMPWITHTIMEZONE, this, ""); + public final TableField WORK_END = createField(DSL.name("work_end"), SQLDataType.TIMESTAMPWITHTIMEZONE(6), this, ""); /** * The column done.v_daylimits.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_daylimits.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_daylimits table reference - */ - public VDaylimits() { - this(DSL.name("v_daylimits"), null); + private VDaylimits(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VDaylimits(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -93,12 +87,11 @@ public class VDaylimits extends TableImpl { this(alias, V_DAYLIMITS); } - private VDaylimits(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VDaylimits(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_daylimits table reference + */ + public VDaylimits() { + this(DSL.name("v_daylimits"), null); } public VDaylimits(Table child, ForeignKey key) { @@ -141,7 +134,7 @@ public class VDaylimits extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java index 93440ca..a1f2469 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDaysummary.java @@ -7,11 +7,9 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDaysummaryRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.time.OffsetDateTime; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -20,7 +18,9 @@ import org.jooq.Row7; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.types.YearToSecond; @@ -28,17 +28,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VDaysummary extends TableImpl { - private static final long serialVersionUID = 1541117915; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_daysummary @@ -56,43 +49,44 @@ public class VDaysummary extends TableImpl { /** * The column done.v_daysummary.breaktime. */ - public final TableField BREAKTIME = createField(DSL.name("breaktime"), org.jooq.impl.SQLDataType.INTERVAL, this, ""); + public final TableField BREAKTIME = createField(DSL.name("breaktime"), SQLDataType.INTERVAL, this, ""); /** * The column done.v_daysummary.worktime. */ - public final TableField WORKTIME = createField(DSL.name("worktime"), org.jooq.impl.SQLDataType.INTERVAL, this, ""); + public final TableField WORKTIME = createField(DSL.name("worktime"), SQLDataType.INTERVAL, this, ""); /** * The column done.v_daysummary.work_start. */ - public final TableField WORK_START = createField(DSL.name("work_start"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField WORK_START = createField(DSL.name("work_start"), SQLDataType.LOCALDATETIME(6), this, ""); /** * The column done.v_daysummary.work_end. */ - public final TableField WORK_END = createField(DSL.name("work_end"), org.jooq.impl.SQLDataType.TIMESTAMPWITHTIMEZONE, this, ""); + public final TableField WORK_END = createField(DSL.name("work_end"), SQLDataType.TIMESTAMPWITHTIMEZONE(6), this, ""); /** * The column done.v_daysummary.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_daysummary.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB, this, ""); /** * The column done.v_daysummary.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_daysummary table reference - */ - public VDaysummary() { - this(DSL.name("v_daysummary"), null); + private VDaysummary(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VDaysummary(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -109,12 +103,11 @@ public class VDaysummary extends TableImpl { this(alias, V_DAYSUMMARY); } - private VDaysummary(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VDaysummary(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_daysummary table reference + */ + public VDaysummary() { + this(DSL.name("v_daysummary"), null); } public VDaysummary(Table child, ForeignKey key) { @@ -157,7 +150,7 @@ public class VDaysummary extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDone.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDone.java index 91d7ece..aa8bf43 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDone.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDone.java @@ -7,9 +7,7 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDoneRecord; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; import org.jooq.ForeignKey; @@ -19,24 +17,19 @@ import org.jooq.Row8; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VDone extends TableImpl { - private static final long serialVersionUID = -1832237834; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_done @@ -54,48 +47,49 @@ public class VDone extends TableImpl { /** * The column done.v_done.fk_done. */ - public final TableField FK_DONE = createField(DSL.name("fk_done"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_DONE = createField(DSL.name("fk_done"), SQLDataType.INTEGER, this, ""); /** * The column done.v_done.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); /** * The column done.v_done.time_from. */ - public final TableField TIME_FROM = createField(DSL.name("time_from"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField TIME_FROM = createField(DSL.name("time_from"), SQLDataType.LOCALDATETIME(6), this, ""); /** * The column done.v_done.time_until. */ - public final TableField TIME_UNTIL = createField(DSL.name("time_until"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField TIME_UNTIL = createField(DSL.name("time_until"), SQLDataType.LOCALDATETIME(6), this, ""); /** * The column done.v_done.project_name. */ - public final TableField PROJECT_NAME = createField(DSL.name("project_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField PROJECT_NAME = createField(DSL.name("project_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_done.module_name. */ - public final TableField MODULE_NAME = createField(DSL.name("module_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField MODULE_NAME = createField(DSL.name("module_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_done.job_name. */ - public final TableField JOB_NAME = createField(DSL.name("job_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField JOB_NAME = createField(DSL.name("job_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_done.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB, this, ""); - /** - * Create a done.v_done table reference - */ - public VDone() { - this(DSL.name("v_done"), null); + private VDone(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VDone(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -112,12 +106,11 @@ public class VDone extends TableImpl { this(alias, V_DONE); } - private VDone(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VDone(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_done table reference + */ + public VDone() { + this(DSL.name("v_done"), null); } public VDone(Table child, ForeignKey key) { @@ -160,7 +153,7 @@ public class VDone extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row8 fieldsRow() { + public Row8 fieldsRow() { return (Row8) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDuration.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDuration.java index 36948b6..f694ceb 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDuration.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VDuration.java @@ -7,8 +7,6 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VDurationRecord; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -17,7 +15,9 @@ import org.jooq.Row7; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.types.YearToSecond; @@ -25,17 +25,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VDuration extends TableImpl { - private static final long serialVersionUID = -942666083; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_duration @@ -53,43 +46,44 @@ public class VDuration extends TableImpl { /** * The column done.v_duration.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_duration.duration. */ - public final TableField DURATION = createField(DSL.name("duration"), org.jooq.impl.SQLDataType.INTERVAL, this, ""); + public final TableField DURATION = createField(DSL.name("duration"), SQLDataType.INTERVAL, this, ""); /** * The column done.v_duration.project_name. */ - public final TableField PROJECT_NAME = createField(DSL.name("project_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField PROJECT_NAME = createField(DSL.name("project_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_duration.module_name. */ - public final TableField MODULE_NAME = createField(DSL.name("module_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField MODULE_NAME = createField(DSL.name("module_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_duration.job_name. */ - public final TableField JOB_NAME = createField(DSL.name("job_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField JOB_NAME = createField(DSL.name("job_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_duration.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB, this, ""); /** * The column done.v_duration.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_duration table reference - */ - public VDuration() { - this(DSL.name("v_duration"), null); + private VDuration(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VDuration(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -106,12 +100,11 @@ public class VDuration extends TableImpl { this(alias, V_DURATION); } - private VDuration(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VDuration(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_duration table reference + */ + public VDuration() { + this(DSL.name("v_duration"), null); } public VDuration(Table child, ForeignKey key) { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java index 973106f..392c003 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VEucanshare.java @@ -7,9 +7,7 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VEucanshareRecord; -import java.sql.Date; - -import javax.annotation.processing.Generated; +import java.time.LocalDate; import org.jooq.Field; import org.jooq.ForeignKey; @@ -19,7 +17,9 @@ import org.jooq.Row8; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.types.YearToSecond; @@ -27,17 +27,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VEucanshare extends TableImpl { - private static final long serialVersionUID = 1375477301; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_eucanshare @@ -55,48 +48,49 @@ public class VEucanshare extends TableImpl { /** * The column done.v_eucanshare.fk_done. */ - public final TableField FK_DONE = createField(DSL.name("fk_done"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_DONE = createField(DSL.name("fk_done"), SQLDataType.INTEGER, this, ""); /** * The column done.v_eucanshare.workday. */ - public final TableField WORKDAY = createField(DSL.name("workday"), org.jooq.impl.SQLDataType.DATE, this, ""); + public final TableField WORKDAY = createField(DSL.name("workday"), SQLDataType.LOCALDATE, this, ""); /** * The column done.v_eucanshare.duration. */ - public final TableField DURATION = createField(DSL.name("duration"), org.jooq.impl.SQLDataType.INTERVAL, this, ""); + public final TableField DURATION = createField(DSL.name("duration"), SQLDataType.INTERVAL, this, ""); /** * The column done.v_eucanshare.project_name. */ - public final TableField PROJECT_NAME = createField(DSL.name("project_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField PROJECT_NAME = createField(DSL.name("project_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_eucanshare.module_name. */ - public final TableField MODULE_NAME = createField(DSL.name("module_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField MODULE_NAME = createField(DSL.name("module_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_eucanshare.job_name. */ - public final TableField JOB_NAME = createField(DSL.name("job_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField JOB_NAME = createField(DSL.name("job_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_eucanshare.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); /** * The column done.v_eucanshare.wp. */ - public final TableField WP = createField(DSL.name("wp"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField WP = createField(DSL.name("wp"), SQLDataType.CLOB, this, ""); - /** - * Create a done.v_eucanshare table reference - */ - public VEucanshare() { - this(DSL.name("v_eucanshare"), null); + private VEucanshare(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VEucanshare(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -113,12 +107,11 @@ public class VEucanshare extends TableImpl { this(alias, V_EUCANSHARE); } - private VEucanshare(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VEucanshare(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_eucanshare table reference + */ + public VEucanshare() { + this(DSL.name("v_eucanshare"), null); } public VEucanshare(Table child, ForeignKey key) { @@ -161,7 +154,7 @@ public class VEucanshare extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row8 fieldsRow() { + public Row8 fieldsRow() { return (Row8) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamster.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamster.java index 7fea784..263564b 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamster.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamster.java @@ -7,9 +7,7 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VHamsterRecord; -import java.sql.Date; - -import javax.annotation.processing.Generated; +import java.time.LocalDate; import org.jooq.Field; import org.jooq.ForeignKey; @@ -19,7 +17,9 @@ import org.jooq.Row6; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.types.YearToSecond; @@ -27,17 +27,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VHamster extends TableImpl { - private static final long serialVersionUID = -1309111431; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_hamster @@ -55,38 +48,39 @@ public class VHamster extends TableImpl { /** * The column done.v_hamster.workday. */ - public final TableField WORKDAY = createField(DSL.name("workday"), org.jooq.impl.SQLDataType.DATE, this, ""); + public final TableField WORKDAY = createField(DSL.name("workday"), SQLDataType.LOCALDATE, this, ""); /** * The column done.v_hamster.duration. */ - public final TableField DURATION = createField(DSL.name("duration"), org.jooq.impl.SQLDataType.INTERVAL, this, ""); + public final TableField DURATION = createField(DSL.name("duration"), SQLDataType.INTERVAL, this, ""); /** * The column done.v_hamster.project_name. */ - public final TableField PROJECT_NAME = createField(DSL.name("project_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField PROJECT_NAME = createField(DSL.name("project_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_hamster.module_name. */ - public final TableField MODULE_NAME = createField(DSL.name("module_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField MODULE_NAME = createField(DSL.name("module_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_hamster.job_name. */ - public final TableField JOB_NAME = createField(DSL.name("job_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField JOB_NAME = createField(DSL.name("job_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_hamster.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB, this, ""); - /** - * Create a done.v_hamster table reference - */ - public VHamster() { - this(DSL.name("v_hamster"), null); + private VHamster(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VHamster(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -103,12 +97,11 @@ public class VHamster extends TableImpl { this(alias, V_HAMSTER); } - private VHamster(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VHamster(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_hamster table reference + */ + public VHamster() { + this(DSL.name("v_hamster"), null); } public VHamster(Table child, ForeignKey key) { @@ -151,7 +144,7 @@ public class VHamster extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java index 1f10852..7681578 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VHamstersummary.java @@ -7,9 +7,7 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VHamstersummaryRecord; -import java.sql.Date; - -import javax.annotation.processing.Generated; +import java.time.LocalDate; import org.jooq.Field; import org.jooq.ForeignKey; @@ -19,24 +17,19 @@ import org.jooq.Row6; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VHamstersummary extends TableImpl { - private static final long serialVersionUID = -1084154956; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_hamstersummary @@ -54,38 +47,39 @@ public class VHamstersummary extends TableImpl { /** * The column done.v_hamstersummary.workday. */ - public final TableField WORKDAY = createField(DSL.name("workday"), org.jooq.impl.SQLDataType.DATE, this, ""); + public final TableField WORKDAY = createField(DSL.name("workday"), SQLDataType.LOCALDATE, this, ""); /** * The column done.v_hamstersummary.duration. */ - public final TableField DURATION = createField(DSL.name("duration"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DURATION = createField(DSL.name("duration"), SQLDataType.CLOB, this, ""); /** * The column done.v_hamstersummary.project_name. */ - public final TableField PROJECT_NAME = createField(DSL.name("project_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField PROJECT_NAME = createField(DSL.name("project_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_hamstersummary.module_name. */ - public final TableField MODULE_NAME = createField(DSL.name("module_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField MODULE_NAME = createField(DSL.name("module_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_hamstersummary.job_name. */ - public final TableField JOB_NAME = createField(DSL.name("job_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField JOB_NAME = createField(DSL.name("job_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_hamstersummary.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB, this, ""); - /** - * Create a done.v_hamstersummary table reference - */ - public VHamstersummary() { - this(DSL.name("v_hamstersummary"), null); + private VHamstersummary(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VHamstersummary(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -102,12 +96,11 @@ public class VHamstersummary extends TableImpl { this(alias, V_HAMSTERSUMMARY); } - private VHamstersummary(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VHamstersummary(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_hamstersummary table reference + */ + public VHamstersummary() { + this(DSL.name("v_hamstersummary"), null); } public VHamstersummary(Table child, ForeignKey key) { @@ -150,7 +143,7 @@ public class VHamstersummary extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java index cbc93b2..d36a07d 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTasklist.java @@ -7,8 +7,6 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VTasklistRecord; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -17,24 +15,19 @@ import org.jooq.Row6; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VTasklist extends TableImpl { - private static final long serialVersionUID = -601090984; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_tasklist @@ -52,38 +45,39 @@ public class VTasklist extends TableImpl { /** * The column done.v_tasklist.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_tasklist.duration. */ - public final TableField DURATION = createField(DSL.name("duration"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DURATION = createField(DSL.name("duration"), SQLDataType.CLOB, this, ""); /** * The column done.v_tasklist.project_name. */ - public final TableField PROJECT_NAME = createField(DSL.name("project_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField PROJECT_NAME = createField(DSL.name("project_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_tasklist.module_name. */ - public final TableField MODULE_NAME = createField(DSL.name("module_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField MODULE_NAME = createField(DSL.name("module_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_tasklist.job_name. */ - public final TableField JOB_NAME = createField(DSL.name("job_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField JOB_NAME = createField(DSL.name("job_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_tasklist.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_tasklist table reference - */ - public VTasklist() { - this(DSL.name("v_tasklist"), null); + private VTasklist(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VTasklist(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -100,12 +94,11 @@ public class VTasklist extends TableImpl { this(alias, V_TASKLIST); } - private VTasklist(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VTasklist(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_tasklist table reference + */ + public VTasklist() { + this(DSL.name("v_tasklist"), null); } public VTasklist(Table child, ForeignKey key) { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java index a70d366..5fd4750 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTimelength.java @@ -7,8 +7,6 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VTimelengthRecord; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -17,7 +15,9 @@ import org.jooq.Row4; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.types.YearToSecond; @@ -25,17 +25,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VTimelength extends TableImpl { - private static final long serialVersionUID = -181048501; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_timelength @@ -53,28 +46,29 @@ public class VTimelength extends TableImpl { /** * The column done.v_timelength.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_timelength.duration. */ - public final TableField DURATION = createField(DSL.name("duration"), org.jooq.impl.SQLDataType.INTERVAL, this, ""); + public final TableField DURATION = createField(DSL.name("duration"), SQLDataType.INTERVAL, this, ""); /** * The column done.v_timelength.fk_done. */ - public final TableField FK_DONE = createField(DSL.name("fk_done"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_DONE = createField(DSL.name("fk_done"), SQLDataType.INTEGER, this, ""); /** * The column done.v_timelength.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_timelength table reference - */ - public VTimelength() { - this(DSL.name("v_timelength"), null); + private VTimelength(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VTimelength(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -91,12 +85,11 @@ public class VTimelength extends TableImpl { this(alias, V_TIMELENGTH); } - private VTimelength(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VTimelength(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_timelength table reference + */ + public VTimelength() { + this(DSL.name("v_timelength"), null); } public VTimelength(Table child, ForeignKey key) { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java index 77f843a..ccd5436 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VTotalofday.java @@ -7,8 +7,6 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VTotalofdayRecord; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -17,24 +15,19 @@ import org.jooq.Row6; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VTotalofday extends TableImpl { - private static final long serialVersionUID = 46814145; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_totalofday @@ -52,38 +45,39 @@ public class VTotalofday extends TableImpl { /** * The column done.v_totalofday.breaktime. */ - public final TableField BREAKTIME = createField(DSL.name("breaktime"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField BREAKTIME = createField(DSL.name("breaktime"), SQLDataType.CLOB, this, ""); /** * The column done.v_totalofday.worktime. */ - public final TableField WORKTIME = createField(DSL.name("worktime"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField WORKTIME = createField(DSL.name("worktime"), SQLDataType.CLOB, this, ""); /** * The column done.v_totalofday.starttime. */ - public final TableField STARTTIME = createField(DSL.name("starttime"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField STARTTIME = createField(DSL.name("starttime"), SQLDataType.CLOB, this, ""); /** * The column done.v_totalofday.endtime. */ - public final TableField ENDTIME = createField(DSL.name("endtime"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField ENDTIME = createField(DSL.name("endtime"), SQLDataType.CLOB, this, ""); /** * The column done.v_totalofday.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_totalofday.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_totalofday table reference - */ - public VTotalofday() { - this(DSL.name("v_totalofday"), null); + private VTotalofday(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VTotalofday(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -100,12 +94,11 @@ public class VTotalofday extends TableImpl { this(alias, V_TOTALOFDAY); } - private VTotalofday(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VTotalofday(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_totalofday table reference + */ + public VTotalofday() { + this(DSL.name("v_totalofday"), null); } public VTotalofday(Table child, ForeignKey key) { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java index 1dd5e65..272d49a 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/VWorktime.java @@ -7,8 +7,6 @@ package de.jottyfan.timetrack.db.done.tables; import de.jottyfan.timetrack.db.done.Done; import de.jottyfan.timetrack.db.done.tables.records.VWorktimeRecord; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.Name; @@ -17,24 +15,19 @@ import org.jooq.Row8; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VWorktime extends TableImpl { - private static final long serialVersionUID = -330427149; + private static final long serialVersionUID = 1L; /** * The reference instance of done.v_worktime @@ -52,48 +45,49 @@ public class VWorktime extends TableImpl { /** * The column done.v_worktime.day. */ - public final TableField DAY = createField(DSL.name("day"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DAY = createField(DSL.name("day"), SQLDataType.CLOB, this, ""); /** * The column done.v_worktime.duration. */ - public final TableField DURATION = createField(DSL.name("duration"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField DURATION = createField(DSL.name("duration"), SQLDataType.CLOB, this, ""); /** * The column done.v_worktime.duration_hours. */ - public final TableField DURATION_HOURS = createField(DSL.name("duration_hours"), org.jooq.impl.SQLDataType.DOUBLE, this, ""); + public final TableField DURATION_HOURS = createField(DSL.name("duration_hours"), SQLDataType.DOUBLE, this, ""); /** * The column done.v_worktime.project_name. */ - public final TableField PROJECT_NAME = createField(DSL.name("project_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField PROJECT_NAME = createField(DSL.name("project_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_worktime.module_name. */ - public final TableField MODULE_NAME = createField(DSL.name("module_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField MODULE_NAME = createField(DSL.name("module_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_worktime.job_name. */ - public final TableField JOB_NAME = createField(DSL.name("job_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField JOB_NAME = createField(DSL.name("job_name"), SQLDataType.CLOB, this, ""); /** * The column done.v_worktime.wp. */ - public final TableField WP = createField(DSL.name("wp"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField WP = createField(DSL.name("wp"), SQLDataType.CLOB, this, ""); /** * The column done.v_worktime.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER, this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, ""); - /** - * Create a done.v_worktime table reference - */ - public VWorktime() { - this(DSL.name("v_worktime"), null); + private VWorktime(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VWorktime(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -110,12 +104,11 @@ public class VWorktime extends TableImpl { this(alias, V_WORKTIME); } - private VWorktime(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VWorktime(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a done.v_worktime table reference + */ + public VWorktime() { + this(DSL.name("v_worktime"), null); } public VWorktime(Table child, ForeignKey key) { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java index 4ffc47c..b1c3c5e 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TDoneRecord.java @@ -6,43 +6,35 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.TDone; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record9; import org.jooq.Row9; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TDoneRecord extends TableRecordImpl implements Record9 { +public class TDoneRecord extends UpdatableRecordImpl implements Record9 { - private static final long serialVersionUID = -1941900551; + private static final long serialVersionUID = 1L; /** * Setter for done.t_done.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(0, value); } /** * Getter for done.t_done.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(0); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); } /** @@ -62,29 +54,29 @@ public class TDoneRecord extends TableRecordImpl implements Record9 /** * Setter for done.t_done.time_from. */ - public void setTimeFrom(Timestamp value) { + public void setTimeFrom(LocalDateTime value) { set(2, value); } /** * Getter for done.t_done.time_from. */ - public Timestamp getTimeFrom() { - return (Timestamp) get(2); + public LocalDateTime getTimeFrom() { + return (LocalDateTime) get(2); } /** * Setter for done.t_done.time_until. */ - public void setTimeUntil(Timestamp value) { + public void setTimeUntil(LocalDateTime value) { set(3, value); } /** * Getter for done.t_done.time_until. */ - public Timestamp getTimeUntil() { - return (Timestamp) get(3); + public LocalDateTime getTimeUntil() { + return (LocalDateTime) get(3); } /** @@ -157,22 +149,31 @@ public class TDoneRecord extends TableRecordImpl implements Record9 return (String) get(8); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record9 type implementation // ------------------------------------------------------------------------- @Override - public Row9 fieldsRow() { + public Row9 fieldsRow() { return (Row9) super.fieldsRow(); } @Override - public Row9 valuesRow() { + public Row9 valuesRow() { return (Row9) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return TDone.T_DONE.LASTCHANGE; } @@ -182,12 +183,12 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public Field field3() { + public Field field3() { return TDone.T_DONE.TIME_FROM; } @Override - public Field field4() { + public Field field4() { return TDone.T_DONE.TIME_UNTIL; } @@ -217,7 +218,7 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public Timestamp component1() { + public LocalDateTime component1() { return getLastchange(); } @@ -227,12 +228,12 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public Timestamp component3() { + public LocalDateTime component3() { return getTimeFrom(); } @Override - public Timestamp component4() { + public LocalDateTime component4() { return getTimeUntil(); } @@ -262,7 +263,7 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public Timestamp value1() { + public LocalDateTime value1() { return getLastchange(); } @@ -272,12 +273,12 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public Timestamp value3() { + public LocalDateTime value3() { return getTimeFrom(); } @Override - public Timestamp value4() { + public LocalDateTime value4() { return getTimeUntil(); } @@ -307,7 +308,7 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public TDoneRecord value1(Timestamp value) { + public TDoneRecord value1(LocalDateTime value) { setLastchange(value); return this; } @@ -319,13 +320,13 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public TDoneRecord value3(Timestamp value) { + public TDoneRecord value3(LocalDateTime value) { setTimeFrom(value); return this; } @Override - public TDoneRecord value4(Timestamp value) { + public TDoneRecord value4(LocalDateTime value) { setTimeUntil(value); return this; } @@ -361,7 +362,7 @@ public class TDoneRecord extends TableRecordImpl implements Record9 } @Override - public TDoneRecord values(Timestamp value1, Integer value2, Timestamp value3, Timestamp value4, Integer value5, Integer value6, Integer value7, Integer value8, String value9) { + public TDoneRecord values(LocalDateTime value1, Integer value2, LocalDateTime value3, LocalDateTime value4, Integer value5, Integer value6, Integer value7, Integer value8, String value9) { value1(value1); value2(value2); value3(value3); @@ -388,17 +389,17 @@ public class TDoneRecord extends TableRecordImpl implements Record9 /** * Create a detached, initialised TDoneRecord */ - public TDoneRecord(Timestamp lastchange, Integer pk, Timestamp timeFrom, Timestamp timeUntil, Integer fkProject, Integer fkModule, Integer fkJob, Integer fkLogin, String wp) { + public TDoneRecord(LocalDateTime lastchange, Integer pk, LocalDateTime timeFrom, LocalDateTime timeUntil, Integer fkProject, Integer fkModule, Integer fkJob, Integer fkLogin, String wp) { super(TDone.T_DONE); - set(0, lastchange); - set(1, pk); - set(2, timeFrom); - set(3, timeUntil); - set(4, fkProject); - set(5, fkModule); - set(6, fkJob); - set(7, fkLogin); - set(8, wp); + setLastchange(lastchange); + setPk(pk); + setTimeFrom(timeFrom); + setTimeUntil(timeUntil); + setFkProject(fkProject); + setFkModule(fkModule); + setFkJob(fkJob); + setFkLogin(fkLogin); + setWp(wp); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java index cf8b1bd..d4faeac 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TJobRecord.java @@ -6,43 +6,35 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.TJob; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record3; import org.jooq.Row3; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TJobRecord extends TableRecordImpl implements Record3 { +public class TJobRecord extends UpdatableRecordImpl implements Record3 { - private static final long serialVersionUID = -1298990074; + private static final long serialVersionUID = 1L; /** * Setter for done.t_job.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(0, value); } /** * Getter for done.t_job.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(0); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); } /** @@ -73,22 +65,31 @@ public class TJobRecord extends TableRecordImpl implements Record3 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record3 type implementation // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return TJob.T_JOB.LASTCHANGE; } @@ -103,7 +104,7 @@ public class TJobRecord extends TableRecordImpl implements Record3 implements Record3 implements Record3 implements Record3 implements Record3 implements Record3 { +public class TModuleRecord extends UpdatableRecordImpl implements Record3 { - private static final long serialVersionUID = 1225434375; + private static final long serialVersionUID = 1L; /** * Setter for done.t_module.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(0, value); } /** * Getter for done.t_module.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(0); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); } /** @@ -73,22 +65,31 @@ public class TModuleRecord extends TableRecordImpl implements Rec return (String) get(2); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record3 type implementation // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return TModule.T_MODULE.LASTCHANGE; } @@ -103,7 +104,7 @@ public class TModuleRecord extends TableRecordImpl implements Rec } @Override - public Timestamp component1() { + public LocalDateTime component1() { return getLastchange(); } @@ -118,7 +119,7 @@ public class TModuleRecord extends TableRecordImpl implements Rec } @Override - public Timestamp value1() { + public LocalDateTime value1() { return getLastchange(); } @@ -133,7 +134,7 @@ public class TModuleRecord extends TableRecordImpl implements Rec } @Override - public TModuleRecord value1(Timestamp value) { + public TModuleRecord value1(LocalDateTime value) { setLastchange(value); return this; } @@ -151,7 +152,7 @@ public class TModuleRecord extends TableRecordImpl implements Rec } @Override - public TModuleRecord values(Timestamp value1, Integer value2, String value3) { + public TModuleRecord values(LocalDateTime value1, Integer value2, String value3) { value1(value1); value2(value2); value3(value3); @@ -172,11 +173,11 @@ public class TModuleRecord extends TableRecordImpl implements Rec /** * Create a detached, initialised TModuleRecord */ - public TModuleRecord(Timestamp lastchange, Integer pk, String name) { + public TModuleRecord(LocalDateTime lastchange, Integer pk, String name) { super(TModule.T_MODULE); - set(0, lastchange); - set(1, pk); - set(2, name); + setLastchange(lastchange); + setPk(pk); + setName(name); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java index a3e4c2e..8bb5238 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/TProjectRecord.java @@ -6,43 +6,35 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.TProject; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record3; import org.jooq.Row3; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TProjectRecord extends TableRecordImpl implements Record3 { +public class TProjectRecord extends UpdatableRecordImpl implements Record3 { - private static final long serialVersionUID = 1716720610; + private static final long serialVersionUID = 1L; /** * Setter for done.t_project.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(0, value); } /** * Getter for done.t_project.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(0); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); } /** @@ -73,22 +65,31 @@ public class TProjectRecord extends TableRecordImpl implements R return (String) get(2); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record3 type implementation // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return TProject.T_PROJECT.LASTCHANGE; } @@ -103,7 +104,7 @@ public class TProjectRecord extends TableRecordImpl implements R } @Override - public Timestamp component1() { + public LocalDateTime component1() { return getLastchange(); } @@ -118,7 +119,7 @@ public class TProjectRecord extends TableRecordImpl implements R } @Override - public Timestamp value1() { + public LocalDateTime value1() { return getLastchange(); } @@ -133,7 +134,7 @@ public class TProjectRecord extends TableRecordImpl implements R } @Override - public TProjectRecord value1(Timestamp value) { + public TProjectRecord value1(LocalDateTime value) { setLastchange(value); return this; } @@ -151,7 +152,7 @@ public class TProjectRecord extends TableRecordImpl implements R } @Override - public TProjectRecord values(Timestamp value1, Integer value2, String value3) { + public TProjectRecord values(LocalDateTime value1, Integer value2, String value3) { value1(value1); value2(value2); value3(value3); @@ -172,11 +173,11 @@ public class TProjectRecord extends TableRecordImpl implements R /** * Create a detached, initialised TProjectRecord */ - public TProjectRecord(Timestamp lastchange, Integer pk, String name) { + public TProjectRecord(LocalDateTime lastchange, Integer pk, String name) { super(TProject.T_PROJECT); - set(0, lastchange); - set(1, pk); - set(2, name); + setLastchange(lastchange); + setPk(pk); + setName(name); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java index b672cef..d95c898 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDailyRecord.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VDaily; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.Record4; import org.jooq.Row4; @@ -18,17 +16,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VDailyRecord extends TableRecordImpl implements Record4 { - private static final long serialVersionUID = 272286224; + private static final long serialVersionUID = 1L; /** * Setter for done.v_daily.worktime. @@ -210,9 +201,9 @@ public class VDailyRecord extends TableRecordImpl implements Recor public VDailyRecord(YearToSecond worktime, String day, String login, Integer fkLogin) { super(VDaily.V_DAILY); - set(0, worktime); - set(1, day); - set(2, login); - set(3, fkLogin); + setWorktime(worktime); + setDay(day); + setLogin(login); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java index 7b954c0..e8d9ab4 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaylimitsRecord.java @@ -6,11 +6,9 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VDaylimits; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.time.OffsetDateTime; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.Record4; import org.jooq.Row4; @@ -20,30 +18,23 @@ import org.jooq.impl.TableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class VDaylimitsRecord extends TableRecordImpl implements Record4 { +public class VDaylimitsRecord extends TableRecordImpl implements Record4 { - private static final long serialVersionUID = -1076103395; + private static final long serialVersionUID = 1L; /** * Setter for done.v_daylimits.work_start. */ - public void setWorkStart(Timestamp value) { + public void setWorkStart(LocalDateTime value) { set(0, value); } /** * Getter for done.v_daylimits.work_start. */ - public Timestamp getWorkStart() { - return (Timestamp) get(0); + public LocalDateTime getWorkStart() { + return (LocalDateTime) get(0); } /** @@ -93,17 +84,17 @@ public class VDaylimitsRecord extends TableRecordImpl implemen // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } @Override - public Row4 valuesRow() { + public Row4 valuesRow() { return (Row4) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return VDaylimits.V_DAYLIMITS.WORK_START; } @@ -123,7 +114,7 @@ public class VDaylimitsRecord extends TableRecordImpl implemen } @Override - public Timestamp component1() { + public LocalDateTime component1() { return getWorkStart(); } @@ -143,7 +134,7 @@ public class VDaylimitsRecord extends TableRecordImpl implemen } @Override - public Timestamp value1() { + public LocalDateTime value1() { return getWorkStart(); } @@ -163,7 +154,7 @@ public class VDaylimitsRecord extends TableRecordImpl implemen } @Override - public VDaylimitsRecord value1(Timestamp value) { + public VDaylimitsRecord value1(LocalDateTime value) { setWorkStart(value); return this; } @@ -187,7 +178,7 @@ public class VDaylimitsRecord extends TableRecordImpl implemen } @Override - public VDaylimitsRecord values(Timestamp value1, OffsetDateTime value2, String value3, Integer value4) { + public VDaylimitsRecord values(LocalDateTime value1, OffsetDateTime value2, String value3, Integer value4) { value1(value1); value2(value2); value3(value3); @@ -209,12 +200,12 @@ public class VDaylimitsRecord extends TableRecordImpl implemen /** * Create a detached, initialised VDaylimitsRecord */ - public VDaylimitsRecord(Timestamp workStart, OffsetDateTime workEnd, String day, Integer fkLogin) { + public VDaylimitsRecord(LocalDateTime workStart, OffsetDateTime workEnd, String day, Integer fkLogin) { super(VDaylimits.V_DAYLIMITS); - set(0, workStart); - set(1, workEnd); - set(2, day); - set(3, fkLogin); + setWorkStart(workStart); + setWorkEnd(workEnd); + setDay(day); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java index 241ab51..0d78791 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDaysummaryRecord.java @@ -6,11 +6,9 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VDaysummary; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.time.OffsetDateTime; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.Record7; import org.jooq.Row7; @@ -21,17 +19,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class VDaysummaryRecord extends TableRecordImpl implements Record7 { +public class VDaysummaryRecord extends TableRecordImpl implements Record7 { - private static final long serialVersionUID = -524282795; + private static final long serialVersionUID = 1L; /** * Setter for done.v_daysummary.breaktime. @@ -64,15 +55,15 @@ public class VDaysummaryRecord extends TableRecordImpl implem /** * Setter for done.v_daysummary.work_start. */ - public void setWorkStart(Timestamp value) { + public void setWorkStart(LocalDateTime value) { set(2, value); } /** * Getter for done.v_daysummary.work_start. */ - public Timestamp getWorkStart() { - return (Timestamp) get(2); + public LocalDateTime getWorkStart() { + return (LocalDateTime) get(2); } /** @@ -136,12 +127,12 @@ public class VDaysummaryRecord extends TableRecordImpl implem // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } @Override - public Row7 valuesRow() { + public Row7 valuesRow() { return (Row7) super.valuesRow(); } @@ -156,7 +147,7 @@ public class VDaysummaryRecord extends TableRecordImpl implem } @Override - public Field field3() { + public Field field3() { return VDaysummary.V_DAYSUMMARY.WORK_START; } @@ -191,7 +182,7 @@ public class VDaysummaryRecord extends TableRecordImpl implem } @Override - public Timestamp component3() { + public LocalDateTime component3() { return getWorkStart(); } @@ -226,7 +217,7 @@ public class VDaysummaryRecord extends TableRecordImpl implem } @Override - public Timestamp value3() { + public LocalDateTime value3() { return getWorkStart(); } @@ -263,7 +254,7 @@ public class VDaysummaryRecord extends TableRecordImpl implem } @Override - public VDaysummaryRecord value3(Timestamp value) { + public VDaysummaryRecord value3(LocalDateTime value) { setWorkStart(value); return this; } @@ -293,7 +284,7 @@ public class VDaysummaryRecord extends TableRecordImpl implem } @Override - public VDaysummaryRecord values(YearToSecond value1, YearToSecond value2, Timestamp value3, OffsetDateTime value4, String value5, String value6, Integer value7) { + public VDaysummaryRecord values(YearToSecond value1, YearToSecond value2, LocalDateTime value3, OffsetDateTime value4, String value5, String value6, Integer value7) { value1(value1); value2(value2); value3(value3); @@ -318,15 +309,15 @@ public class VDaysummaryRecord extends TableRecordImpl implem /** * Create a detached, initialised VDaysummaryRecord */ - public VDaysummaryRecord(YearToSecond breaktime, YearToSecond worktime, Timestamp workStart, OffsetDateTime workEnd, String day, String login, Integer fkLogin) { + public VDaysummaryRecord(YearToSecond breaktime, YearToSecond worktime, LocalDateTime workStart, OffsetDateTime workEnd, String day, String login, Integer fkLogin) { super(VDaysummary.V_DAYSUMMARY); - set(0, breaktime); - set(1, worktime); - set(2, workStart); - set(3, workEnd); - set(4, day); - set(5, login); - set(6, fkLogin); + setBreaktime(breaktime); + setWorktime(worktime); + setWorkStart(workStart); + setWorkEnd(workEnd); + setDay(day); + setLogin(login); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java index db58ac5..04b8cb8 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDoneRecord.java @@ -6,9 +6,7 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VDone; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; import org.jooq.Record8; @@ -19,17 +17,10 @@ import org.jooq.impl.TableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class VDoneRecord extends TableRecordImpl implements Record8 { +public class VDoneRecord extends TableRecordImpl implements Record8 { - private static final long serialVersionUID = 933997970; + private static final long serialVersionUID = 1L; /** * Setter for done.v_done.fk_done. @@ -62,29 +53,29 @@ public class VDoneRecord extends TableRecordImpl implements Record8 /** * Setter for done.v_done.time_from. */ - public void setTimeFrom(Timestamp value) { + public void setTimeFrom(LocalDateTime value) { set(2, value); } /** * Getter for done.v_done.time_from. */ - public Timestamp getTimeFrom() { - return (Timestamp) get(2); + public LocalDateTime getTimeFrom() { + return (LocalDateTime) get(2); } /** * Setter for done.v_done.time_until. */ - public void setTimeUntil(Timestamp value) { + public void setTimeUntil(LocalDateTime value) { set(3, value); } /** * Getter for done.v_done.time_until. */ - public Timestamp getTimeUntil() { - return (Timestamp) get(3); + public LocalDateTime getTimeUntil() { + return (LocalDateTime) get(3); } /** @@ -148,12 +139,12 @@ public class VDoneRecord extends TableRecordImpl implements Record8 // ------------------------------------------------------------------------- @Override - public Row8 fieldsRow() { + public Row8 fieldsRow() { return (Row8) super.fieldsRow(); } @Override - public Row8 valuesRow() { + public Row8 valuesRow() { return (Row8) super.valuesRow(); } @@ -168,12 +159,12 @@ public class VDoneRecord extends TableRecordImpl implements Record8 } @Override - public Field field3() { + public Field field3() { return VDone.V_DONE.TIME_FROM; } @Override - public Field field4() { + public Field field4() { return VDone.V_DONE.TIME_UNTIL; } @@ -208,12 +199,12 @@ public class VDoneRecord extends TableRecordImpl implements Record8 } @Override - public Timestamp component3() { + public LocalDateTime component3() { return getTimeFrom(); } @Override - public Timestamp component4() { + public LocalDateTime component4() { return getTimeUntil(); } @@ -248,12 +239,12 @@ public class VDoneRecord extends TableRecordImpl implements Record8 } @Override - public Timestamp value3() { + public LocalDateTime value3() { return getTimeFrom(); } @Override - public Timestamp value4() { + public LocalDateTime value4() { return getTimeUntil(); } @@ -290,13 +281,13 @@ public class VDoneRecord extends TableRecordImpl implements Record8 } @Override - public VDoneRecord value3(Timestamp value) { + public VDoneRecord value3(LocalDateTime value) { setTimeFrom(value); return this; } @Override - public VDoneRecord value4(Timestamp value) { + public VDoneRecord value4(LocalDateTime value) { setTimeUntil(value); return this; } @@ -326,7 +317,7 @@ public class VDoneRecord extends TableRecordImpl implements Record8 } @Override - public VDoneRecord values(Integer value1, Integer value2, Timestamp value3, Timestamp value4, String value5, String value6, String value7, String value8) { + public VDoneRecord values(Integer value1, Integer value2, LocalDateTime value3, LocalDateTime value4, String value5, String value6, String value7, String value8) { value1(value1); value2(value2); value3(value3); @@ -352,16 +343,16 @@ public class VDoneRecord extends TableRecordImpl implements Record8 /** * Create a detached, initialised VDoneRecord */ - public VDoneRecord(Integer fkDone, Integer fkLogin, Timestamp timeFrom, Timestamp timeUntil, String projectName, String moduleName, String jobName, String login) { + public VDoneRecord(Integer fkDone, Integer fkLogin, LocalDateTime timeFrom, LocalDateTime timeUntil, String projectName, String moduleName, String jobName, String login) { super(VDone.V_DONE); - set(0, fkDone); - set(1, fkLogin); - set(2, timeFrom); - set(3, timeUntil); - set(4, projectName); - set(5, moduleName); - set(6, jobName); - set(7, login); + setFkDone(fkDone); + setFkLogin(fkLogin); + setTimeFrom(timeFrom); + setTimeUntil(timeUntil); + setProjectName(projectName); + setModuleName(moduleName); + setJobName(jobName); + setLogin(login); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java index 12b5637..a62ce90 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VDurationRecord.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VDuration; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.Record7; import org.jooq.Row7; @@ -18,17 +16,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VDurationRecord extends TableRecordImpl implements Record7 { - private static final long serialVersionUID = -1641325525; + private static final long serialVersionUID = 1L; /** * Setter for done.v_duration.day. @@ -318,12 +309,12 @@ public class VDurationRecord extends TableRecordImpl implements public VDurationRecord(String day, YearToSecond duration, String projectName, String moduleName, String jobName, String login, Integer fkLogin) { super(VDuration.V_DURATION); - set(0, day); - set(1, duration); - set(2, projectName); - set(3, moduleName); - set(4, jobName); - set(5, login); - set(6, fkLogin); + setDay(day); + setDuration(duration); + setProjectName(projectName); + setModuleName(moduleName); + setJobName(jobName); + setLogin(login); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java index 93236b2..5846f57 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VEucanshareRecord.java @@ -6,9 +6,7 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VEucanshare; -import java.sql.Date; - -import javax.annotation.processing.Generated; +import java.time.LocalDate; import org.jooq.Field; import org.jooq.Record8; @@ -20,17 +18,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class VEucanshareRecord extends TableRecordImpl implements Record8 { +public class VEucanshareRecord extends TableRecordImpl implements Record8 { - private static final long serialVersionUID = 2139665588; + private static final long serialVersionUID = 1L; /** * Setter for done.v_eucanshare.fk_done. @@ -49,15 +40,15 @@ public class VEucanshareRecord extends TableRecordImpl implem /** * Setter for done.v_eucanshare.workday. */ - public void setWorkday(Date value) { + public void setWorkday(LocalDate value) { set(1, value); } /** * Getter for done.v_eucanshare.workday. */ - public Date getWorkday() { - return (Date) get(1); + public LocalDate getWorkday() { + return (LocalDate) get(1); } /** @@ -149,12 +140,12 @@ public class VEucanshareRecord extends TableRecordImpl implem // ------------------------------------------------------------------------- @Override - public Row8 fieldsRow() { + public Row8 fieldsRow() { return (Row8) super.fieldsRow(); } @Override - public Row8 valuesRow() { + public Row8 valuesRow() { return (Row8) super.valuesRow(); } @@ -164,7 +155,7 @@ public class VEucanshareRecord extends TableRecordImpl implem } @Override - public Field field2() { + public Field field2() { return VEucanshare.V_EUCANSHARE.WORKDAY; } @@ -204,7 +195,7 @@ public class VEucanshareRecord extends TableRecordImpl implem } @Override - public Date component2() { + public LocalDate component2() { return getWorkday(); } @@ -244,7 +235,7 @@ public class VEucanshareRecord extends TableRecordImpl implem } @Override - public Date value2() { + public LocalDate value2() { return getWorkday(); } @@ -285,7 +276,7 @@ public class VEucanshareRecord extends TableRecordImpl implem } @Override - public VEucanshareRecord value2(Date value) { + public VEucanshareRecord value2(LocalDate value) { setWorkday(value); return this; } @@ -327,7 +318,7 @@ public class VEucanshareRecord extends TableRecordImpl implem } @Override - public VEucanshareRecord values(Integer value1, Date value2, YearToSecond value3, String value4, String value5, String value6, Integer value7, String value8) { + public VEucanshareRecord values(Integer value1, LocalDate value2, YearToSecond value3, String value4, String value5, String value6, Integer value7, String value8) { value1(value1); value2(value2); value3(value3); @@ -353,16 +344,16 @@ public class VEucanshareRecord extends TableRecordImpl implem /** * Create a detached, initialised VEucanshareRecord */ - public VEucanshareRecord(Integer fkDone, Date workday, YearToSecond duration, String projectName, String moduleName, String jobName, Integer fkLogin, String wp) { + public VEucanshareRecord(Integer fkDone, LocalDate workday, YearToSecond duration, String projectName, String moduleName, String jobName, Integer fkLogin, String wp) { super(VEucanshare.V_EUCANSHARE); - set(0, fkDone); - set(1, workday); - set(2, duration); - set(3, projectName); - set(4, moduleName); - set(5, jobName); - set(6, fkLogin); - set(7, wp); + setFkDone(fkDone); + setWorkday(workday); + setDuration(duration); + setProjectName(projectName); + setModuleName(moduleName); + setJobName(jobName); + setFkLogin(fkLogin); + setWp(wp); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java index e0e6f8f..4f0869f 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamsterRecord.java @@ -6,9 +6,7 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VHamster; -import java.sql.Date; - -import javax.annotation.processing.Generated; +import java.time.LocalDate; import org.jooq.Field; import org.jooq.Record6; @@ -20,30 +18,23 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class VHamsterRecord extends TableRecordImpl implements Record6 { +public class VHamsterRecord extends TableRecordImpl implements Record6 { - private static final long serialVersionUID = 1135919574; + private static final long serialVersionUID = 1L; /** * Setter for done.v_hamster.workday. */ - public void setWorkday(Date value) { + public void setWorkday(LocalDate value) { set(0, value); } /** * Getter for done.v_hamster.workday. */ - public Date getWorkday() { - return (Date) get(0); + public LocalDate getWorkday() { + return (LocalDate) get(0); } /** @@ -121,17 +112,17 @@ public class VHamsterRecord extends TableRecordImpl implements R // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } @Override - public Row6 valuesRow() { + public Row6 valuesRow() { return (Row6) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return VHamster.V_HAMSTER.WORKDAY; } @@ -161,7 +152,7 @@ public class VHamsterRecord extends TableRecordImpl implements R } @Override - public Date component1() { + public LocalDate component1() { return getWorkday(); } @@ -191,7 +182,7 @@ public class VHamsterRecord extends TableRecordImpl implements R } @Override - public Date value1() { + public LocalDate value1() { return getWorkday(); } @@ -221,7 +212,7 @@ public class VHamsterRecord extends TableRecordImpl implements R } @Override - public VHamsterRecord value1(Date value) { + public VHamsterRecord value1(LocalDate value) { setWorkday(value); return this; } @@ -257,7 +248,7 @@ public class VHamsterRecord extends TableRecordImpl implements R } @Override - public VHamsterRecord values(Date value1, YearToSecond value2, String value3, String value4, String value5, String value6) { + public VHamsterRecord values(LocalDate value1, YearToSecond value2, String value3, String value4, String value5, String value6) { value1(value1); value2(value2); value3(value3); @@ -281,14 +272,14 @@ public class VHamsterRecord extends TableRecordImpl implements R /** * Create a detached, initialised VHamsterRecord */ - public VHamsterRecord(Date workday, YearToSecond duration, String projectName, String moduleName, String jobName, String login) { + public VHamsterRecord(LocalDate workday, YearToSecond duration, String projectName, String moduleName, String jobName, String login) { super(VHamster.V_HAMSTER); - set(0, workday); - set(1, duration); - set(2, projectName); - set(3, moduleName); - set(4, jobName); - set(5, login); + setWorkday(workday); + setDuration(duration); + setProjectName(projectName); + setModuleName(moduleName); + setJobName(jobName); + setLogin(login); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java index 3d5a7c1..6120c9b 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VHamstersummaryRecord.java @@ -6,9 +6,7 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VHamstersummary; -import java.sql.Date; - -import javax.annotation.processing.Generated; +import java.time.LocalDate; import org.jooq.Field; import org.jooq.Record6; @@ -19,30 +17,23 @@ import org.jooq.impl.TableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class VHamstersummaryRecord extends TableRecordImpl implements Record6 { +public class VHamstersummaryRecord extends TableRecordImpl implements Record6 { - private static final long serialVersionUID = 1731792914; + private static final long serialVersionUID = 1L; /** * Setter for done.v_hamstersummary.workday. */ - public void setWorkday(Date value) { + public void setWorkday(LocalDate value) { set(0, value); } /** * Getter for done.v_hamstersummary.workday. */ - public Date getWorkday() { - return (Date) get(0); + public LocalDate getWorkday() { + return (LocalDate) get(0); } /** @@ -120,17 +111,17 @@ public class VHamstersummaryRecord extends TableRecordImpl fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } @Override - public Row6 valuesRow() { + public Row6 valuesRow() { return (Row6) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return VHamstersummary.V_HAMSTERSUMMARY.WORKDAY; } @@ -160,7 +151,7 @@ public class VHamstersummaryRecord extends TableRecordImpl implements Record6 { - private static final long serialVersionUID = -1593590961; + private static final long serialVersionUID = 1L; /** * Setter for done.v_tasklist.day. @@ -281,11 +272,11 @@ public class VTasklistRecord extends TableRecordImpl implements public VTasklistRecord(String day, String duration, String projectName, String moduleName, String jobName, Integer fkLogin) { super(VTasklist.V_TASKLIST); - set(0, day); - set(1, duration); - set(2, projectName); - set(3, moduleName); - set(4, jobName); - set(5, fkLogin); + setDay(day); + setDuration(duration); + setProjectName(projectName); + setModuleName(moduleName); + setJobName(jobName); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java index d21b9e7..f9ef4c3 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTimelengthRecord.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VTimelength; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.Record4; import org.jooq.Row4; @@ -18,17 +16,10 @@ import org.jooq.types.YearToSecond; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VTimelengthRecord extends TableRecordImpl implements Record4 { - private static final long serialVersionUID = -328020269; + private static final long serialVersionUID = 1L; /** * Setter for done.v_timelength.day. @@ -210,9 +201,9 @@ public class VTimelengthRecord extends TableRecordImpl implem public VTimelengthRecord(String day, YearToSecond duration, Integer fkDone, Integer fkLogin) { super(VTimelength.V_TIMELENGTH); - set(0, day); - set(1, duration); - set(2, fkDone); - set(3, fkLogin); + setDay(day); + setDuration(duration); + setFkDone(fkDone); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java index 7fd0e69..8f58736 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VTotalofdayRecord.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VTotalofday; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.Record6; import org.jooq.Row6; @@ -17,17 +15,10 @@ import org.jooq.impl.TableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VTotalofdayRecord extends TableRecordImpl implements Record6 { - private static final long serialVersionUID = -1877583070; + private static final long serialVersionUID = 1L; /** * Setter for done.v_totalofday.breaktime. @@ -281,11 +272,11 @@ public class VTotalofdayRecord extends TableRecordImpl implem public VTotalofdayRecord(String breaktime, String worktime, String starttime, String endtime, String day, Integer fkLogin) { super(VTotalofday.V_TOTALOFDAY); - set(0, breaktime); - set(1, worktime); - set(2, starttime); - set(3, endtime); - set(4, day); - set(5, fkLogin); + setBreaktime(breaktime); + setWorktime(worktime); + setStarttime(starttime); + setEndtime(endtime); + setDay(day); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java index c061976..e4e8ed0 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/done/tables/records/VWorktimeRecord.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.done.tables.records; import de.jottyfan.timetrack.db.done.tables.VWorktime; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.Record8; import org.jooq.Row8; @@ -17,17 +15,10 @@ import org.jooq.impl.TableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VWorktimeRecord extends TableRecordImpl implements Record8 { - private static final long serialVersionUID = 647750108; + private static final long serialVersionUID = 1L; /** * Setter for done.v_worktime.day. @@ -353,13 +344,13 @@ public class VWorktimeRecord extends TableRecordImpl implements public VWorktimeRecord(String day, String duration, Double durationHours, String projectName, String moduleName, String jobName, String wp, Integer fkLogin) { super(VWorktime.V_WORKTIME); - set(0, day); - set(1, duration); - set(2, durationHours); - set(3, projectName); - set(4, moduleName); - set(5, jobName); - set(6, wp); - set(7, fkLogin); + setDay(day); + setDuration(duration); + setDurationHours(durationHours); + setProjectName(projectName); + setModuleName(moduleName); + setJobName(jobName); + setWp(wp); + setFkLogin(fkLogin); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/Indexes.java b/src/jooq/java/de/jottyfan/timetrack/db/note/Indexes.java deleted file mode 100644 index d664889..0000000 --- a/src/jooq/java/de/jottyfan/timetrack/db/note/Indexes.java +++ /dev/null @@ -1,42 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -package de.jottyfan.timetrack.db.note; - - -import de.jottyfan.timetrack.db.note.tables.TNote; - -import javax.annotation.processing.Generated; - -import org.jooq.Index; -import org.jooq.OrderField; -import org.jooq.impl.Internal; - - -/** - * A class modelling indexes of tables of the note schema. - */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Indexes { - - // ------------------------------------------------------------------------- - // INDEX definitions - // ------------------------------------------------------------------------- - - public static final Index T_NOTE_PKEY = Indexes0.T_NOTE_PKEY; - - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- - - private static class Indexes0 { - public static Index T_NOTE_PKEY = Internal.createIndex("t_note_pkey", TNote.T_NOTE, new OrderField[] { TNote.T_NOTE.PK }, true); - } -} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/Keys.java b/src/jooq/java/de/jottyfan/timetrack/db/note/Keys.java new file mode 100644 index 0000000..fc2bce8 --- /dev/null +++ b/src/jooq/java/de/jottyfan/timetrack/db/note/Keys.java @@ -0,0 +1,28 @@ +/* + * This file is generated by jOOQ. + */ +package de.jottyfan.timetrack.db.note; + + +import de.jottyfan.timetrack.db.note.tables.TNote; +import de.jottyfan.timetrack.db.note.tables.records.TNoteRecord; + +import org.jooq.TableField; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.Internal; + + +/** + * A class modelling foreign key relationships and constraints of tables in + * note. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Keys { + + // ------------------------------------------------------------------------- + // UNIQUE and PRIMARY KEY definitions + // ------------------------------------------------------------------------- + + public static final UniqueKey T_NOTE_PKEY = Internal.createUniqueKey(TNote.T_NOTE, DSL.name("t_note_pkey"), new TableField[] { TNote.T_NOTE.PK }, true); +} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/Note.java b/src/jooq/java/de/jottyfan/timetrack/db/note/Note.java index 3ba2701..9043702 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/note/Note.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/note/Note.java @@ -7,12 +7,9 @@ package de.jottyfan.timetrack.db.note; import de.jottyfan.timetrack.db.DefaultCatalog; import de.jottyfan.timetrack.db.note.tables.TNote; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Catalog; import org.jooq.Table; import org.jooq.impl.SchemaImpl; @@ -21,17 +18,10 @@ import org.jooq.impl.SchemaImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Note extends SchemaImpl { - private static final long serialVersionUID = 462162811; + private static final long serialVersionUID = 1L; /** * The reference instance of note @@ -41,7 +31,7 @@ public class Note extends SchemaImpl { /** * The table note.t_note. */ - public final TNote T_NOTE = de.jottyfan.timetrack.db.note.tables.TNote.T_NOTE; + public final TNote T_NOTE = TNote.T_NOTE; /** * No further instances allowed @@ -58,12 +48,6 @@ public class Note extends SchemaImpl { @Override public final List> getTables() { - List result = new ArrayList(); - result.addAll(getTables0()); - return result; - } - - private final List> getTables0() { return Arrays.>asList( TNote.T_NOTE); } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/Tables.java b/src/jooq/java/de/jottyfan/timetrack/db/note/Tables.java index 10a9ebe..5e0d6f7 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/note/Tables.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/note/Tables.java @@ -6,19 +6,10 @@ package de.jottyfan.timetrack.db.note; import de.jottyfan.timetrack.db.note.tables.TNote; -import javax.annotation.processing.Generated; - /** - * Convenience access to all tables in note + * Convenience access to all tables in note. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java b/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java index 0d3af5e..4fc2f8f 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumCategory.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.note.enums; import de.jottyfan.timetrack.db.note.Note; -import javax.annotation.processing.Generated; - import org.jooq.Catalog; import org.jooq.EnumType; import org.jooq.Schema; @@ -16,13 +14,6 @@ import org.jooq.Schema; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public enum EnumCategory implements EnumType { @@ -50,7 +41,7 @@ public enum EnumCategory implements EnumType { @Override public Catalog getCatalog() { - return getSchema() == null ? null : getSchema().getCatalog(); + return getSchema().getCatalog(); } @Override diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java b/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java index 9b9e250..5149106 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/note/enums/EnumNotetype.java @@ -6,8 +6,6 @@ package de.jottyfan.timetrack.db.note.enums; import de.jottyfan.timetrack.db.note.Note; -import javax.annotation.processing.Generated; - import org.jooq.Catalog; import org.jooq.EnumType; import org.jooq.Schema; @@ -16,13 +14,6 @@ import org.jooq.Schema; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public enum EnumNotetype implements EnumType { @@ -38,7 +29,7 @@ public enum EnumNotetype implements EnumType { @Override public Catalog getCatalog() { - return getSchema() == null ? null : getSchema().getCatalog(); + return getSchema().getCatalog(); } @Override diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/tables/TNote.java b/src/jooq/java/de/jottyfan/timetrack/db/note/tables/TNote.java index 5181695..a9d2d05 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/note/tables/TNote.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/note/tables/TNote.java @@ -4,45 +4,39 @@ package de.jottyfan.timetrack.db.note.tables; -import de.jottyfan.timetrack.db.note.Indexes; +import de.jottyfan.timetrack.db.note.Keys; import de.jottyfan.timetrack.db.note.Note; import de.jottyfan.timetrack.db.note.enums.EnumCategory; import de.jottyfan.timetrack.db.note.enums.EnumNotetype; import de.jottyfan.timetrack.db.note.tables.records.TNoteRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row6; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TNote extends TableImpl { - private static final long serialVersionUID = -601146141; + private static final long serialVersionUID = 1L; /** * The reference instance of note.t_note @@ -60,38 +54,39 @@ public class TNote extends TableImpl { /** * The column note.t_note.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column note.t_note.title. */ - public final TableField TITLE = createField(DSL.name("title"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField TITLE = createField(DSL.name("title"), SQLDataType.CLOB, this, ""); /** * The column note.t_note.category. */ - public final TableField CATEGORY = createField(DSL.name("category"), org.jooq.impl.SQLDataType.VARCHAR.asEnumDataType(de.jottyfan.timetrack.db.note.enums.EnumCategory.class), this, ""); + public final TableField CATEGORY = createField(DSL.name("category"), SQLDataType.VARCHAR.asEnumDataType(de.jottyfan.timetrack.db.note.enums.EnumCategory.class), this, ""); /** * The column note.t_note.notetype. */ - public final TableField NOTETYPE = createField(DSL.name("notetype"), org.jooq.impl.SQLDataType.VARCHAR.asEnumDataType(de.jottyfan.timetrack.db.note.enums.EnumNotetype.class), this, ""); + public final TableField NOTETYPE = createField(DSL.name("notetype"), SQLDataType.VARCHAR.asEnumDataType(de.jottyfan.timetrack.db.note.enums.EnumNotetype.class), this, ""); /** * The column note.t_note.content. */ - public final TableField CONTENT = createField(DSL.name("content"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField CONTENT = createField(DSL.name("content"), SQLDataType.CLOB, this, ""); /** * The column note.t_note.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); - /** - * Create a note.t_note table reference - */ - public TNote() { - this(DSL.name("t_note"), null); + private TNote(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TNote(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -108,12 +103,11 @@ public class TNote extends TableImpl { this(alias, T_NOTE); } - private TNote(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TNote(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a note.t_note table reference + */ + public TNote() { + this(DSL.name("t_note"), null); } public TNote(Table child, ForeignKey key) { @@ -126,8 +120,18 @@ public class TNote extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_NOTE_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_NOTE_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_NOTE_PKEY); } @Override @@ -161,7 +165,7 @@ public class TNote extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java index 4ea0623..7025d59 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/note/tables/records/TNoteRecord.java @@ -8,30 +8,22 @@ import de.jottyfan.timetrack.db.note.enums.EnumCategory; import de.jottyfan.timetrack.db.note.enums.EnumNotetype; import de.jottyfan.timetrack.db.note.tables.TNote; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record6; import org.jooq.Row6; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TNoteRecord extends TableRecordImpl implements Record6 { +public class TNoteRecord extends UpdatableRecordImpl implements Record6 { - private static final long serialVersionUID = 828107821; + private static final long serialVersionUID = 1L; /** * Setter for note.t_note.pk. @@ -106,15 +98,24 @@ public class TNoteRecord extends TableRecordImpl implements Record6 /** * Setter for note.t_note.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(5, value); } /** * Getter for note.t_note.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(5); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(5); + } + + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); } // ------------------------------------------------------------------------- @@ -122,12 +123,12 @@ public class TNoteRecord extends TableRecordImpl implements Record6 // ------------------------------------------------------------------------- @Override - public Row6 fieldsRow() { + public Row6 fieldsRow() { return (Row6) super.fieldsRow(); } @Override - public Row6 valuesRow() { + public Row6 valuesRow() { return (Row6) super.valuesRow(); } @@ -157,7 +158,7 @@ public class TNoteRecord extends TableRecordImpl implements Record6 } @Override - public Field field6() { + public Field field6() { return TNote.T_NOTE.LASTCHANGE; } @@ -187,7 +188,7 @@ public class TNoteRecord extends TableRecordImpl implements Record6 } @Override - public Timestamp component6() { + public LocalDateTime component6() { return getLastchange(); } @@ -217,7 +218,7 @@ public class TNoteRecord extends TableRecordImpl implements Record6 } @Override - public Timestamp value6() { + public LocalDateTime value6() { return getLastchange(); } @@ -252,13 +253,13 @@ public class TNoteRecord extends TableRecordImpl implements Record6 } @Override - public TNoteRecord value6(Timestamp value) { + public TNoteRecord value6(LocalDateTime value) { setLastchange(value); return this; } @Override - public TNoteRecord values(Integer value1, String value2, EnumCategory value3, EnumNotetype value4, String value5, Timestamp value6) { + public TNoteRecord values(Integer value1, String value2, EnumCategory value3, EnumNotetype value4, String value5, LocalDateTime value6) { value1(value1); value2(value2); value3(value3); @@ -282,14 +283,14 @@ public class TNoteRecord extends TableRecordImpl implements Record6 /** * Create a detached, initialised TNoteRecord */ - public TNoteRecord(Integer pk, String title, EnumCategory category, EnumNotetype notetype, String content, Timestamp lastchange) { + public TNoteRecord(Integer pk, String title, EnumCategory category, EnumNotetype notetype, String content, LocalDateTime lastchange) { super(TNote.T_NOTE); - set(0, pk); - set(1, title); - set(2, category); - set(3, notetype); - set(4, content); - set(5, lastchange); + setPk(pk); + setTitle(title); + setCategory(category); + setNotetype(notetype); + setContent(content); + setLastchange(lastchange); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/Indexes.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/Indexes.java deleted file mode 100644 index 52ddabe..0000000 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/Indexes.java +++ /dev/null @@ -1,54 +0,0 @@ -/* - * This file is generated by jOOQ. - */ -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.TRole; - -import javax.annotation.processing.Generated; - -import org.jooq.Index; -import org.jooq.OrderField; -import org.jooq.impl.Internal; - - -/** - * A class modelling indexes of tables of the profile schema. - */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) -@SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class Indexes { - - // ------------------------------------------------------------------------- - // INDEX definitions - // ------------------------------------------------------------------------- - - public static final Index T_LOGIN_LOGIN_KEY = Indexes0.T_LOGIN_LOGIN_KEY; - public static final Index T_LOGIN_PKEY = Indexes0.T_LOGIN_PKEY; - public static final Index T_LOGINROLE_FK_LOGIN_FK_ROLE_KEY = Indexes0.T_LOGINROLE_FK_LOGIN_FK_ROLE_KEY; - public static final Index T_LOGINROLE_PKEY = Indexes0.T_LOGINROLE_PKEY; - public static final Index T_ROLE_NAME_KEY = Indexes0.T_ROLE_NAME_KEY; - public static final Index T_ROLE_PKEY = Indexes0.T_ROLE_PKEY; - - // ------------------------------------------------------------------------- - // [#1459] distribute members to avoid static initialisers > 64kb - // ------------------------------------------------------------------------- - - private static class Indexes0 { - public static Index T_LOGIN_LOGIN_KEY = Internal.createIndex("t_login_login_key", TLogin.T_LOGIN, new OrderField[] { TLogin.T_LOGIN.LOGIN }, true); - public static Index T_LOGIN_PKEY = Internal.createIndex("t_login_pkey", TLogin.T_LOGIN, new OrderField[] { TLogin.T_LOGIN.PK }, true); - public static Index T_LOGINROLE_FK_LOGIN_FK_ROLE_KEY = Internal.createIndex("t_loginrole_fk_login_fk_role_key", TLoginrole.T_LOGINROLE, new OrderField[] { TLoginrole.T_LOGINROLE.FK_LOGIN, TLoginrole.T_LOGINROLE.FK_ROLE }, true); - public static Index T_LOGINROLE_PKEY = Internal.createIndex("t_loginrole_pkey", TLoginrole.T_LOGINROLE, new OrderField[] { TLoginrole.T_LOGINROLE.PK }, true); - public static Index T_ROLE_NAME_KEY = Internal.createIndex("t_role_name_key", TRole.T_ROLE, new OrderField[] { TRole.T_ROLE.NAME }, true); - public static Index T_ROLE_PKEY = Internal.createIndex("t_role_pkey", TRole.T_ROLE, new OrderField[] { TRole.T_ROLE.PK }, true); - } -} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/Keys.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/Keys.java new file mode 100644 index 0000000..f2fee5f --- /dev/null +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/Keys.java @@ -0,0 +1,45 @@ +/* + * This file is generated by jOOQ. + */ +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.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.TRoleRecord; + +import org.jooq.ForeignKey; +import org.jooq.TableField; +import org.jooq.UniqueKey; +import org.jooq.impl.DSL; +import org.jooq.impl.Internal; + + +/** + * A class modelling foreign key relationships and constraints of tables in + * profile. + */ +@SuppressWarnings({ "all", "unchecked", "rawtypes" }) +public class Keys { + + // ------------------------------------------------------------------------- + // UNIQUE and PRIMARY KEY definitions + // ------------------------------------------------------------------------- + + public static final UniqueKey T_LOGIN_LOGIN_KEY = Internal.createUniqueKey(TLogin.T_LOGIN, DSL.name("t_login_login_key"), new TableField[] { TLogin.T_LOGIN.LOGIN }, true); + 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_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); + + // ------------------------------------------------------------------------- + // FOREIGN KEY definitions + // ------------------------------------------------------------------------- + + public static final ForeignKey T_LOGINROLE__T_LOGINROLE_FK_LOGIN_FKEY = Internal.createForeignKey(TLoginrole.T_LOGINROLE, DSL.name("t_loginrole_fk_login_fkey"), new TableField[] { TLoginrole.T_LOGINROLE.FK_LOGIN }, Keys.T_LOGIN_PKEY, new TableField[] { TLogin.T_LOGIN.PK }, true); + public static final ForeignKey T_LOGINROLE__T_LOGINROLE_FK_ROLE_FKEY = Internal.createForeignKey(TLoginrole.T_LOGINROLE, DSL.name("t_loginrole_fk_role_fkey"), new TableField[] { TLoginrole.T_LOGINROLE.FK_ROLE }, Keys.T_ROLE_PKEY, new TableField[] { TRole.T_ROLE.PK }, true); +} diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/Profile.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/Profile.java index 927b548..7232f71 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/Profile.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/Profile.java @@ -10,12 +10,9 @@ import de.jottyfan.timetrack.db.profile.tables.TLoginrole; import de.jottyfan.timetrack.db.profile.tables.TRole; import de.jottyfan.timetrack.db.profile.tables.VLoginrole; -import java.util.ArrayList; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Catalog; import org.jooq.Table; import org.jooq.impl.SchemaImpl; @@ -24,17 +21,10 @@ import org.jooq.impl.SchemaImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Profile extends SchemaImpl { - private static final long serialVersionUID = -215060084; + private static final long serialVersionUID = 1L; /** * The reference instance of profile @@ -44,22 +34,22 @@ public class Profile extends SchemaImpl { /** * The table profile.t_login. */ - public final TLogin T_LOGIN = de.jottyfan.timetrack.db.profile.tables.TLogin.T_LOGIN; + public final TLogin T_LOGIN = TLogin.T_LOGIN; /** * The table profile.t_loginrole. */ - public final TLoginrole T_LOGINROLE = de.jottyfan.timetrack.db.profile.tables.TLoginrole.T_LOGINROLE; + public final TLoginrole T_LOGINROLE = TLoginrole.T_LOGINROLE; /** * The table profile.t_role. */ - public final TRole T_ROLE = de.jottyfan.timetrack.db.profile.tables.TRole.T_ROLE; + public final TRole T_ROLE = TRole.T_ROLE; /** * The table profile.v_loginrole. */ - public final VLoginrole V_LOGINROLE = de.jottyfan.timetrack.db.profile.tables.VLoginrole.V_LOGINROLE; + public final VLoginrole V_LOGINROLE = VLoginrole.V_LOGINROLE; /** * No further instances allowed @@ -76,12 +66,6 @@ public class Profile extends SchemaImpl { @Override public final List> getTables() { - List result = new ArrayList(); - result.addAll(getTables0()); - return result; - } - - private final List> getTables0() { return Arrays.>asList( TLogin.T_LOGIN, TLoginrole.T_LOGINROLE, diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/Tables.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/Tables.java index 5bf61ea..65898c0 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/Tables.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/Tables.java @@ -9,19 +9,10 @@ import de.jottyfan.timetrack.db.profile.tables.TLoginrole; import de.jottyfan.timetrack.db.profile.tables.TRole; import de.jottyfan.timetrack.db.profile.tables.VLoginrole; -import javax.annotation.processing.Generated; - /** - * Convenience access to all tables in profile + * Convenience access to all tables in profile. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Tables { diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java index 5cbf76a..292e904 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLogin.java @@ -4,43 +4,37 @@ package de.jottyfan.timetrack.db.profile.tables; -import de.jottyfan.timetrack.db.profile.Indexes; +import de.jottyfan.timetrack.db.profile.Keys; import de.jottyfan.timetrack.db.profile.Profile; import de.jottyfan.timetrack.db.profile.tables.records.TLoginRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row7; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TLogin extends TableImpl { - private static final long serialVersionUID = 2055988705; + private static final long serialVersionUID = 1L; /** * The reference instance of profile.t_login @@ -58,43 +52,44 @@ public class TLogin extends TableImpl { /** * The column profile.t_login.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); /** * The column profile.t_login.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column profile.t_login.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB.nullable(false), this, ""); /** * The column profile.t_login.forename. */ - public final TableField FORENAME = createField(DSL.name("forename"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField FORENAME = createField(DSL.name("forename"), SQLDataType.CLOB, this, ""); /** * The column profile.t_login.surname. */ - public final TableField SURNAME = createField(DSL.name("surname"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField SURNAME = createField(DSL.name("surname"), SQLDataType.CLOB, this, ""); /** * The column profile.t_login.duedate. */ - public final TableField DUEDATE = createField(DSL.name("duedate"), org.jooq.impl.SQLDataType.TIMESTAMP.nullable(false), this, ""); + public final TableField DUEDATE = createField(DSL.name("duedate"), SQLDataType.LOCALDATETIME(6).nullable(false), this, ""); /** * The column profile.t_login.password. */ - public final TableField PASSWORD = createField(DSL.name("password"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField PASSWORD = createField(DSL.name("password"), SQLDataType.CLOB.nullable(false), this, ""); - /** - * Create a profile.t_login table reference - */ - public TLogin() { - this(DSL.name("t_login"), null); + private TLogin(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TLogin(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -111,12 +106,11 @@ public class TLogin extends TableImpl { this(alias, T_LOGIN); } - private TLogin(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TLogin(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a profile.t_login table reference + */ + public TLogin() { + this(DSL.name("t_login"), null); } public TLogin(Table child, ForeignKey key) { @@ -129,8 +123,18 @@ public class TLogin extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_LOGIN_LOGIN_KEY, Indexes.T_LOGIN_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_LOGIN_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_LOGIN_PKEY, Keys.T_LOGIN_LOGIN_KEY); } @Override @@ -164,7 +168,7 @@ public class TLogin extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java index 311c2b4..dd37b72 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TLoginrole.java @@ -4,43 +4,37 @@ package de.jottyfan.timetrack.db.profile.tables; -import de.jottyfan.timetrack.db.profile.Indexes; +import de.jottyfan.timetrack.db.profile.Keys; import de.jottyfan.timetrack.db.profile.Profile; import de.jottyfan.timetrack.db.profile.tables.records.TLoginroleRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row4; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TLoginrole extends TableImpl { - private static final long serialVersionUID = 404673647; + private static final long serialVersionUID = 1L; /** * The reference instance of profile.t_loginrole @@ -58,28 +52,29 @@ public class TLoginrole extends TableImpl { /** * The column profile.t_loginrole.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); /** * The column profile.t_loginrole.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column profile.t_loginrole.fk_login. */ - public final TableField FK_LOGIN = createField(DSL.name("fk_login"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER.nullable(false), this, ""); /** * The column profile.t_loginrole.fk_role. */ - public final TableField FK_ROLE = createField(DSL.name("fk_role"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField FK_ROLE = createField(DSL.name("fk_role"), SQLDataType.INTEGER.nullable(false), this, ""); - /** - * Create a profile.t_loginrole table reference - */ - public TLoginrole() { - this(DSL.name("t_loginrole"), null); + private TLoginrole(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TLoginrole(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -96,12 +91,11 @@ public class TLoginrole extends TableImpl { this(alias, T_LOGINROLE); } - private TLoginrole(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TLoginrole(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a profile.t_loginrole table reference + */ + public TLoginrole() { + this(DSL.name("t_loginrole"), null); } public TLoginrole(Table child, ForeignKey key) { @@ -114,8 +108,31 @@ public class TLoginrole extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_LOGINROLE_FK_LOGIN_FK_ROLE_KEY, Indexes.T_LOGINROLE_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_LOGINROLE_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_LOGINROLE_PKEY, Keys.T_LOGINROLE_FK_LOGIN_FK_ROLE_KEY); + } + + @Override + public List> getReferences() { + return Arrays.>asList(Keys.T_LOGINROLE__T_LOGINROLE_FK_LOGIN_FKEY, Keys.T_LOGINROLE__T_LOGINROLE_FK_ROLE_FKEY); + } + + public TLogin tLogin() { + return new TLogin(this, Keys.T_LOGINROLE__T_LOGINROLE_FK_LOGIN_FKEY); + } + + public TRole tRole() { + return new TRole(this, Keys.T_LOGINROLE__T_LOGINROLE_FK_ROLE_FKEY); } @Override @@ -149,7 +166,7 @@ public class TLoginrole extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TRole.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TRole.java index 11e43ad..44a51b6 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TRole.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/TRole.java @@ -4,43 +4,37 @@ package de.jottyfan.timetrack.db.profile.tables; -import de.jottyfan.timetrack.db.profile.Indexes; +import de.jottyfan.timetrack.db.profile.Keys; import de.jottyfan.timetrack.db.profile.Profile; import de.jottyfan.timetrack.db.profile.tables.records.TRoleRecord; -import java.sql.Timestamp; +import java.time.LocalDateTime; import java.util.Arrays; import java.util.List; -import javax.annotation.processing.Generated; - import org.jooq.Field; import org.jooq.ForeignKey; -import org.jooq.Index; +import org.jooq.Identity; import org.jooq.Name; import org.jooq.Record; import org.jooq.Row3; import org.jooq.Schema; 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. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class TRole extends TableImpl { - private static final long serialVersionUID = -1967676639; + private static final long serialVersionUID = 1L; /** * The reference instance of profile.t_role @@ -58,23 +52,24 @@ public class TRole extends TableImpl { /** * The column profile.t_role.lastchange. */ - public final TableField LASTCHANGE = createField(DSL.name("lastchange"), org.jooq.impl.SQLDataType.TIMESTAMP.defaultValue(org.jooq.impl.DSL.field("now()", org.jooq.impl.SQLDataType.TIMESTAMP)), this, ""); + public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field("now()", SQLDataType.LOCALDATETIME)), this, ""); /** * The column profile.t_role.pk. */ - public final TableField PK = createField(DSL.name("pk"), org.jooq.impl.SQLDataType.INTEGER.nullable(false), this, ""); + public final TableField PK = createField(DSL.name("pk"), SQLDataType.INTEGER.nullable(false).identity(true), this, ""); /** * The column profile.t_role.name. */ - public final TableField NAME = createField(DSL.name("name"), org.jooq.impl.SQLDataType.CLOB.nullable(false), this, ""); + public final TableField NAME = createField(DSL.name("name"), SQLDataType.CLOB.nullable(false), this, ""); - /** - * Create a profile.t_role table reference - */ - public TRole() { - this(DSL.name("t_role"), null); + private TRole(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private TRole(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table()); } /** @@ -91,12 +86,11 @@ public class TRole extends TableImpl { this(alias, T_ROLE); } - private TRole(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private TRole(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a profile.t_role table reference + */ + public TRole() { + this(DSL.name("t_role"), null); } public TRole(Table child, ForeignKey key) { @@ -109,8 +103,18 @@ public class TRole extends TableImpl { } @Override - public List getIndexes() { - return Arrays.asList(Indexes.T_ROLE_NAME_KEY, Indexes.T_ROLE_PKEY); + public Identity getIdentity() { + return (Identity) super.getIdentity(); + } + + @Override + public UniqueKey getPrimaryKey() { + return Keys.T_ROLE_PKEY; + } + + @Override + public List> getKeys() { + return Arrays.>asList(Keys.T_ROLE_PKEY, Keys.T_ROLE_NAME_KEY); } @Override @@ -144,7 +148,7 @@ public class TRole extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java index 224c3d5..2d2ffca 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/VLoginrole.java @@ -7,9 +7,7 @@ package de.jottyfan.timetrack.db.profile.tables; import de.jottyfan.timetrack.db.profile.Profile; import de.jottyfan.timetrack.db.profile.tables.records.VLoginroleRecord; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; import org.jooq.ForeignKey; @@ -19,24 +17,19 @@ import org.jooq.Row5; import org.jooq.Schema; import org.jooq.Table; import org.jooq.TableField; +import org.jooq.TableOptions; import org.jooq.impl.DSL; +import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class VLoginrole extends TableImpl { - private static final long serialVersionUID = -1240355347; + private static final long serialVersionUID = 1L; /** * The reference instance of profile.v_loginrole @@ -54,33 +47,34 @@ public class VLoginrole extends TableImpl { /** * The column profile.v_loginrole.login. */ - public final TableField LOGIN = createField(DSL.name("login"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField LOGIN = createField(DSL.name("login"), SQLDataType.CLOB, this, ""); /** * The column profile.v_loginrole.forename. */ - public final TableField FORENAME = createField(DSL.name("forename"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField FORENAME = createField(DSL.name("forename"), SQLDataType.CLOB, this, ""); /** * The column profile.v_loginrole.surname. */ - public final TableField SURNAME = createField(DSL.name("surname"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField SURNAME = createField(DSL.name("surname"), SQLDataType.CLOB, this, ""); /** * The column profile.v_loginrole.duedate. */ - public final TableField DUEDATE = createField(DSL.name("duedate"), org.jooq.impl.SQLDataType.TIMESTAMP, this, ""); + public final TableField DUEDATE = createField(DSL.name("duedate"), SQLDataType.LOCALDATETIME(6), this, ""); /** * The column profile.v_loginrole.role_name. */ - public final TableField ROLE_NAME = createField(DSL.name("role_name"), org.jooq.impl.SQLDataType.CLOB, this, ""); + public final TableField ROLE_NAME = createField(DSL.name("role_name"), SQLDataType.CLOB, this, ""); - /** - * Create a profile.v_loginrole table reference - */ - public VLoginrole() { - this(DSL.name("v_loginrole"), null); + private VLoginrole(Name alias, Table aliased) { + this(alias, aliased, null); + } + + private VLoginrole(Name alias, Table aliased, Field[] parameters) { + super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view()); } /** @@ -97,12 +91,11 @@ public class VLoginrole extends TableImpl { this(alias, V_LOGINROLE); } - private VLoginrole(Name alias, Table aliased) { - this(alias, aliased, null); - } - - private VLoginrole(Name alias, Table aliased, Field[] parameters) { - super(alias, null, aliased, parameters, DSL.comment("")); + /** + * Create a profile.v_loginrole table reference + */ + public VLoginrole() { + this(DSL.name("v_loginrole"), null); } public VLoginrole(Table child, ForeignKey key) { @@ -145,7 +138,7 @@ public class VLoginrole extends TableImpl { // ------------------------------------------------------------------------- @Override - public Row5 fieldsRow() { + public Row5 fieldsRow() { return (Row5) super.fieldsRow(); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java index 36c6644..fc223ab 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginRecord.java @@ -6,43 +6,35 @@ package de.jottyfan.timetrack.db.profile.tables.records; import de.jottyfan.timetrack.db.profile.tables.TLogin; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record7; import org.jooq.Row7; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TLoginRecord extends TableRecordImpl implements Record7 { +public class TLoginRecord extends UpdatableRecordImpl implements Record7 { - private static final long serialVersionUID = 386473188; + private static final long serialVersionUID = 1L; /** * Setter for profile.t_login.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(0, value); } /** * Getter for profile.t_login.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(0); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); } /** @@ -104,15 +96,15 @@ public class TLoginRecord extends TableRecordImpl implements Recor /** * Setter for profile.t_login.duedate. */ - public void setDuedate(Timestamp value) { + public void setDuedate(LocalDateTime value) { set(5, value); } /** * Getter for profile.t_login.duedate. */ - public Timestamp getDuedate() { - return (Timestamp) get(5); + public LocalDateTime getDuedate() { + return (LocalDateTime) get(5); } /** @@ -129,22 +121,31 @@ public class TLoginRecord extends TableRecordImpl implements Recor return (String) get(6); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record7 type implementation // ------------------------------------------------------------------------- @Override - public Row7 fieldsRow() { + public Row7 fieldsRow() { return (Row7) super.fieldsRow(); } @Override - public Row7 valuesRow() { + public Row7 valuesRow() { return (Row7) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return TLogin.T_LOGIN.LASTCHANGE; } @@ -169,7 +170,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public Field field6() { + public Field field6() { return TLogin.T_LOGIN.DUEDATE; } @@ -179,7 +180,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public Timestamp component1() { + public LocalDateTime component1() { return getLastchange(); } @@ -204,7 +205,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public Timestamp component6() { + public LocalDateTime component6() { return getDuedate(); } @@ -214,7 +215,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public Timestamp value1() { + public LocalDateTime value1() { return getLastchange(); } @@ -239,7 +240,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public Timestamp value6() { + public LocalDateTime value6() { return getDuedate(); } @@ -249,7 +250,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public TLoginRecord value1(Timestamp value) { + public TLoginRecord value1(LocalDateTime value) { setLastchange(value); return this; } @@ -279,7 +280,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public TLoginRecord value6(Timestamp value) { + public TLoginRecord value6(LocalDateTime value) { setDuedate(value); return this; } @@ -291,7 +292,7 @@ public class TLoginRecord extends TableRecordImpl implements Recor } @Override - public TLoginRecord values(Timestamp value1, Integer value2, String value3, String value4, String value5, Timestamp value6, String value7) { + public TLoginRecord values(LocalDateTime value1, Integer value2, String value3, String value4, String value5, LocalDateTime value6, String value7) { value1(value1); value2(value2); value3(value3); @@ -316,15 +317,15 @@ public class TLoginRecord extends TableRecordImpl implements Recor /** * Create a detached, initialised TLoginRecord */ - public TLoginRecord(Timestamp lastchange, Integer pk, String login, String forename, String surname, Timestamp duedate, String password) { + public TLoginRecord(LocalDateTime lastchange, Integer pk, String login, String forename, String surname, LocalDateTime duedate, String password) { super(TLogin.T_LOGIN); - set(0, lastchange); - set(1, pk); - set(2, login); - set(3, forename); - set(4, surname); - set(5, duedate); - set(6, password); + setLastchange(lastchange); + setPk(pk); + setLogin(login); + setForename(forename); + setSurname(surname); + setDuedate(duedate); + setPassword(password); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java index f76f392..a690d68 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TLoginroleRecord.java @@ -6,43 +6,35 @@ package de.jottyfan.timetrack.db.profile.tables.records; import de.jottyfan.timetrack.db.profile.tables.TLoginrole; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record4; import org.jooq.Row4; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TLoginroleRecord extends TableRecordImpl implements Record4 { +public class TLoginroleRecord extends UpdatableRecordImpl implements Record4 { - private static final long serialVersionUID = -986073453; + private static final long serialVersionUID = 1L; /** * Setter for profile.t_loginrole.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(0, value); } /** * Getter for profile.t_loginrole.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(0); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); } /** @@ -87,22 +79,31 @@ public class TLoginroleRecord extends TableRecordImpl implemen return (Integer) get(3); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record4 type implementation // ------------------------------------------------------------------------- @Override - public Row4 fieldsRow() { + public Row4 fieldsRow() { return (Row4) super.fieldsRow(); } @Override - public Row4 valuesRow() { + public Row4 valuesRow() { return (Row4) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return TLoginrole.T_LOGINROLE.LASTCHANGE; } @@ -122,7 +123,7 @@ public class TLoginroleRecord extends TableRecordImpl implemen } @Override - public Timestamp component1() { + public LocalDateTime component1() { return getLastchange(); } @@ -142,7 +143,7 @@ public class TLoginroleRecord extends TableRecordImpl implemen } @Override - public Timestamp value1() { + public LocalDateTime value1() { return getLastchange(); } @@ -162,7 +163,7 @@ public class TLoginroleRecord extends TableRecordImpl implemen } @Override - public TLoginroleRecord value1(Timestamp value) { + public TLoginroleRecord value1(LocalDateTime value) { setLastchange(value); return this; } @@ -186,7 +187,7 @@ public class TLoginroleRecord extends TableRecordImpl implemen } @Override - public TLoginroleRecord values(Timestamp value1, Integer value2, Integer value3, Integer value4) { + public TLoginroleRecord values(LocalDateTime value1, Integer value2, Integer value3, Integer value4) { value1(value1); value2(value2); value3(value3); @@ -208,12 +209,12 @@ public class TLoginroleRecord extends TableRecordImpl implemen /** * Create a detached, initialised TLoginroleRecord */ - public TLoginroleRecord(Timestamp lastchange, Integer pk, Integer fkLogin, Integer fkRole) { + public TLoginroleRecord(LocalDateTime lastchange, Integer pk, Integer fkLogin, Integer fkRole) { super(TLoginrole.T_LOGINROLE); - set(0, lastchange); - set(1, pk); - set(2, fkLogin); - set(3, fkRole); + setLastchange(lastchange); + setPk(pk); + setFkLogin(fkLogin); + setFkRole(fkRole); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java index 613eb2c..95e6613 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/TRoleRecord.java @@ -6,43 +6,35 @@ package de.jottyfan.timetrack.db.profile.tables.records; import de.jottyfan.timetrack.db.profile.tables.TRole; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; +import org.jooq.Record1; import org.jooq.Record3; import org.jooq.Row3; -import org.jooq.impl.TableRecordImpl; +import org.jooq.impl.UpdatableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class TRoleRecord extends TableRecordImpl implements Record3 { +public class TRoleRecord extends UpdatableRecordImpl implements Record3 { - private static final long serialVersionUID = -1034367197; + private static final long serialVersionUID = 1L; /** * Setter for profile.t_role.lastchange. */ - public void setLastchange(Timestamp value) { + public void setLastchange(LocalDateTime value) { set(0, value); } /** * Getter for profile.t_role.lastchange. */ - public Timestamp getLastchange() { - return (Timestamp) get(0); + public LocalDateTime getLastchange() { + return (LocalDateTime) get(0); } /** @@ -73,22 +65,31 @@ public class TRoleRecord extends TableRecordImpl implements Record3 return (String) get(2); } + // ------------------------------------------------------------------------- + // Primary key information + // ------------------------------------------------------------------------- + + @Override + public Record1 key() { + return (Record1) super.key(); + } + // ------------------------------------------------------------------------- // Record3 type implementation // ------------------------------------------------------------------------- @Override - public Row3 fieldsRow() { + public Row3 fieldsRow() { return (Row3) super.fieldsRow(); } @Override - public Row3 valuesRow() { + public Row3 valuesRow() { return (Row3) super.valuesRow(); } @Override - public Field field1() { + public Field field1() { return TRole.T_ROLE.LASTCHANGE; } @@ -103,7 +104,7 @@ public class TRoleRecord extends TableRecordImpl implements Record3 } @Override - public Timestamp component1() { + public LocalDateTime component1() { return getLastchange(); } @@ -118,7 +119,7 @@ public class TRoleRecord extends TableRecordImpl implements Record3 } @Override - public Timestamp value1() { + public LocalDateTime value1() { return getLastchange(); } @@ -133,7 +134,7 @@ public class TRoleRecord extends TableRecordImpl implements Record3 } @Override - public TRoleRecord value1(Timestamp value) { + public TRoleRecord value1(LocalDateTime value) { setLastchange(value); return this; } @@ -151,7 +152,7 @@ public class TRoleRecord extends TableRecordImpl implements Record3 } @Override - public TRoleRecord values(Timestamp value1, Integer value2, String value3) { + public TRoleRecord values(LocalDateTime value1, Integer value2, String value3) { value1(value1); value2(value2); value3(value3); @@ -172,11 +173,11 @@ public class TRoleRecord extends TableRecordImpl implements Record3 /** * Create a detached, initialised TRoleRecord */ - public TRoleRecord(Timestamp lastchange, Integer pk, String name) { + public TRoleRecord(LocalDateTime lastchange, Integer pk, String name) { super(TRole.T_ROLE); - set(0, lastchange); - set(1, pk); - set(2, name); + setLastchange(lastchange); + setPk(pk); + setName(name); } } diff --git a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java index 93cd809..50b8ac4 100644 --- a/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java +++ b/src/jooq/java/de/jottyfan/timetrack/db/profile/tables/records/VLoginroleRecord.java @@ -6,9 +6,7 @@ package de.jottyfan.timetrack.db.profile.tables.records; import de.jottyfan.timetrack.db.profile.tables.VLoginrole; -import java.sql.Timestamp; - -import javax.annotation.processing.Generated; +import java.time.LocalDateTime; import org.jooq.Field; import org.jooq.Record5; @@ -19,17 +17,10 @@ import org.jooq.impl.TableRecordImpl; /** * This class is generated by jOOQ. */ -@Generated( - value = { - "http://www.jooq.org", - "jOOQ version:3.12.1" - }, - comments = "This class is generated by jOOQ" -) @SuppressWarnings({ "all", "unchecked", "rawtypes" }) -public class VLoginroleRecord extends TableRecordImpl implements Record5 { +public class VLoginroleRecord extends TableRecordImpl implements Record5 { - private static final long serialVersionUID = 332588237; + private static final long serialVersionUID = 1L; /** * Setter for profile.v_loginrole.login. @@ -76,15 +67,15 @@ public class VLoginroleRecord extends TableRecordImpl implemen /** * Setter for profile.v_loginrole.duedate. */ - public void setDuedate(Timestamp value) { + public void setDuedate(LocalDateTime value) { set(3, value); } /** * Getter for profile.v_loginrole.duedate. */ - public Timestamp getDuedate() { - return (Timestamp) get(3); + public LocalDateTime getDuedate() { + return (LocalDateTime) get(3); } /** @@ -106,12 +97,12 @@ public class VLoginroleRecord extends TableRecordImpl implemen // ------------------------------------------------------------------------- @Override - public Row5 fieldsRow() { + public Row5 fieldsRow() { return (Row5) super.fieldsRow(); } @Override - public Row5 valuesRow() { + public Row5 valuesRow() { return (Row5) super.valuesRow(); } @@ -131,7 +122,7 @@ public class VLoginroleRecord extends TableRecordImpl implemen } @Override - public Field field4() { + public Field field4() { return VLoginrole.V_LOGINROLE.DUEDATE; } @@ -156,7 +147,7 @@ public class VLoginroleRecord extends TableRecordImpl implemen } @Override - public Timestamp component4() { + public LocalDateTime component4() { return getDuedate(); } @@ -181,7 +172,7 @@ public class VLoginroleRecord extends TableRecordImpl implemen } @Override - public Timestamp value4() { + public LocalDateTime value4() { return getDuedate(); } @@ -209,7 +200,7 @@ public class VLoginroleRecord extends TableRecordImpl implemen } @Override - public VLoginroleRecord value4(Timestamp value) { + public VLoginroleRecord value4(LocalDateTime value) { setDuedate(value); return this; } @@ -221,7 +212,7 @@ public class VLoginroleRecord extends TableRecordImpl implemen } @Override - public VLoginroleRecord values(String value1, String value2, String value3, Timestamp value4, String value5) { + public VLoginroleRecord values(String value1, String value2, String value3, LocalDateTime value4, String value5) { value1(value1); value2(value2); value3(value3); @@ -244,13 +235,13 @@ public class VLoginroleRecord extends TableRecordImpl implemen /** * Create a detached, initialised VLoginroleRecord */ - public VLoginroleRecord(String login, String forename, String surname, Timestamp duedate, String roleName) { + public VLoginroleRecord(String login, String forename, String surname, LocalDateTime duedate, String roleName) { super(VLoginrole.V_LOGINROLE); - set(0, login); - set(1, forename); - set(2, surname); - set(3, duedate); - set(4, roleName); + setLogin(login); + setForename(forename); + setSurname(surname); + setDuedate(duedate); + setRoleName(roleName); } } diff --git a/src/main/java/de/jooqfaces/EJooqFacesApplicationScope.java b/src/main/java/de/jooqfaces/EJooqFacesApplicationScope.java new file mode 100644 index 0000000..afd0a6c --- /dev/null +++ b/src/main/java/de/jooqfaces/EJooqFacesApplicationScope.java @@ -0,0 +1,50 @@ +package de.jooqfaces; + +/** + * + * @author henkej + * + */ +public enum EJooqFacesApplicationScope { + /** + * jooqFacesUrl + */ + JOOQ_FACES_URL("jooqFacesUrl"), + /** + * jooqFacesDriver + */ + JOOQ_FACES_DRIVER("jooqFacesDriver"), + /** + * jooqFacesSqldialect + */ + JOOQ_FACES_SQLDIALECT("jooqFacesSqldialect"), + /** + * jooqFacesProperties + */ + JOOQ_FACES_PROPERTIES("jooqFacesProperties"), + /** + * jooqFacesConnectionPool + */ + JOOQ_FACES_CONNECTIONPOOL("jooqFacesConnectionPool"), + /** + * jooqFacesMaxPoolSize + */ + JOOQ_FACES_MAXPOOLSIZE("jooqFacesMaxPoolSize"), + /** + * jooqFacesParamAutocommit + */ + JOOQ_FACES_PARAM_AUTOCOMMIT("jooqFacesParamAutocommit"); + + private final String s; + + private EJooqFacesApplicationScope(String s) { + this.s = s; + } + + /** + * @return the value + */ + public final String get() { + return s; + } +} diff --git a/src/main/java/de/jooqfaces/EJooqFacesConnectionPool.java b/src/main/java/de/jooqfaces/EJooqFacesConnectionPool.java new file mode 100644 index 0000000..a46d9ed --- /dev/null +++ b/src/main/java/de/jooqfaces/EJooqFacesConnectionPool.java @@ -0,0 +1,24 @@ +package de.jooqfaces; + +/** + * + * @author jotty + * + */ +public enum EJooqFacesConnectionPool { + CP_HIKARI("hikari"); + + private final String value; + + private EJooqFacesConnectionPool(String value) { + this.value = value; + } + + public String get() { + return value; + } + + public static final String getHikari() { + return CP_HIKARI.get(); + } +} diff --git a/src/main/java/de/jooqfaces/EJooqFacesSessionScope.java b/src/main/java/de/jooqfaces/EJooqFacesSessionScope.java new file mode 100644 index 0000000..a2f9aa4 --- /dev/null +++ b/src/main/java/de/jooqfaces/EJooqFacesSessionScope.java @@ -0,0 +1,20 @@ +package de.jooqfaces; + +/** + * + * @author henkej + * + */ +public enum EJooqFacesSessionScope { + CONNECTION("connection"); + + private final String value; + + private EJooqFacesSessionScope(String value) { + this.value = value; + } + + public String get() { + return value; + } +} diff --git a/src/main/java/de/jooqfaces/JooqFacesContext.java b/src/main/java/de/jooqfaces/JooqFacesContext.java new file mode 100644 index 0000000..be1fb4f --- /dev/null +++ b/src/main/java/de/jooqfaces/JooqFacesContext.java @@ -0,0 +1,350 @@ +package de.jooqfaces; + +import java.sql.*; +import java.util.*; + +import javax.faces.application.*; +import javax.faces.application.FacesMessage.*; +import javax.faces.component.*; +import javax.faces.context.*; +import javax.faces.render.*; +import javax.servlet.*; +import javax.sql.*; + +import org.apache.logging.log4j.*; +import org.jooq.*; +import org.jooq.impl.*; + +/** + * + * @author jotty + * + */ +public class JooqFacesContext extends FacesContext { + private static final Logger LOGGER = LogManager.getLogger(JooqFacesContext.class); + private FacesContext facesContext; + private Connection connection; + + public JooqFacesContext(FacesContext facesContext) { + this.facesContext = facesContext; + setCurrentInstance(this); + } + + /** + * get the jooq dsl context from the faces context session map
+ *
+ * Always call getJooq() within a try-catch closure, as the DSLContext is a closure; if not, your + * connections might run out + * + * @return the jooq context + * @throws ClassNotFoundException + * on driver errors; check if you have attached the correct jdbc driver class + * @throws SQLException + * on sql errors + */ + public CloseableDSLContext getJooq() throws ClassNotFoundException, SQLException { + ExternalContext externalContext = facesContext.getExternalContext(); + if (externalContext == null) { + throw new JooqFacesException("external context of current faces context is null"); + } + ServletContext servletContext = (ServletContext) externalContext.getContext(); + if (servletContext == null) { + throw new JooqFacesException("servlet context of current faces context is null"); + } + SQLDialect dialect = getSqlDialect(servletContext); + createConnectionIfNull(externalContext, servletContext); + return new DefaultCloseableDSLContext(new DefaultConnectionProvider(connection), dialect); + } + + /** + * get the database connection from the session map; if not found, create a new one and add it to the session map + * + * @param sessionMap + * the session map + * @param externalContext + * the external context + * @param servletContext + * the servlet context + * @return the connection + * @throws ClassNotFoundException + * on driver errors (e.g. missing jdbc lib) + * @throws SQLException + * on sql errors + */ + private void createConnectionIfNull(ExternalContext externalContext, ServletContext servletContext) + throws ClassNotFoundException, SQLException { + if (connection == null) { // caching the connection within the faces context makes it faster on the jsf life cycle + Map sessionMap = externalContext.getSessionMap(); + if (sessionMap == null) { + throw new JooqFacesException("session map of current faces context is null"); + } + DataSource dataSource = (DataSource) sessionMap.get(EJooqFacesSessionScope.CONNECTION.get()); + if (dataSource == null || dataSource.getConnection() == null || dataSource.getConnection().isClosed()) { + LOGGER.debug("creating new connection pool"); + dataSource = getDataSourceFromServletContext(servletContext); + externalContext.getSessionMap().put(EJooqFacesSessionScope.CONNECTION.get(), dataSource); + } + connection = dataSource.getConnection(); + String autoCommit = servletContext.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_PARAM_AUTOCOMMIT.get()); + connection.setAutoCommit("true".equals(autoCommit)); // default false for postgreSQL, the database of my choice + } + } + + /** + * get data source from connection pool if defined in servlet context (see + * EJooqFacesApplicationScope.CONNECTION_POOL); if not defined, return a plain data source + * + * @param servletContext + * @return + */ + private static final DataSource getDataSourceFromServletContext(ServletContext servletContext) + throws ClassNotFoundException { + String driver = getDriver(servletContext); + if (driver == null) { + throw new JooqFacesException( + "undefined driver in application scope, define it in your web.xml's context-param on name " + + EJooqFacesApplicationScope.JOOQ_FACES_DRIVER.get()); + } + String url = getUrl(servletContext); + if (url == null) { + throw new JooqFacesException( + "undefined connection data url in application scope, define it in your web.xml's context-param on name " + + EJooqFacesApplicationScope.JOOQ_FACES_URL.get()); + } + Integer maxPoolSize = getMaxPoolSize(servletContext); + if (maxPoolSize == null) { + LOGGER.debug("maxPoolSize not set, setting it to 20"); + maxPoolSize = 20; + } + String connectionPool = getConnectionPool(servletContext); + if (connectionPool == null) { + LOGGER.warn( + "no connection pool set in servlet context (see EJooqFacesApplicationScope.JOOQ_FACES_CONNECTIONPOOL), using plain connection"); + } + return new PoollessDataSource(driver, url); + } + + /** + * get the connection from the servlet context + * + * @param servletContext + * the servlet context + * @return the connection + * @throws ClassNotFoundException + * on driver errors (e.g. missing jdbc lib) + * @throws SQLException + * on sql errors + */ + private static final Connection getConnectionFromServletContext(ServletContext servletContext) + throws ClassNotFoundException, SQLException { + DataSource dataSource = getDataSourceFromServletContext(servletContext); + return dataSource.getConnection(); + } + + /** + * get a jooq connection from servlet context (for such cases as the deployment phase where the faces context is still + * not available) + * + * @param servletContext + * the servlet context + * @return a jooq connection + * @throws ClassNotFoundException + * on driver errors (e.g. missing jdbc lib) + * @throws SQLException + * on sql errors + */ + public static final DSLContext getJooqFromServletContext(ServletContext servletContext) + throws ClassNotFoundException, SQLException { + SQLDialect dialect = getSqlDialect(servletContext); + Connection con = getConnectionFromServletContext(servletContext); + return DSL.using(con, dialect); + } + + @Override + public void addMessage(String clientId, FacesMessage message) { + facesContext.addMessage(clientId, message); + } + + @Override + public Application getApplication() { + return facesContext.getApplication(); + } + + @Override + public Iterator getClientIdsWithMessages() { + return facesContext.getClientIdsWithMessages(); + } + + @Override + public ExternalContext getExternalContext() { + return facesContext.getExternalContext(); + } + + @Override + public Severity getMaximumSeverity() { + return facesContext.getMaximumSeverity(); + } + + @Override + public Iterator getMessages() { + return facesContext.getMessages(); + } + + @Override + public Iterator getMessages(String clientId) { + return facesContext.getMessages(clientId); + } + + @Override + public RenderKit getRenderKit() { + return facesContext.getRenderKit(); + } + + @Override + public boolean getRenderResponse() { + return facesContext.getRenderResponse(); + } + + @Override + public boolean getResponseComplete() { + + return facesContext.getResponseComplete(); + } + + @Override + public ResponseStream getResponseStream() { + return facesContext.getResponseStream(); + } + + @Override + public ResponseWriter getResponseWriter() { + return facesContext.getResponseWriter(); + } + + @Override + public UIViewRoot getViewRoot() { + return facesContext.getViewRoot(); + } + + @Override + public void release() { + facesContext.release(); + } + + @Override + public void renderResponse() { + facesContext.renderResponse(); + } + + @Override + public void responseComplete() { + facesContext.responseComplete(); + } + + @Override + public void setResponseStream(ResponseStream responseStream) { + facesContext.setResponseStream(responseStream); + } + + @Override + public void setResponseWriter(ResponseWriter responseWriter) { + facesContext.setResponseWriter(responseWriter); + } + + @Override + public void setViewRoot(UIViewRoot root) { + facesContext.setViewRoot(root); + } + + /** + * get the connection pool from initial context + * + * @param servletContext + * the context + * @return the connection pool string or null + */ + private static final String getConnectionPool(ServletContext servletContext) { + return servletContext.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_CONNECTIONPOOL.get()); + } + + /** + * get the max pool size from initial context if any + * + * @param servletContext + * the context of this function call + * @return the max pool size or null + */ + private static final Integer getMaxPoolSize(ServletContext servletContext) { + String maxPoolSize = servletContext.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_MAXPOOLSIZE.get()); + return maxPoolSize == null ? null : Integer.valueOf(maxPoolSize); + } + + /** + * get driver from initial context + * + * @param servletContext + * the context of this function call + * @return the parameter value of the jooq faces driver + */ + private static final String getDriver(ServletContext servletContext) { + return servletContext.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_DRIVER.get()); + } + + /** + * get driver connection url from initial context + * + * @param servletContext + * the context of this function call + * @return the parameter value of the jooq faces url + */ + private static final String getUrl(ServletContext servletContext) { + return servletContext.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_URL.get()); + } + + /** + * find jooq sql dialect class for dialectName + * + * @param dialectName + * name of dialect + * @return SQLDialect if found, null otherwise + */ + private static final SQLDialect findDialect(String dialectName) { + if (dialectName == null) { + LOGGER.error("Sql dialect name is null"); + return null; + } else { + for (SQLDialect dialect : SQLDialect.values()) { + LOGGER.trace("Sql dialect comparing: dialectName={}, loopDialect={}", dialectName, dialect); + if (dialectName.equalsIgnoreCase(dialect.name())) { + LOGGER.debug("Sql dialect found: dialectName={}, foundDialect={}", dialectName, dialect); + return dialect; + } + } + LOGGER.error("Sql dialect not found: dialectName={}", dialectName); + return null; + } + } + + /** + * get jooq sql dialect from initial context + * + * @param servletContext + * the context of this function call + * @return the dialect or null + */ + private static final SQLDialect getSqlDialect(ServletContext servletContext) { + String dialectName = servletContext.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_SQLDIALECT.get()); + return getSqlDialect(dialectName); + } + + /** + * get sql dialect from name + * + * @param name + * the dialect name + * @return the dialect or null + */ + public static final SQLDialect getSqlDialect(String name) { + return findDialect(name); + } +} diff --git a/src/main/java/de/jooqfaces/JooqFacesContextFactory.java b/src/main/java/de/jooqfaces/JooqFacesContextFactory.java new file mode 100644 index 0000000..7a37be0 --- /dev/null +++ b/src/main/java/de/jooqfaces/JooqFacesContextFactory.java @@ -0,0 +1,26 @@ +package de.jooqfaces; + +import javax.faces.*; +import javax.faces.context.*; +import javax.faces.lifecycle.*; + +/** + * + * @author jotty + * + */ +public class JooqFacesContextFactory extends FacesContextFactory { + + private FacesContextFactory facesContextFactory; + + public JooqFacesContextFactory(FacesContextFactory facesContextFactory) { + this.facesContextFactory = facesContextFactory; + } + + @Override + public FacesContext getFacesContext(Object context, Object request, Object response, Lifecycle lifecycle) + throws FacesException { + FacesContext facesContext = facesContextFactory.getFacesContext(context, request, response, lifecycle); + return new JooqFacesContext(facesContext); + } +} diff --git a/src/main/java/de/jooqfaces/JooqFacesException.java b/src/main/java/de/jooqfaces/JooqFacesException.java new file mode 100644 index 0000000..58f1fab --- /dev/null +++ b/src/main/java/de/jooqfaces/JooqFacesException.java @@ -0,0 +1,18 @@ +package de.jooqfaces; + +/** + * + * @author jotty + * + */ +public class JooqFacesException extends RuntimeException { + private static final long serialVersionUID = 1L; + + public JooqFacesException(String message) { + super(message); + } + + public JooqFacesException(Exception e) { + super(e); + } +} diff --git a/src/main/java/de/jooqfaces/PoollessDataSource.java b/src/main/java/de/jooqfaces/PoollessDataSource.java new file mode 100644 index 0000000..01a97ea --- /dev/null +++ b/src/main/java/de/jooqfaces/PoollessDataSource.java @@ -0,0 +1,72 @@ +package de.jooqfaces; + +import java.io.*; +import java.sql.*; +import java.util.logging.*; + +import javax.sql.*; + +/** + * + * @author jotty + * + */ +public class PoollessDataSource implements DataSource { + + private final String driver; + private final String url; + + public PoollessDataSource(String driver, String url) { + this.driver = driver; + this.url = url; + } + + @Override + public PrintWriter getLogWriter() throws SQLException { + return null; + } + + @Override + public int getLoginTimeout() throws SQLException { + return 0; + } + + @Override + public Logger getParentLogger() throws SQLFeatureNotSupportedException { + return null; + } + + @Override + public void setLogWriter(PrintWriter out) throws SQLException { + + } + + @Override + public void setLoginTimeout(int seconds) throws SQLException { + } + + @Override + public boolean isWrapperFor(Class iface) throws SQLException { + return false; + } + + @Override + public T unwrap(Class iface) throws SQLException { + return null; + } + + @Override + public Connection getConnection() throws SQLException { + try { + Class.forName(driver); + } catch (ClassNotFoundException e) { + throw new SQLException(e); + } + return DriverManager.getConnection(url); + } + + @Override + public Connection getConnection(String username, String password) throws SQLException { + return null; + } +} diff --git a/src/main/java/de/jooqfaces/PropertiesDeploymentListener.java b/src/main/java/de/jooqfaces/PropertiesDeploymentListener.java new file mode 100644 index 0000000..562dabf --- /dev/null +++ b/src/main/java/de/jooqfaces/PropertiesDeploymentListener.java @@ -0,0 +1,90 @@ +package de.jooqfaces; + +import java.io.*; +import java.sql.*; +import java.util.*;import javax.servlet.*; + +import org.apache.logging.log4j.*; + +/** + * + * @author henkej + * + */ +public class PropertiesDeploymentListener implements ServletContextListener { + + private static final Logger LOGGER = LogManager.getLogger(PropertiesDeploymentListener.class); + + @Override + public void contextDestroyed(ServletContextEvent event) { + try { + Enumeration drivers = DriverManager.getDrivers(); + while (drivers.hasMoreElements()) { + DriverManager.deregisterDriver(drivers.nextElement()); + } + } catch (SQLException | SecurityException e) { + LOGGER.error("Error deregistering drivers", e); + } + } + + @Override + public void contextInitialized(ServletContextEvent event) { + try { + ServletContext ctx = event.getServletContext(); + beforeInitialization(ctx); + String propertiesFileName = (String) ctx.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_PROPERTIES.get()); + if (propertiesFileName == null) { + throw new IOException( + "undefined properties file name in application scope, define it in your web.xml's context-param on name " + + EJooqFacesApplicationScope.JOOQ_FACES_PROPERTIES.get()); + } + Properties properties = new Properties(); + properties.load(new FileInputStream(propertiesFileName)); + for (Map.Entry entry : properties.entrySet()) { + String key = (String) entry.getKey(); + String value = (String) entry.getValue(); + ctx.setInitParameter(key, value); + } + // ensure to have all needed parameters loaded + if (ctx.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_SQLDIALECT.get()) == null) { + throw new IOException("no " + EJooqFacesApplicationScope.JOOQ_FACES_SQLDIALECT.get() + + " defined in your properties file " + propertiesFileName); + } + if (ctx.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_URL.get()) == null) { + throw new IOException("no " + EJooqFacesApplicationScope.JOOQ_FACES_URL.get() + " defined in your properties file " + + propertiesFileName); + } + if (ctx.getInitParameter(EJooqFacesApplicationScope.JOOQ_FACES_DRIVER.get()) == null) { + throw new IOException("no " + EJooqFacesApplicationScope.JOOQ_FACES_DRIVER.get() + + " defined in your properties file " + propertiesFileName); + } + afterInitialization(ctx); + } catch (IOException e) { + LOGGER.error("Error loading needed parameters from properties file", e); + } + } + + /** + * executed directly after initialization if no exception is thrown + * + * @param ctx + * the context to use + * @throws IOException + * for input output exceptions + */ + public void afterInitialization(ServletContext ctx) throws IOException { + // to be implemented in extending classes + } + + /** + * executed directly before initialization after getting the context from the servlet + * + * @param ctx + * the context to use + * @throws IOException + * for input output exceptions + */ + public void beforeInitialization(ServletContext ctx) throws IOException { + // to be implemented in extending classes + } +} diff --git a/src/main/java/de/jottyfan/timetrack/modules/JooqGateway.java b/src/main/java/de/jottyfan/timetrack/modules/JooqGateway.java index 5364dba..00b4522 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/JooqGateway.java +++ b/src/main/java/de/jottyfan/timetrack/modules/JooqGateway.java @@ -4,10 +4,10 @@ import java.sql.SQLException; import javax.faces.application.FacesMessage; -import org.jooq.DSLContext; +import org.jooq.CloseableDSLContext; import org.jooq.TableLike; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; /** * @@ -21,8 +21,8 @@ public class JooqGateway { this.facesContext = facesContext; } - public DSLContext getJooq() throws ClassNotFoundException, SQLException { - return (DSLContext) facesContext.getJooq(); + public CloseableDSLContext getJooq() throws ClassNotFoundException, SQLException { + return facesContext.getJooq(); } public void addToSessionMap(String key, Object value) { diff --git a/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java b/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java index f4a3359..e39b9ef 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java +++ b/src/main/java/de/jottyfan/timetrack/modules/SessionControl.java @@ -9,7 +9,7 @@ import javax.faces.context.FacesContext; import javax.inject.Inject; import javax.inject.Named; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.help.Pages; /** diff --git a/src/main/java/de/jottyfan/timetrack/modules/SessionGateway.java b/src/main/java/de/jottyfan/timetrack/modules/SessionGateway.java index 26b99b2..e211b72 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/SessionGateway.java +++ b/src/main/java/de/jottyfan/timetrack/modules/SessionGateway.java @@ -7,14 +7,14 @@ import java.sql.SQLException; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.jooq.DSLContext; +import org.jooq.CloseableDSLContext; import org.jooq.Record1; import org.jooq.Record4; import org.jooq.SelectConditionStep; import org.jooq.UpdateConditionStep; import org.jooq.exception.DataAccessException; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.db.profile.tables.records.TLoginRecord; /** @@ -40,7 +40,7 @@ public class SessionGateway extends JooqGateway { * @throws DataAccessException */ public boolean seekAndSetLogin(SessionBean bean) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectConditionStep> sql = jooq // @formatter:off .select(T_LOGIN.PK, @@ -94,7 +94,7 @@ public class SessionGateway extends JooqGateway { throws DataAccessException, ClassNotFoundException, SQLException { bean.setSecret(newPassword); String encryptedPassword = bean.getSecret(); - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { UpdateConditionStep sql = jooq // @formatter:off .update(T_LOGIN) diff --git a/src/main/java/de/jottyfan/timetrack/modules/SessionModel.java b/src/main/java/de/jottyfan/timetrack/modules/SessionModel.java index a049a87..bd6a6de 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/SessionModel.java +++ b/src/main/java/de/jottyfan/timetrack/modules/SessionModel.java @@ -6,7 +6,7 @@ import javax.faces.application.FacesMessage; import org.jooq.exception.DataAccessException; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; /** * diff --git a/src/main/java/de/jottyfan/timetrack/modules/contact/ContactControl.java b/src/main/java/de/jottyfan/timetrack/modules/contact/ContactControl.java index 5d43eb0..f52999d 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/contact/ContactControl.java +++ b/src/main/java/de/jottyfan/timetrack/modules/contact/ContactControl.java @@ -7,7 +7,7 @@ import javax.faces.context.FacesContext; import javax.inject.Inject; import javax.inject.Named; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.help.Navigation; import de.jottyfan.timetrack.help.Pages; import de.jottyfan.timetrack.modules.ControlInterface; diff --git a/src/main/java/de/jottyfan/timetrack/modules/contact/ContactGateway.java b/src/main/java/de/jottyfan/timetrack/modules/contact/ContactGateway.java index db445bb..cd9a19d 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/contact/ContactGateway.java +++ b/src/main/java/de/jottyfan/timetrack/modules/contact/ContactGateway.java @@ -9,7 +9,7 @@ import java.util.List; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.jooq.DSLContext; +import org.jooq.CloseableDSLContext; import org.jooq.DeleteConditionStep; import org.jooq.InsertValuesStep4; import org.jooq.Record1; @@ -19,7 +19,7 @@ import org.jooq.UpdateConditionStep; import org.jooq.exception.DataAccessException; import org.jooq.impl.DSL; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.db.contact.enums.EnumContacttype; import de.jottyfan.timetrack.db.contact.tables.records.TContactRecord; import de.jottyfan.timetrack.modules.JooqGateway; @@ -45,7 +45,7 @@ public class ContactGateway extends JooqGateway { * @throws DataAccessException */ public List getAll() throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectJoinStep> sql = jooq // @formatter:off .select(T_CONTACT.PK, @@ -81,7 +81,7 @@ public class ContactGateway extends JooqGateway { * @throws DataAccessException */ public Integer delete(Integer pk) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { DeleteConditionStep sql = jooq // @formatter:off .deleteFrom(T_CONTACT) @@ -104,7 +104,7 @@ public class ContactGateway extends JooqGateway { * @throws DataAccessException */ public Integer add(ContactBean bean) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { InsertValuesStep4 sql = jooq // @formatter:off .insertInto(T_CONTACT, @@ -130,7 +130,7 @@ public class ContactGateway extends JooqGateway { * @throws DataAccessException */ public Integer update(ContactBean bean) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { UpdateConditionStep sql = jooq // @formatter:off .update(T_CONTACT) @@ -154,7 +154,7 @@ public class ContactGateway extends JooqGateway { * @throws DataAccessException */ public Integer getAmount() throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectJoinStep> sql = jooq // @formatter:off .selectCount() diff --git a/src/main/java/de/jottyfan/timetrack/modules/contact/ContactModel.java b/src/main/java/de/jottyfan/timetrack/modules/contact/ContactModel.java index 9eb8a9a..c10f572 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/contact/ContactModel.java +++ b/src/main/java/de/jottyfan/timetrack/modules/contact/ContactModel.java @@ -11,7 +11,7 @@ import javax.inject.Named; import org.jooq.exception.DataAccessException; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.db.contact.enums.EnumContacttype; import de.jottyfan.timetrack.modules.Model; diff --git a/src/main/java/de/jottyfan/timetrack/modules/done/DoneBean.java b/src/main/java/de/jottyfan/timetrack/modules/done/DoneBean.java index a0e679c..e00d796 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/done/DoneBean.java +++ b/src/main/java/de/jottyfan/timetrack/modules/done/DoneBean.java @@ -1,13 +1,11 @@ package de.jottyfan.timetrack.modules.done; import java.io.Serializable; -import java.sql.Timestamp; -import java.text.SimpleDateFormat; import java.time.Duration; import java.time.LocalDate; import java.time.LocalDateTime; -import java.time.OffsetDateTime; import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.Date; import java.util.Map; @@ -25,9 +23,11 @@ import de.jottyfan.timetrack.modules.Bean; public class DoneBean implements Bean, Serializable, Comparable { private static final long serialVersionUID = 1L; + private static final DateTimeFormatter hhmm = DateTimeFormatter.ofPattern("HH:mm"); + private Integer pk; - private Timestamp timeFrom; - private Timestamp timeUntil; + private LocalDateTime timeFrom; + private LocalDateTime timeUntil; private TProjectRecord project; private TModuleRecord module; private TJobRecord activity; @@ -55,27 +55,27 @@ public class DoneBean implements Bean, Serializable, Comparable { */ public void setDay(Date day) { if (timeFrom != null) { - LocalDateTime ldt = timeFrom.toLocalDateTime(); + LocalDateTime ldt = timeFrom; LocalDate date = day.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); ldt = ldt.withYear(date.getYear()).withMonth(date.getMonthValue()).withDayOfMonth(date.getDayOfMonth()); - timeFrom = Timestamp.from(ldt.toInstant(OffsetDateTime.now().getOffset())); + timeFrom = ldt; } if (timeUntil != null) { - LocalDateTime ldt = timeUntil.toLocalDateTime(); + LocalDateTime ldt = timeUntil; LocalDate date = day.toInstant().atZone(ZoneId.systemDefault()).toLocalDate(); ldt = ldt.withYear(date.getYear()).withMonth(date.getMonthValue()).withDayOfMonth(date.getDayOfMonth()); - timeUntil = Timestamp.from(ldt.toInstant(OffsetDateTime.now().getOffset())); + timeUntil = ldt; } } public String getTimeSummary() { StringBuilder buf = new StringBuilder(); if (timeFrom != null) { - buf.append(new SimpleDateFormat("HH:mm").format(timeFrom)); + buf.append(timeFrom.format(hhmm)); } if (timeUntil != null) { buf.append(" - "); - buf.append(new SimpleDateFormat("HH:mm").format(timeUntil)); + buf.append(timeUntil.format(hhmm)); } return buf.toString(); } @@ -86,8 +86,8 @@ public class DoneBean implements Bean, Serializable, Comparable { } public String getTimeDiff() { - LocalDateTime earlier = timeFrom != null ? timeFrom.toLocalDateTime() : LocalDateTime.now(); - LocalDateTime later = timeUntil != null ? timeUntil.toLocalDateTime() : LocalDateTime.now(); + LocalDateTime earlier = timeFrom != null ? timeFrom : LocalDateTime.now(); + LocalDateTime later = timeUntil != null ? timeUntil : LocalDateTime.now(); Duration diff = Duration.between(earlier, later); return String.format("%02d:%02d", diff.toHours(), diff.toMinutes() % 60); } @@ -143,21 +143,19 @@ public class DoneBean implements Bean, Serializable, Comparable { } public String getTimeFromString() { - return timeFrom == null ? "" : new SimpleDateFormat("HH:mm").format(timeFrom); + return timeFrom == null ? "" : timeFrom.format(hhmm); } public void setTimeFromString(String s) { - LocalDateTime ldt = getLocalDateTimeFromHHmm(s, null); // use setDay instead - this.timeFrom = ldt == null ? null : Timestamp.valueOf(ldt); + this.timeFrom = getLocalDateTimeFromHHmm(s, null); // use setDay instead } public String getTimeUntilString() { - return timeUntil == null ? "" : new SimpleDateFormat("HH:mm").format(timeUntil); + return timeUntil == null ? "" : timeUntil.format(hhmm); } public void setTimeUntilString(String s) { - LocalDateTime ldt = getLocalDateTimeFromHHmm(s, null); // use setDay instead - this.timeUntil = ldt == null ? null : Timestamp.valueOf(ldt); + this.timeUntil = getLocalDateTimeFromHHmm(s, null); // use setDay instead } public Integer getPk() { @@ -168,19 +166,19 @@ public class DoneBean implements Bean, Serializable, Comparable { this.pk = pk; } - public Timestamp getTimeFrom() { + public LocalDateTime getTimeFrom() { return timeFrom; } - public void setTimeFrom(Timestamp timeFrom) { + public void setTimeFrom(LocalDateTime timeFrom) { this.timeFrom = timeFrom; } - public Timestamp getTimeUntil() { + public LocalDateTime getTimeUntil() { return timeUntil; } - public void setTimeUntil(Timestamp timeUntil) { + public void setTimeUntil(LocalDateTime timeUntil) { this.timeUntil = timeUntil; } diff --git a/src/main/java/de/jottyfan/timetrack/modules/done/DoneControl.java b/src/main/java/de/jottyfan/timetrack/modules/done/DoneControl.java index 2f2b226..7bf23ef 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/done/DoneControl.java +++ b/src/main/java/de/jottyfan/timetrack/modules/done/DoneControl.java @@ -1,16 +1,15 @@ package de.jottyfan.timetrack.modules.done; import java.io.Serializable; -import java.sql.Timestamp; -import java.text.SimpleDateFormat; import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import javax.enterprise.context.RequestScoped; import javax.faces.context.FacesContext; import javax.inject.Inject; import javax.inject.Named; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.help.Navigation; import de.jottyfan.timetrack.help.Pages; import de.jottyfan.timetrack.modules.ControlInterface; @@ -40,7 +39,7 @@ public class DoneControl extends Navigation implements ControlInterface, Seriali public String toAdd() { DoneBean bean = new DoneBean(); - bean.setTimeFrom(getCurrentDate()); + bean.setTimeFrom(LocalDateTime.now()); model.setBean(bean); boolean ready = model.loadDefaults((JooqFacesContext) FacesContext.getCurrentInstance()); return ready ? navigateTo(Pages.DONE_ADD) : toList(); @@ -83,10 +82,7 @@ public class DoneControl extends Navigation implements ControlInterface, Seriali } public String getCurrentTimeAsString() { - return new SimpleDateFormat("HH:mm:ss").format(getCurrentDate()); - } - - public Timestamp getCurrentDate() { - return Timestamp.valueOf(LocalDateTime.now()); + DateTimeFormatter hhmmss = DateTimeFormatter.ofPattern("HH:mm:ss"); + return LocalDateTime.now().format(hhmmss); } } diff --git a/src/main/java/de/jottyfan/timetrack/modules/done/DoneGateway.java b/src/main/java/de/jottyfan/timetrack/modules/done/DoneGateway.java index 8d20422..76765dd 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/done/DoneGateway.java +++ b/src/main/java/de/jottyfan/timetrack/modules/done/DoneGateway.java @@ -9,19 +9,21 @@ import static de.jottyfan.timetrack.db.done.Tables.V_TOTALOFDAY; import static de.jottyfan.timetrack.db.done.Tables.V_WORKTIME; import static de.jottyfan.timetrack.db.profile.Tables.T_LOGIN; -import java.sql.Date; import java.sql.SQLException; -import java.sql.Timestamp; import java.text.SimpleDateFormat; +import java.time.LocalDate; import java.time.LocalDateTime; +import java.time.ZoneId; +import java.time.format.DateTimeFormatter; import java.util.ArrayList; +import java.util.Date; import java.util.HashMap; import java.util.List; import java.util.Map; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.jooq.DSLContext; +import org.jooq.CloseableDSLContext; import org.jooq.DeleteConditionStep; import org.jooq.InsertValuesStep7; import org.jooq.Record; @@ -35,7 +37,7 @@ import org.jooq.SelectWhereStep; import org.jooq.UpdateConditionStep; import org.jooq.exception.DataAccessException; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.db.done.tables.records.TDoneRecord; import de.jottyfan.timetrack.db.done.tables.records.TJobRecord; import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord; @@ -67,7 +69,7 @@ public class DoneGateway extends JooqGateway { * @throws ClassNotFoundException */ public List getAllModules() throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { List list = new ArrayList<>(); SelectWhereStep sql = jooq.selectFrom(T_MODULE); LOGGER.debug(sql.toString()); @@ -88,7 +90,7 @@ public class DoneGateway extends JooqGateway { * @throws ClassNotFoundException */ public List getAllActivities() throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { List list = new ArrayList<>(); SelectWhereStep sql = jooq.selectFrom(T_JOB); LOGGER.debug(sql.toString()); @@ -109,7 +111,7 @@ public class DoneGateway extends JooqGateway { * @throws ClassNotFoundException */ public List getAllProjects() throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { List list = new ArrayList<>(); SelectWhereStep sql = jooq.selectFrom(T_PROJECT); LOGGER.debug(sql.toString()); @@ -168,17 +170,17 @@ public class DoneGateway extends JooqGateway { LocalDateTime tomorrow = day.plusDays(1).withHour(0).withMinute(0).withSecond(0).withNano(0); List list = new ArrayList<>(); - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectConditionStep sql = getJooq() // @formatter:off .selectFrom(T_DONE) .where(T_DONE.FK_LOGIN.eq(getFkLogin())) .and(T_DONE.TIME_FROM.isNull() - .or(T_DONE.TIME_FROM.greaterThan(Timestamp.valueOf(yesterday)) - .and(T_DONE.TIME_FROM.lessThan(Timestamp.valueOf(tomorrow))))) + .or(T_DONE.TIME_FROM.greaterThan(yesterday) + .and(T_DONE.TIME_FROM.lessThan(tomorrow)))) .and(T_DONE.TIME_UNTIL.isNull() - .or(T_DONE.TIME_UNTIL.lessThan(Timestamp.valueOf(tomorrow)) - .and(T_DONE.TIME_UNTIL.greaterThan(Timestamp.valueOf(yesterday))))); + .or(T_DONE.TIME_UNTIL.lessThan(tomorrow) + .and(T_DONE.TIME_UNTIL.greaterThan(yesterday)))); // @formatter:on LOGGER.debug(sql.toString()); for (TDoneRecord r : sql.fetch()) { @@ -202,8 +204,8 @@ public class DoneGateway extends JooqGateway { Integer fkJob = bean.getActivity() == null ? null : bean.getActivity().getPk(); Integer fkLogin = getFkLogin(); - try (DSLContext jooq = getJooq()) { - InsertValuesStep7 sql = jooq + try (CloseableDSLContext jooq = getJooq()) { + InsertValuesStep7 sql = jooq // @formatter:off .insertInto(T_DONE, T_DONE.TIME_FROM, @@ -228,7 +230,7 @@ public class DoneGateway extends JooqGateway { * @throws ClassNotFoundException */ public void update(DoneBean bean) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { UpdateConditionStep sql = jooq // @formatter:off .update(T_DONE) @@ -253,7 +255,7 @@ public class DoneGateway extends JooqGateway { * @throws ClassNotFoundException */ public void delete(DoneBean bean) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { DeleteConditionStep sql = jooq.deleteFrom(T_DONE).where(T_DONE.PK.eq(bean.getPk())); LOGGER.debug(sql.toString()); sql.execute(); @@ -271,7 +273,7 @@ public class DoneGateway extends JooqGateway { * @throws DataAccessException */ public WholeDaySummaryBean getDaySummary(java.util.Date day) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectConditionStep> sql = jooq // @formatter:off .select(V_TOTALOFDAY.STARTTIME, @@ -306,7 +308,7 @@ public class DoneGateway extends JooqGateway { * @throws DataAccessException */ public List getAllJobs(java.util.Date day) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectConditionStep> sql = jooq // @formatter:off .select(V_WORKTIME.DURATION, @@ -343,8 +345,8 @@ public class DoneGateway extends JooqGateway { * @throws DataAccessException */ public String getAllCalendarEvents() throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { - SelectConditionStep> sql = jooq + try (CloseableDSLContext jooq = getJooq()) { + SelectConditionStep> sql = jooq // @formatter:off .select(T_DONE.TIME_FROM, T_DONE.TIME_UNTIL, @@ -365,8 +367,8 @@ public class DoneGateway extends JooqGateway { String moduleName = r.get(T_MODULE.NAME); String jobName = r.get(T_JOB.NAME); String wp = r.get(T_DONE.WP); - java.util.Date timeFrom = r.get(T_DONE.TIME_FROM); - java.util.Date timeUntil = r.get(T_DONE.TIME_UNTIL); + LocalDateTime timeFrom = r.get(T_DONE.TIME_FROM); + LocalDateTime timeUntil = r.get(T_DONE.TIME_UNTIL); StringBuilder buf = new StringBuilder(); buf.append(projectName); @@ -378,14 +380,15 @@ public class DoneGateway extends JooqGateway { buf.append(": "); buf.append(jobName); - FullCalendarEventBean bean = new FullCalendarEventBean(buf.toString(), timeFrom) { + FullCalendarEventBean bean = new FullCalendarEventBean(buf.toString(), java.util.Date.from(timeFrom.atZone(ZoneId.systemDefault()).toInstant())) { private static final long serialVersionUID = 1L; @Override public void addExtendedFields(StringBuilder buf) { } }; - bean.setEnd(timeUntil); + Date endDate = timeUntil == null ? null : Date.from(timeUntil.atZone(ZoneId.systemDefault()).toInstant()); + bean.setEnd(endDate); bean.setColor(new RgbColor().determineRgbColor(projectName, moduleName, jobName)); list.getList().add(bean); } @@ -395,7 +398,7 @@ public class DoneGateway extends JooqGateway { public List getAllUsers() throws DataAccessException, ClassNotFoundException, SQLException { List list = new ArrayList<>(); - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectJoinStep> sql = jooq // @formatter:off .select(T_LOGIN.LOGIN, @@ -416,8 +419,8 @@ public class DoneGateway extends JooqGateway { public String download(DownloadBean bean) throws DataAccessException, ClassNotFoundException, SQLException { StringBuilder buf = new StringBuilder(); - try (DSLContext jooq = getJooq()) { - SelectConditionStep> sql = jooq + try (CloseableDSLContext jooq = getJooq()) { + SelectConditionStep> sql = jooq // @formatter:off .select(V_HAMSTERSUMMARY.WORKDAY, V_HAMSTERSUMMARY.DURATION, @@ -426,14 +429,15 @@ public class DoneGateway extends JooqGateway { V_HAMSTERSUMMARY.JOB_NAME) .from(V_HAMSTERSUMMARY) .where(V_HAMSTERSUMMARY.LOGIN.eq(bean.getUsername())) - .and(V_HAMSTERSUMMARY.WORKDAY.le(Date.valueOf(bean.getUntilDate())) - .and(V_HAMSTERSUMMARY.WORKDAY.ge(Date.valueOf(bean.getFromDate())))); + .and(V_HAMSTERSUMMARY.WORKDAY.le(bean.getUntilDate()) + .and(V_HAMSTERSUMMARY.WORKDAY.ge(bean.getFromDate()))); // @formatter:on LOGGER.debug(sql.toString()); String sep = ";"; buf.append("day").append(sep).append("duration").append(sep).append("project").append(sep).append("module").append(sep).append("activity\n"); for (Record r : sql.fetch()) { - String date = new SimpleDateFormat("dd.MM.yyyy").format(r.get(V_HAMSTERSUMMARY.WORKDAY)); + LocalDate workday = r.get(V_HAMSTERSUMMARY.WORKDAY); + String date = workday.format(DateTimeFormatter.ofPattern("dd.MM.yyyy")); buf.append(date).append(sep); buf.append(r.get(V_HAMSTERSUMMARY.DURATION)).append(sep); buf.append(r.get(V_HAMSTERSUMMARY.PROJECT_NAME)).append(sep); diff --git a/src/main/java/de/jottyfan/timetrack/modules/done/DoneModel.java b/src/main/java/de/jottyfan/timetrack/modules/done/DoneModel.java index f7322a6..e92da9d 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/done/DoneModel.java +++ b/src/main/java/de/jottyfan/timetrack/modules/done/DoneModel.java @@ -20,7 +20,7 @@ import javax.inject.Named; import org.jooq.exception.DataAccessException; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.db.done.tables.records.TJobRecord; import de.jottyfan.timetrack.db.done.tables.records.TModuleRecord; import de.jottyfan.timetrack.db.done.tables.records.TProjectRecord; diff --git a/src/main/java/de/jottyfan/timetrack/modules/note/NoteBean.java b/src/main/java/de/jottyfan/timetrack/modules/note/NoteBean.java index 8c1cc15..1ab6cb9 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/note/NoteBean.java +++ b/src/main/java/de/jottyfan/timetrack/modules/note/NoteBean.java @@ -1,7 +1,7 @@ package de.jottyfan.timetrack.modules.note; -import java.io.*; -import java.util.*; +import java.io.Serializable; +import java.time.LocalDateTime; import de.jottyfan.timetrack.db.note.enums.EnumCategory; import de.jottyfan.timetrack.db.note.enums.EnumNotetype; @@ -21,7 +21,7 @@ public class NoteBean implements Bean, Serializable private EnumCategory category; private EnumNotetype type; private String content; - private Date lastchange; + private LocalDateTime lastchange; public NoteBean(Integer pk) { @@ -69,12 +69,12 @@ public class NoteBean implements Bean, Serializable this.content = content; } - public Date getLastchange() + public LocalDateTime getLastchange() { return lastchange; } - public void setLastchange(Date lastchange) + public void setLastchange(LocalDateTime lastchange) { this.lastchange = lastchange; } diff --git a/src/main/java/de/jottyfan/timetrack/modules/note/NoteControl.java b/src/main/java/de/jottyfan/timetrack/modules/note/NoteControl.java index d0bf82a..ca19bd2 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/note/NoteControl.java +++ b/src/main/java/de/jottyfan/timetrack/modules/note/NoteControl.java @@ -7,7 +7,7 @@ import javax.faces.context.FacesContext; import javax.inject.Inject; import javax.inject.Named; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.help.Navigation; import de.jottyfan.timetrack.help.Pages; import de.jottyfan.timetrack.modules.ControlInterface; diff --git a/src/main/java/de/jottyfan/timetrack/modules/note/NoteGateway.java b/src/main/java/de/jottyfan/timetrack/modules/note/NoteGateway.java index 4f8e1a7..150b17a 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/note/NoteGateway.java +++ b/src/main/java/de/jottyfan/timetrack/modules/note/NoteGateway.java @@ -8,7 +8,7 @@ import java.util.List; import org.apache.logging.log4j.LogManager; import org.apache.logging.log4j.Logger; -import org.jooq.DSLContext; +import org.jooq.CloseableDSLContext; import org.jooq.DeleteConditionStep; import org.jooq.InsertValuesStep4; import org.jooq.Record; @@ -16,7 +16,7 @@ import org.jooq.SelectJoinStep; import org.jooq.UpdateConditionStep; import org.jooq.exception.DataAccessException; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.db.note.enums.EnumCategory; import de.jottyfan.timetrack.db.note.enums.EnumNotetype; import de.jottyfan.timetrack.db.note.tables.records.TNoteRecord; @@ -44,7 +44,7 @@ public class NoteGateway extends JooqGateway { * @returns amount of affected rows in db */ public void insert(NoteBean bean) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { InsertValuesStep4 sql = jooq // @formatter:off .insertInto(T_NOTE, @@ -68,7 +68,7 @@ public class NoteGateway extends JooqGateway { * @throws ClassNotFoundException */ public void update(NoteBean bean) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { UpdateConditionStep sql = jooq // @formatter:off .update(T_NOTE) @@ -90,7 +90,7 @@ public class NoteGateway extends JooqGateway { * @throws ClassNotFoundException */ public void delete(Integer pk) throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { DeleteConditionStep sql = jooq.deleteFrom(T_NOTE).where(T_NOTE.PK.eq(pk)); LOGGER.debug(sql.toString()); sql.execute(); @@ -106,7 +106,7 @@ public class NoteGateway extends JooqGateway { * @throws ClassNotFoundException */ public List getAll() throws DataAccessException, ClassNotFoundException, SQLException { - try (DSLContext jooq = getJooq()) { + try (CloseableDSLContext jooq = getJooq()) { SelectJoinStep sql = jooq.select().from(T_NOTE); LOGGER.debug(sql.toString()); List list = new ArrayList<>(); diff --git a/src/main/java/de/jottyfan/timetrack/modules/note/NoteModel.java b/src/main/java/de/jottyfan/timetrack/modules/note/NoteModel.java index a353153..0df044d 100644 --- a/src/main/java/de/jottyfan/timetrack/modules/note/NoteModel.java +++ b/src/main/java/de/jottyfan/timetrack/modules/note/NoteModel.java @@ -10,7 +10,7 @@ import javax.inject.Named; import org.jooq.exception.DataAccessException; -import de.jooqFaces.JooqFacesContext; +import de.jooqfaces.JooqFacesContext; import de.jottyfan.timetrack.db.note.Tables; import de.jottyfan.timetrack.modules.Model; diff --git a/src/main/webapp/WEB-INF/faces-config.xml b/src/main/webapp/WEB-INF/faces-config.xml index 680a241..3fbfad2 100644 --- a/src/main/webapp/WEB-INF/faces-config.xml +++ b/src/main/webapp/WEB-INF/faces-config.xml @@ -5,6 +5,6 @@ xsi:schemaLocation="http://java.sun.com/xml/ns/javaee http://java.sun.com/xml/ns/javaee/web-facesconfig_2_0.xsd" version="2.0"> - de.jooqFaces.JooqFacesContextFactory + de.jooqfaces.JooqFacesContextFactory diff --git a/src/main/webapp/WEB-INF/web.xml b/src/main/webapp/WEB-INF/web.xml index 2eb5734..a2bd723 100644 --- a/src/main/webapp/WEB-INF/web.xml +++ b/src/main/webapp/WEB-INF/web.xml @@ -64,6 +64,6 @@ /etc/timetrack.properties - de.jooqFaces.PropertiesDeploymentListener + de.jooqfaces.PropertiesDeploymentListener diff --git a/src/main/webapp/pages/start.xhtml b/src/main/webapp/pages/start.xhtml index a0f67e5..1f99d96 100644 --- a/src/main/webapp/pages/start.xhtml +++ b/src/main/webapp/pages/start.xhtml @@ -9,6 +9,11 @@ + diff --git a/src/test/java/de/jottyfan/timetrack/moduls/done/TestDoneBean.java b/src/test/java/de/jottyfan/timetrack/moduls/done/TestDoneBean.java index 2b36e5d..77c23dc 100644 --- a/src/test/java/de/jottyfan/timetrack/moduls/done/TestDoneBean.java +++ b/src/test/java/de/jottyfan/timetrack/moduls/done/TestDoneBean.java @@ -3,10 +3,10 @@ package de.jottyfan.timetrack.moduls.done; import static org.junit.jupiter.api.Assertions.assertEquals; import static org.junit.jupiter.api.Assertions.assertNull; -import java.sql.Timestamp; import java.text.ParseException; import java.text.SimpleDateFormat; import java.time.LocalDateTime; +import java.time.format.DateTimeFormatter; import java.util.Date; import org.junit.jupiter.api.Test; @@ -42,8 +42,8 @@ public class TestDoneBean { @Test public void testSetDay() throws ParseException { String today = new SimpleDateFormat("dd.MM.yyyy").format(new Date()); - SimpleDateFormat sdf = new SimpleDateFormat("dd.MM.yyyy HH:mm"); - SimpleDateFormat sd = new SimpleDateFormat("dd.MM.yyyy"); + DateTimeFormatter sdf = DateTimeFormatter.ofPattern("dd.MM.yyyy HH:mm"); + DateTimeFormatter sd = DateTimeFormatter.ofPattern("dd.MM.yyyy"); DoneBean bean = new DoneBean(); bean.setDay(new Date()); @@ -51,16 +51,16 @@ public class TestDoneBean { assertNull(bean.getTimeUntil()); bean.setTimeFromString("08:00"); - Timestamp ts1 = bean.getTimeFrom(); - assertEquals(today.concat(" 08:00"), sdf.format(ts1)); - bean.setDay(sd.parse("01.01.2001")); - assertEquals("01.01.2001", sd.format(bean.getTimeFrom())); + LocalDateTime ts1 = bean.getTimeFrom(); + assertEquals(today.concat(" 08:00"), ts1.format(sdf)); + bean.setDay(new SimpleDateFormat("dd.MM.yyyy").parse("01.01.2001")); + assertEquals("01.01.2001", bean.getTimeFrom().format(sd)); assertNull(bean.getTimeUntil()); bean.setTimeUntilString("10:00"); - Timestamp ts2 = bean.getTimeUntil(); - assertEquals(today.concat(" 10:00"), sdf.format(ts2)); - bean.setDay(sd.parse("01.01.2001")); + LocalDateTime ts2 = bean.getTimeUntil(); + assertEquals(today.concat(" 10:00"), ts2.format(sdf)); + bean.setDay(new SimpleDateFormat("dd.MM.yyyy").parse("01.01.2001")); assertEquals("01.01.2001", sd.format(bean.getTimeFrom())); assertEquals("01.01.2001", sd.format(bean.getTimeUntil())); }