diff --git a/build.gradle b/build.gradle
index 212f565..5ae2f43 100644
--- a/build.gradle
+++ b/build.gradle
@@ -23,7 +23,7 @@ apply plugin: 'maven-publish'
apply plugin: 'eclipse'
group = 'de.jottyfan'
-version = '0.1.2'
+version = '0.1.3'
def artifactId = 'timetrackjooq'
def versionNumber = version
diff --git a/src/main/java/de/jottyfan/timetrack/db/done/Done.java b/src/main/java/de/jottyfan/timetrack/db/done/Done.java
index 02d0c37..042d19e 100644
--- a/src/main/java/de/jottyfan/timetrack/db/done/Done.java
+++ b/src/main/java/de/jottyfan/timetrack/db/done/Done.java
@@ -7,6 +7,7 @@ package de.jottyfan.timetrack.db.done;
import de.jottyfan.timetrack.db.DefaultCatalog;
import de.jottyfan.timetrack.db.done.tables.TBilling;
import de.jottyfan.timetrack.db.done.tables.TDone;
+import de.jottyfan.timetrack.db.done.tables.TFavorite;
import de.jottyfan.timetrack.db.done.tables.TJob;
import de.jottyfan.timetrack.db.done.tables.TModule;
import de.jottyfan.timetrack.db.done.tables.TProject;
@@ -17,6 +18,7 @@ import de.jottyfan.timetrack.db.done.tables.VDaysummary;
import de.jottyfan.timetrack.db.done.tables.VDone;
import de.jottyfan.timetrack.db.done.tables.VDuration;
import de.jottyfan.timetrack.db.done.tables.VEucanshare;
+import de.jottyfan.timetrack.db.done.tables.VFavorite;
import de.jottyfan.timetrack.db.done.tables.VHamster;
import de.jottyfan.timetrack.db.done.tables.VHamstersummary;
import de.jottyfan.timetrack.db.done.tables.VJob;
@@ -58,6 +60,11 @@ public class Done extends SchemaImpl {
*/
public final TDone T_DONE = TDone.T_DONE;
+ /**
+ * The table done.t_favorite
.
+ */
+ public final TFavorite T_FAVORITE = TFavorite.T_FAVORITE;
+
/**
* The table done.t_job
.
*/
@@ -108,6 +115,11 @@ public class Done extends SchemaImpl {
*/
public final VEucanshare V_EUCANSHARE = VEucanshare.V_EUCANSHARE;
+ /**
+ * The table done.v_favorite
.
+ */
+ public final VFavorite V_FAVORITE = VFavorite.V_FAVORITE;
+
/**
* The table done.v_hamster
.
*/
@@ -171,6 +183,7 @@ public class Done extends SchemaImpl {
return Arrays.asList(
TBilling.T_BILLING,
TDone.T_DONE,
+ TFavorite.T_FAVORITE,
TJob.T_JOB,
TModule.T_MODULE,
TProject.T_PROJECT,
@@ -181,6 +194,7 @@ public class Done extends SchemaImpl {
VDone.V_DONE,
VDuration.V_DURATION,
VEucanshare.V_EUCANSHARE,
+ VFavorite.V_FAVORITE,
VHamster.V_HAMSTER,
VHamstersummary.V_HAMSTERSUMMARY,
VJob.V_JOB,
diff --git a/src/main/java/de/jottyfan/timetrack/db/done/Keys.java b/src/main/java/de/jottyfan/timetrack/db/done/Keys.java
index ce37656..227561a 100644
--- a/src/main/java/de/jottyfan/timetrack/db/done/Keys.java
+++ b/src/main/java/de/jottyfan/timetrack/db/done/Keys.java
@@ -6,11 +6,13 @@ package de.jottyfan.timetrack.db.done;
import de.jottyfan.timetrack.db.done.tables.TBilling;
import de.jottyfan.timetrack.db.done.tables.TDone;
+import de.jottyfan.timetrack.db.done.tables.TFavorite;
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.TBillingRecord;
import de.jottyfan.timetrack.db.done.tables.records.TDoneRecord;
+import de.jottyfan.timetrack.db.done.tables.records.TFavoriteRecord;
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;
@@ -39,6 +41,7 @@ public class Keys {
public static final UniqueKey T_BILLING_PKEY = Internal.createUniqueKey(TBilling.T_BILLING, DSL.name("t_billing_pkey"), new TableField[] { TBilling.T_BILLING.PK }, true);
public static final UniqueKey T_BILLING_SHORTCUT_KEY = Internal.createUniqueKey(TBilling.T_BILLING, DSL.name("t_billing_shortcut_key"), new TableField[] { TBilling.T_BILLING.SHORTCUT }, true);
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_FAVORITE_PKEY = Internal.createUniqueKey(TFavorite.T_FAVORITE, DSL.name("t_favorite_pkey"), new TableField[] { TFavorite.T_FAVORITE.PK_FAVORITE }, 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);
@@ -55,4 +58,9 @@ public class Keys {
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);
+ public static final ForeignKey T_FAVORITE__T_FAVORITE_FK_BILLING_FKEY = Internal.createForeignKey(TFavorite.T_FAVORITE, DSL.name("t_favorite_fk_billing_fkey"), new TableField[] { TFavorite.T_FAVORITE.FK_BILLING }, Keys.T_BILLING_PKEY, new TableField[] { TBilling.T_BILLING.PK }, true);
+ public static final ForeignKey T_FAVORITE__T_FAVORITE_FK_JOB_FKEY = Internal.createForeignKey(TFavorite.T_FAVORITE, DSL.name("t_favorite_fk_job_fkey"), new TableField[] { TFavorite.T_FAVORITE.FK_JOB }, Keys.T_CATEGORY_PKEY, new TableField[] { TJob.T_JOB.PK }, true);
+ public static final ForeignKey T_FAVORITE__T_FAVORITE_FK_LOGIN_FKEY = Internal.createForeignKey(TFavorite.T_FAVORITE, DSL.name("t_favorite_fk_login_fkey"), new TableField[] { TFavorite.T_FAVORITE.FK_LOGIN }, de.jottyfan.timetrack.db.profile.Keys.T_LOGIN_PKEY, new TableField[] { TLogin.T_LOGIN.PK }, true);
+ public static final ForeignKey T_FAVORITE__T_FAVORITE_FK_MODULE_FKEY = Internal.createForeignKey(TFavorite.T_FAVORITE, DSL.name("t_favorite_fk_module_fkey"), new TableField[] { TFavorite.T_FAVORITE.FK_MODULE }, Keys.T_JOB_PKEY, new TableField[] { TModule.T_MODULE.PK }, true);
+ public static final ForeignKey T_FAVORITE__T_FAVORITE_FK_PROJECT_FKEY = Internal.createForeignKey(TFavorite.T_FAVORITE, DSL.name("t_favorite_fk_project_fkey"), new TableField[] { TFavorite.T_FAVORITE.FK_PROJECT }, Keys.T_PROJECT_PKEY, new TableField[] { TProject.T_PROJECT.PK }, true);
}
diff --git a/src/main/java/de/jottyfan/timetrack/db/done/Tables.java b/src/main/java/de/jottyfan/timetrack/db/done/Tables.java
index e3b2cf3..243e3ef 100644
--- a/src/main/java/de/jottyfan/timetrack/db/done/Tables.java
+++ b/src/main/java/de/jottyfan/timetrack/db/done/Tables.java
@@ -6,6 +6,7 @@ package de.jottyfan.timetrack.db.done;
import de.jottyfan.timetrack.db.done.tables.TBilling;
import de.jottyfan.timetrack.db.done.tables.TDone;
+import de.jottyfan.timetrack.db.done.tables.TFavorite;
import de.jottyfan.timetrack.db.done.tables.TJob;
import de.jottyfan.timetrack.db.done.tables.TModule;
import de.jottyfan.timetrack.db.done.tables.TProject;
@@ -16,6 +17,7 @@ import de.jottyfan.timetrack.db.done.tables.VDaysummary;
import de.jottyfan.timetrack.db.done.tables.VDone;
import de.jottyfan.timetrack.db.done.tables.VDuration;
import de.jottyfan.timetrack.db.done.tables.VEucanshare;
+import de.jottyfan.timetrack.db.done.tables.VFavorite;
import de.jottyfan.timetrack.db.done.tables.VHamster;
import de.jottyfan.timetrack.db.done.tables.VHamstersummary;
import de.jottyfan.timetrack.db.done.tables.VJob;
@@ -43,6 +45,11 @@ public class Tables {
*/
public static final TDone T_DONE = TDone.T_DONE;
+ /**
+ * The table done.t_favorite
.
+ */
+ public static final TFavorite T_FAVORITE = TFavorite.T_FAVORITE;
+
/**
* The table done.t_job
.
*/
@@ -93,6 +100,11 @@ public class Tables {
*/
public static final VEucanshare V_EUCANSHARE = VEucanshare.V_EUCANSHARE;
+ /**
+ * The table done.v_favorite
.
+ */
+ public static final VFavorite V_FAVORITE = VFavorite.V_FAVORITE;
+
/**
* The table done.v_hamster
.
*/
diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/TFavorite.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/TFavorite.java
new file mode 100644
index 0000000..3fc0eca
--- /dev/null
+++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/TFavorite.java
@@ -0,0 +1,263 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package de.jottyfan.timetrack.db.done.tables;
+
+
+import de.jottyfan.timetrack.db.done.Done;
+import de.jottyfan.timetrack.db.done.Keys;
+import de.jottyfan.timetrack.db.done.tables.records.TFavoriteRecord;
+import de.jottyfan.timetrack.db.profile.tables.TLogin;
+
+import java.time.LocalDateTime;
+import java.util.Arrays;
+import java.util.List;
+import java.util.function.Function;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Function7;
+import org.jooq.Identity;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Records;
+import org.jooq.Row7;
+import org.jooq.Schema;
+import org.jooq.SelectField;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.TableOptions;
+import org.jooq.UniqueKey;
+import org.jooq.impl.DSL;
+import org.jooq.impl.SQLDataType;
+import org.jooq.impl.TableImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class TFavorite extends TableImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of done.t_favorite
+ */
+ public static final TFavorite T_FAVORITE = new TFavorite();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return TFavoriteRecord.class;
+ }
+
+ /**
+ * The column done.t_favorite.lastchange
.
+ */
+ public final TableField LASTCHANGE = createField(DSL.name("lastchange"), SQLDataType.LOCALDATETIME(6).defaultValue(DSL.field(DSL.raw("now()"), SQLDataType.LOCALDATETIME)), this, "");
+
+ /**
+ * The column done.t_favorite.pk_favorite
.
+ */
+ public final TableField PK_FAVORITE = createField(DSL.name("pk_favorite"), SQLDataType.INTEGER.nullable(false).identity(true), this, "");
+
+ /**
+ * The column done.t_favorite.fk_login
.
+ */
+ public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER.nullable(false), this, "");
+
+ /**
+ * The column done.t_favorite.fk_project
.
+ */
+ public final TableField FK_PROJECT = createField(DSL.name("fk_project"), SQLDataType.INTEGER, this, "");
+
+ /**
+ * The column done.t_favorite.fk_module
.
+ */
+ public final TableField FK_MODULE = createField(DSL.name("fk_module"), SQLDataType.INTEGER, this, "");
+
+ /**
+ * The column done.t_favorite.fk_job
.
+ */
+ public final TableField FK_JOB = createField(DSL.name("fk_job"), SQLDataType.INTEGER, this, "");
+
+ /**
+ * The column done.t_favorite.fk_billing
.
+ */
+ public final TableField FK_BILLING = createField(DSL.name("fk_billing"), SQLDataType.INTEGER, this, "");
+
+ private TFavorite(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private TFavorite(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
+ }
+
+ /**
+ * Create an aliased done.t_favorite
table reference
+ */
+ public TFavorite(String alias) {
+ this(DSL.name(alias), T_FAVORITE);
+ }
+
+ /**
+ * Create an aliased done.t_favorite
table reference
+ */
+ public TFavorite(Name alias) {
+ this(alias, T_FAVORITE);
+ }
+
+ /**
+ * Create a done.t_favorite
table reference
+ */
+ public TFavorite() {
+ this(DSL.name("t_favorite"), null);
+ }
+
+ public TFavorite(Table child, ForeignKey key) {
+ super(child, key, T_FAVORITE);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return aliased() ? null : Done.DONE;
+ }
+
+ @Override
+ public Identity getIdentity() {
+ return (Identity) super.getIdentity();
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.T_FAVORITE_PKEY;
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.asList(Keys.T_FAVORITE__T_FAVORITE_FK_LOGIN_FKEY, Keys.T_FAVORITE__T_FAVORITE_FK_PROJECT_FKEY, Keys.T_FAVORITE__T_FAVORITE_FK_MODULE_FKEY, Keys.T_FAVORITE__T_FAVORITE_FK_JOB_FKEY, Keys.T_FAVORITE__T_FAVORITE_FK_BILLING_FKEY);
+ }
+
+ private transient TLogin _tLogin;
+ private transient TProject _tProject;
+ private transient TModule _tModule;
+ private transient TJob _tJob;
+ private transient TBilling _tBilling;
+
+ /**
+ * Get the implicit join path to the profile.t_login
table.
+ */
+ public TLogin tLogin() {
+ if (_tLogin == null)
+ _tLogin = new TLogin(this, Keys.T_FAVORITE__T_FAVORITE_FK_LOGIN_FKEY);
+
+ return _tLogin;
+ }
+
+ /**
+ * Get the implicit join path to the done.t_project
table.
+ */
+ public TProject tProject() {
+ if (_tProject == null)
+ _tProject = new TProject(this, Keys.T_FAVORITE__T_FAVORITE_FK_PROJECT_FKEY);
+
+ return _tProject;
+ }
+
+ /**
+ * Get the implicit join path to the done.t_module
table.
+ */
+ public TModule tModule() {
+ if (_tModule == null)
+ _tModule = new TModule(this, Keys.T_FAVORITE__T_FAVORITE_FK_MODULE_FKEY);
+
+ return _tModule;
+ }
+
+ /**
+ * Get the implicit join path to the done.t_job
table.
+ */
+ public TJob tJob() {
+ if (_tJob == null)
+ _tJob = new TJob(this, Keys.T_FAVORITE__T_FAVORITE_FK_JOB_FKEY);
+
+ return _tJob;
+ }
+
+ /**
+ * Get the implicit join path to the done.t_billing
table.
+ */
+ public TBilling tBilling() {
+ if (_tBilling == null)
+ _tBilling = new TBilling(this, Keys.T_FAVORITE__T_FAVORITE_FK_BILLING_FKEY);
+
+ return _tBilling;
+ }
+
+ @Override
+ public TFavorite as(String alias) {
+ return new TFavorite(DSL.name(alias), this);
+ }
+
+ @Override
+ public TFavorite as(Name alias) {
+ return new TFavorite(alias, this);
+ }
+
+ @Override
+ public TFavorite as(Table> alias) {
+ return new TFavorite(alias.getQualifiedName(), this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public TFavorite rename(String name) {
+ return new TFavorite(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public TFavorite rename(Name name) {
+ return new TFavorite(name, null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public TFavorite rename(Table> name) {
+ return new TFavorite(name.getQualifiedName(), null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row7 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row7 fieldsRow() {
+ return (Row7) super.fieldsRow();
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Function)}.
+ */
+ public SelectField mapping(Function7 super LocalDateTime, ? super Integer, ? super Integer, ? super Integer, ? super Integer, ? super Integer, ? super Integer, ? extends U> from) {
+ return convertFrom(Records.mapping(from));
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Class,
+ * Function)}.
+ */
+ public SelectField mapping(Class toType, Function7 super LocalDateTime, ? super Integer, ? super Integer, ? super Integer, ? super Integer, ? super Integer, ? super Integer, ? extends U> from) {
+ return convertFrom(toType, Records.mapping(from));
+ }
+}
diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/VFavorite.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/VFavorite.java
new file mode 100644
index 0000000..5e47299
--- /dev/null
+++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/VFavorite.java
@@ -0,0 +1,192 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package de.jottyfan.timetrack.db.done.tables;
+
+
+import de.jottyfan.timetrack.db.done.Done;
+import de.jottyfan.timetrack.db.done.tables.records.VFavoriteRecord;
+
+import java.util.function.Function;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Function6;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Records;
+import org.jooq.Row6;
+import org.jooq.Schema;
+import org.jooq.SelectField;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.TableOptions;
+import org.jooq.impl.DSL;
+import org.jooq.impl.SQLDataType;
+import org.jooq.impl.TableImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class VFavorite extends TableImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of done.v_favorite
+ */
+ public static final VFavorite V_FAVORITE = new VFavorite();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return VFavoriteRecord.class;
+ }
+
+ /**
+ * The column done.v_favorite.pk_favorite
.
+ */
+ public final TableField PK_FAVORITE = createField(DSL.name("pk_favorite"), SQLDataType.INTEGER, this, "");
+
+ /**
+ * The column done.v_favorite.fk_login
.
+ */
+ public final TableField FK_LOGIN = createField(DSL.name("fk_login"), SQLDataType.INTEGER, this, "");
+
+ /**
+ * The column done.v_favorite.project
.
+ */
+ public final TableField PROJECT = createField(DSL.name("project"), SQLDataType.CLOB, this, "");
+
+ /**
+ * The column done.v_favorite.module
.
+ */
+ public final TableField MODULE = createField(DSL.name("module"), SQLDataType.CLOB, this, "");
+
+ /**
+ * The column done.v_favorite.job
.
+ */
+ public final TableField JOB = createField(DSL.name("job"), SQLDataType.CLOB, this, "");
+
+ /**
+ * The column done.v_favorite.billing
.
+ */
+ public final TableField BILLING = createField(DSL.name("billing"), SQLDataType.CLOB, this, "");
+
+ private VFavorite(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private VFavorite(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.view("""
+ create view "v_favorite" as SELECT f.pk_favorite,
+ f.fk_login,
+ p.name AS project,
+ m.name AS module,
+ j.name AS job,
+ b.name AS billing
+ FROM ((((done.t_favorite f
+ LEFT JOIN done.t_project p ON ((p.pk = f.fk_project)))
+ LEFT JOIN done.t_module m ON ((m.pk = f.fk_module)))
+ LEFT JOIN done.t_job j ON ((j.pk = f.fk_job)))
+ LEFT JOIN done.t_billing b ON ((b.pk = f.fk_billing)));
+ """));
+ }
+
+ /**
+ * Create an aliased done.v_favorite
table reference
+ */
+ public VFavorite(String alias) {
+ this(DSL.name(alias), V_FAVORITE);
+ }
+
+ /**
+ * Create an aliased done.v_favorite
table reference
+ */
+ public VFavorite(Name alias) {
+ this(alias, V_FAVORITE);
+ }
+
+ /**
+ * Create a done.v_favorite
table reference
+ */
+ public VFavorite() {
+ this(DSL.name("v_favorite"), null);
+ }
+
+ public VFavorite(Table child, ForeignKey key) {
+ super(child, key, V_FAVORITE);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return aliased() ? null : Done.DONE;
+ }
+
+ @Override
+ public VFavorite as(String alias) {
+ return new VFavorite(DSL.name(alias), this);
+ }
+
+ @Override
+ public VFavorite as(Name alias) {
+ return new VFavorite(alias, this);
+ }
+
+ @Override
+ public VFavorite as(Table> alias) {
+ return new VFavorite(alias.getQualifiedName(), this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public VFavorite rename(String name) {
+ return new VFavorite(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public VFavorite rename(Name name) {
+ return new VFavorite(name, null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public VFavorite rename(Table> name) {
+ return new VFavorite(name.getQualifiedName(), null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row6 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row6 fieldsRow() {
+ return (Row6) super.fieldsRow();
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Function)}.
+ */
+ public SelectField mapping(Function6 super Integer, ? super Integer, ? super String, ? super String, ? super String, ? super String, ? extends U> from) {
+ return convertFrom(Records.mapping(from));
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Class,
+ * Function)}.
+ */
+ public SelectField mapping(Class toType, Function6 super Integer, ? super Integer, ? super String, ? super String, ? super String, ? super String, ? extends U> from) {
+ return convertFrom(toType, Records.mapping(from));
+ }
+}
diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TFavoriteRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TFavoriteRecord.java
new file mode 100644
index 0000000..962d8f1
--- /dev/null
+++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/TFavoriteRecord.java
@@ -0,0 +1,332 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package de.jottyfan.timetrack.db.done.tables.records;
+
+
+import de.jottyfan.timetrack.db.done.tables.TFavorite;
+
+import java.time.LocalDateTime;
+
+import org.jooq.Field;
+import org.jooq.Record1;
+import org.jooq.Record7;
+import org.jooq.Row7;
+import org.jooq.impl.UpdatableRecordImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class TFavoriteRecord extends UpdatableRecordImpl implements Record7 {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Setter for done.t_favorite.lastchange
.
+ */
+ public void setLastchange(LocalDateTime value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for done.t_favorite.lastchange
.
+ */
+ public LocalDateTime getLastchange() {
+ return (LocalDateTime) get(0);
+ }
+
+ /**
+ * Setter for done.t_favorite.pk_favorite
.
+ */
+ public void setPkFavorite(Integer value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for done.t_favorite.pk_favorite
.
+ */
+ public Integer getPkFavorite() {
+ return (Integer) get(1);
+ }
+
+ /**
+ * Setter for done.t_favorite.fk_login
.
+ */
+ public void setFkLogin(Integer value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for done.t_favorite.fk_login
.
+ */
+ public Integer getFkLogin() {
+ return (Integer) get(2);
+ }
+
+ /**
+ * Setter for done.t_favorite.fk_project
.
+ */
+ public void setFkProject(Integer value) {
+ set(3, value);
+ }
+
+ /**
+ * Getter for done.t_favorite.fk_project
.
+ */
+ public Integer getFkProject() {
+ return (Integer) get(3);
+ }
+
+ /**
+ * Setter for done.t_favorite.fk_module
.
+ */
+ public void setFkModule(Integer value) {
+ set(4, value);
+ }
+
+ /**
+ * Getter for done.t_favorite.fk_module
.
+ */
+ public Integer getFkModule() {
+ return (Integer) get(4);
+ }
+
+ /**
+ * Setter for done.t_favorite.fk_job
.
+ */
+ public void setFkJob(Integer value) {
+ set(5, value);
+ }
+
+ /**
+ * Getter for done.t_favorite.fk_job
.
+ */
+ public Integer getFkJob() {
+ return (Integer) get(5);
+ }
+
+ /**
+ * Setter for done.t_favorite.fk_billing
.
+ */
+ public void setFkBilling(Integer value) {
+ set(6, value);
+ }
+
+ /**
+ * Getter for done.t_favorite.fk_billing
.
+ */
+ public Integer getFkBilling() {
+ return (Integer) get(6);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record1 key() {
+ return (Record1) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record7 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row7 fieldsRow() {
+ return (Row7) super.fieldsRow();
+ }
+
+ @Override
+ public Row7 valuesRow() {
+ return (Row7) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return TFavorite.T_FAVORITE.LASTCHANGE;
+ }
+
+ @Override
+ public Field field2() {
+ return TFavorite.T_FAVORITE.PK_FAVORITE;
+ }
+
+ @Override
+ public Field field3() {
+ return TFavorite.T_FAVORITE.FK_LOGIN;
+ }
+
+ @Override
+ public Field field4() {
+ return TFavorite.T_FAVORITE.FK_PROJECT;
+ }
+
+ @Override
+ public Field field5() {
+ return TFavorite.T_FAVORITE.FK_MODULE;
+ }
+
+ @Override
+ public Field field6() {
+ return TFavorite.T_FAVORITE.FK_JOB;
+ }
+
+ @Override
+ public Field field7() {
+ return TFavorite.T_FAVORITE.FK_BILLING;
+ }
+
+ @Override
+ public LocalDateTime component1() {
+ return getLastchange();
+ }
+
+ @Override
+ public Integer component2() {
+ return getPkFavorite();
+ }
+
+ @Override
+ public Integer component3() {
+ return getFkLogin();
+ }
+
+ @Override
+ public Integer component4() {
+ return getFkProject();
+ }
+
+ @Override
+ public Integer component5() {
+ return getFkModule();
+ }
+
+ @Override
+ public Integer component6() {
+ return getFkJob();
+ }
+
+ @Override
+ public Integer component7() {
+ return getFkBilling();
+ }
+
+ @Override
+ public LocalDateTime value1() {
+ return getLastchange();
+ }
+
+ @Override
+ public Integer value2() {
+ return getPkFavorite();
+ }
+
+ @Override
+ public Integer value3() {
+ return getFkLogin();
+ }
+
+ @Override
+ public Integer value4() {
+ return getFkProject();
+ }
+
+ @Override
+ public Integer value5() {
+ return getFkModule();
+ }
+
+ @Override
+ public Integer value6() {
+ return getFkJob();
+ }
+
+ @Override
+ public Integer value7() {
+ return getFkBilling();
+ }
+
+ @Override
+ public TFavoriteRecord value1(LocalDateTime value) {
+ setLastchange(value);
+ return this;
+ }
+
+ @Override
+ public TFavoriteRecord value2(Integer value) {
+ setPkFavorite(value);
+ return this;
+ }
+
+ @Override
+ public TFavoriteRecord value3(Integer value) {
+ setFkLogin(value);
+ return this;
+ }
+
+ @Override
+ public TFavoriteRecord value4(Integer value) {
+ setFkProject(value);
+ return this;
+ }
+
+ @Override
+ public TFavoriteRecord value5(Integer value) {
+ setFkModule(value);
+ return this;
+ }
+
+ @Override
+ public TFavoriteRecord value6(Integer value) {
+ setFkJob(value);
+ return this;
+ }
+
+ @Override
+ public TFavoriteRecord value7(Integer value) {
+ setFkBilling(value);
+ return this;
+ }
+
+ @Override
+ public TFavoriteRecord values(LocalDateTime value1, Integer value2, Integer value3, Integer value4, Integer value5, Integer value6, Integer value7) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ value4(value4);
+ value5(value5);
+ value6(value6);
+ value7(value7);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached TFavoriteRecord
+ */
+ public TFavoriteRecord() {
+ super(TFavorite.T_FAVORITE);
+ }
+
+ /**
+ * Create a detached, initialised TFavoriteRecord
+ */
+ public TFavoriteRecord(LocalDateTime lastchange, Integer pkFavorite, Integer fkLogin, Integer fkProject, Integer fkModule, Integer fkJob, Integer fkBilling) {
+ super(TFavorite.T_FAVORITE);
+
+ setLastchange(lastchange);
+ setPkFavorite(pkFavorite);
+ setFkLogin(fkLogin);
+ setFkProject(fkProject);
+ setFkModule(fkModule);
+ setFkJob(fkJob);
+ setFkBilling(fkBilling);
+ resetChangedOnNotNull();
+ }
+}
diff --git a/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VFavoriteRecord.java b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VFavoriteRecord.java
new file mode 100644
index 0000000..affeb76
--- /dev/null
+++ b/src/main/java/de/jottyfan/timetrack/db/done/tables/records/VFavoriteRecord.java
@@ -0,0 +1,283 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package de.jottyfan.timetrack.db.done.tables.records;
+
+
+import de.jottyfan.timetrack.db.done.tables.VFavorite;
+
+import org.jooq.Field;
+import org.jooq.Record6;
+import org.jooq.Row6;
+import org.jooq.impl.TableRecordImpl;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class VFavoriteRecord extends TableRecordImpl implements Record6 {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Setter for done.v_favorite.pk_favorite
.
+ */
+ public void setPkFavorite(Integer value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for done.v_favorite.pk_favorite
.
+ */
+ public Integer getPkFavorite() {
+ return (Integer) get(0);
+ }
+
+ /**
+ * Setter for done.v_favorite.fk_login
.
+ */
+ public void setFkLogin(Integer value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for done.v_favorite.fk_login
.
+ */
+ public Integer getFkLogin() {
+ return (Integer) get(1);
+ }
+
+ /**
+ * Setter for done.v_favorite.project
.
+ */
+ public void setProject(String value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for done.v_favorite.project
.
+ */
+ public String getProject() {
+ return (String) get(2);
+ }
+
+ /**
+ * Setter for done.v_favorite.module
.
+ */
+ public void setModule(String value) {
+ set(3, value);
+ }
+
+ /**
+ * Getter for done.v_favorite.module
.
+ */
+ public String getModule() {
+ return (String) get(3);
+ }
+
+ /**
+ * Setter for done.v_favorite.job
.
+ */
+ public void setJob(String value) {
+ set(4, value);
+ }
+
+ /**
+ * Getter for done.v_favorite.job
.
+ */
+ public String getJob() {
+ return (String) get(4);
+ }
+
+ /**
+ * Setter for done.v_favorite.billing
.
+ */
+ public void setBilling(String value) {
+ set(5, value);
+ }
+
+ /**
+ * Getter for done.v_favorite.billing
.
+ */
+ public String getBilling() {
+ return (String) get(5);
+ }
+
+ // -------------------------------------------------------------------------
+ // Record6 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row6 fieldsRow() {
+ return (Row6) super.fieldsRow();
+ }
+
+ @Override
+ public Row6 valuesRow() {
+ return (Row6) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return VFavorite.V_FAVORITE.PK_FAVORITE;
+ }
+
+ @Override
+ public Field field2() {
+ return VFavorite.V_FAVORITE.FK_LOGIN;
+ }
+
+ @Override
+ public Field field3() {
+ return VFavorite.V_FAVORITE.PROJECT;
+ }
+
+ @Override
+ public Field field4() {
+ return VFavorite.V_FAVORITE.MODULE;
+ }
+
+ @Override
+ public Field field5() {
+ return VFavorite.V_FAVORITE.JOB;
+ }
+
+ @Override
+ public Field field6() {
+ return VFavorite.V_FAVORITE.BILLING;
+ }
+
+ @Override
+ public Integer component1() {
+ return getPkFavorite();
+ }
+
+ @Override
+ public Integer component2() {
+ return getFkLogin();
+ }
+
+ @Override
+ public String component3() {
+ return getProject();
+ }
+
+ @Override
+ public String component4() {
+ return getModule();
+ }
+
+ @Override
+ public String component5() {
+ return getJob();
+ }
+
+ @Override
+ public String component6() {
+ return getBilling();
+ }
+
+ @Override
+ public Integer value1() {
+ return getPkFavorite();
+ }
+
+ @Override
+ public Integer value2() {
+ return getFkLogin();
+ }
+
+ @Override
+ public String value3() {
+ return getProject();
+ }
+
+ @Override
+ public String value4() {
+ return getModule();
+ }
+
+ @Override
+ public String value5() {
+ return getJob();
+ }
+
+ @Override
+ public String value6() {
+ return getBilling();
+ }
+
+ @Override
+ public VFavoriteRecord value1(Integer value) {
+ setPkFavorite(value);
+ return this;
+ }
+
+ @Override
+ public VFavoriteRecord value2(Integer value) {
+ setFkLogin(value);
+ return this;
+ }
+
+ @Override
+ public VFavoriteRecord value3(String value) {
+ setProject(value);
+ return this;
+ }
+
+ @Override
+ public VFavoriteRecord value4(String value) {
+ setModule(value);
+ return this;
+ }
+
+ @Override
+ public VFavoriteRecord value5(String value) {
+ setJob(value);
+ return this;
+ }
+
+ @Override
+ public VFavoriteRecord value6(String value) {
+ setBilling(value);
+ return this;
+ }
+
+ @Override
+ public VFavoriteRecord values(Integer value1, Integer value2, String value3, String value4, String value5, String value6) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ value4(value4);
+ value5(value5);
+ value6(value6);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached VFavoriteRecord
+ */
+ public VFavoriteRecord() {
+ super(VFavorite.V_FAVORITE);
+ }
+
+ /**
+ * Create a detached, initialised VFavoriteRecord
+ */
+ public VFavoriteRecord(Integer pkFavorite, Integer fkLogin, String project, String module, String job, String billing) {
+ super(VFavorite.V_FAVORITE);
+
+ setPkFavorite(pkFavorite);
+ setFkLogin(fkLogin);
+ setProject(project);
+ setModule(module);
+ setJob(job);
+ setBilling(billing);
+ resetChangedOnNotNull();
+ }
+}
diff --git a/src/main/resources/done.sql b/src/main/resources/done.sql
index b2b7097..d9c385f 100644
--- a/src/main/resources/done.sql
+++ b/src/main/resources/done.sql
@@ -38,6 +38,24 @@ create table done.t_done (
fk_billing integer references done.t_billing(pk)
);
+create table done.t_favorite (
+ lastchange timestamp without time zone default now(),
+ pk_favorite integer not null primary key generated always as identity,
+ fk_login integer not null references profile.t_login(pk),
+ fk_project integer references done.t_project(pk),
+ fk_module integer references done.t_module(pk),
+ fk_job integer references done.t_job(pk),
+ fk_billing integer references done.t_billing(pk)
+);
+
+create view done.v_favorite as
+select f.pk_favorite, f.fk_login, p.name as project, m.name as module, j.name as job, b.name as billing
+from done.t_favorite f
+left join done.t_project p on p.pk = f.fk_project
+left join done.t_module m on m.pk = f.fk_module
+left join done.t_job j on j.pk = f.fk_job
+left join done.t_billing b on b.pk = f.fk_billing;
+
create view done.v_billing as
with x(total) as (
select coalesce(nullif(count(1), 0), 1) as count
@@ -302,6 +320,8 @@ grant select,insert,delete,update on table done.t_done to timetrack;
grant select,insert,delete,update on table done.t_job to timetrack;
grant select,insert,delete,update on table done.t_module to timetrack;
grant select,insert,delete,update on table done.t_project to timetrack;
+grant select,insert,delete,update on table done.t_favorite to timetrack;
+grant select on table done.v_favorite to timetrack;
grant select on table done.v_billing to timetrack;
grant select on table done.v_done to timetrack;
grant select on table done.v_duration to timetrack;