diff --git a/.github/workflows/.trivyignore b/.github/workflows/.trivyignore
index e74d4f0..e69de29 100644
--- a/.github/workflows/.trivyignore
+++ b/.github/workflows/.trivyignore
@@ -1,4 +0,0 @@
-# Date: Feb 12, 2024
-# Notes: Issue with libexpat, parsing large tokens can trigger a denial of service
-# Needs to be fixed in Docker Image.
-CVE-2023-52425
\ No newline at end of file
diff --git a/pom.xml b/pom.xml
index ffea6a6..43a49b9 100644
--- a/pom.xml
+++ b/pom.xml
@@ -6,7 +6,7 @@
org.springframework.boot
spring-boot-starter-parent
- 3.2.3
+ 3.2.4
eu.dissco.core
diff --git a/src/main/java/eu/dissco/core/translator/ProjectRunner.java b/src/main/java/eu/dissco/core/translator/ProjectRunner.java
index 643f999..e06319a 100644
--- a/src/main/java/eu/dissco/core/translator/ProjectRunner.java
+++ b/src/main/java/eu/dissco/core/translator/ProjectRunner.java
@@ -1,5 +1,6 @@
package eu.dissco.core.translator;
+import eu.dissco.core.translator.service.TranslatorJobRecordService;
import eu.dissco.core.translator.service.WebClientService;
import lombok.AllArgsConstructor;
import lombok.extern.slf4j.Slf4j;
@@ -14,10 +15,13 @@ public class ProjectRunner implements CommandLineRunner {
private final WebClientService webService;
private final ConfigurableApplicationContext context;
+ private final TranslatorJobRecordService tjrService;
@Override
public void run(String... args) {
- webService.retrieveData();
+ var jobId = tjrService.createNewJobRecord();
+ var processingResult = webService.retrieveData();
+ tjrService.updateJobState(jobId, processingResult);
context.close();
}
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/DefaultCatalog.java b/src/main/java/eu/dissco/core/translator/database/jooq/DefaultCatalog.java
index cc26e9e..27f8100 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/DefaultCatalog.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/DefaultCatalog.java
@@ -6,6 +6,7 @@
import java.util.Arrays;
import java.util.List;
+
import org.jooq.Constants;
import org.jooq.Schema;
import org.jooq.impl.CatalogImpl;
@@ -14,37 +15,40 @@
/**
* This class is generated by jOOQ.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class DefaultCatalog extends CatalogImpl {
- /**
- * The reference instance of DEFAULT_CATALOG
- */
- public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
- private static final long serialVersionUID = 1L;
- /**
- * A reference to the 3.18 minor release of the code generator. If this doesn't compile, it's
- * because the runtime library uses an older minor release, namely: 3.18. You can turn off the
- * generation of this reference by specifying
- * /configuration/generator/generate/jooqVersionReference
- */
- private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_18;
- /**
- * The schema public
.
- */
- public final Public PUBLIC = Public.PUBLIC;
-
- /**
- * No further instances allowed
- */
- private DefaultCatalog() {
- super("");
- }
-
- @Override
- public final List getSchemas() {
- return Arrays.asList(
- Public.PUBLIC
- );
- }
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of DEFAULT_CATALOG
+ */
+ public static final DefaultCatalog DEFAULT_CATALOG = new DefaultCatalog();
+
+ /**
+ * The schema public
.
+ */
+ public final Public PUBLIC = Public.PUBLIC;
+
+ /**
+ * No further instances allowed
+ */
+ private DefaultCatalog() {
+ super("");
+ }
+
+ @Override
+ public final List getSchemas() {
+ return Arrays.asList(
+ Public.PUBLIC
+ );
+ }
+
+ /**
+ * A reference to the 3.18 minor release of the code generator. If this
+ * doesn't compile, it's because the runtime library uses an older minor
+ * release, namely: 3.18. You can turn off the generation of this reference
+ * by specifying /configuration/generator/generate/jooqVersionReference
+ */
+ private static final String REQUIRE_RUNTIME_JOOQ_VERSION = Constants.VERSION_3_18;
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/Keys.java b/src/main/java/eu/dissco/core/translator/database/jooq/Keys.java
index c94a65a..37a2e57 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/Keys.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/Keys.java
@@ -6,8 +6,12 @@
import eu.dissco.core.translator.database.jooq.tables.Mapping;
import eu.dissco.core.translator.database.jooq.tables.SourceSystem;
+import eu.dissco.core.translator.database.jooq.tables.TranslatorJobRecord;
import eu.dissco.core.translator.database.jooq.tables.records.MappingRecord;
import eu.dissco.core.translator.database.jooq.tables.records.SourceSystemRecord;
+import eu.dissco.core.translator.database.jooq.tables.records.TranslatorJobRecordRecord;
+
+import org.jooq.ForeignKey;
import org.jooq.TableField;
import org.jooq.UniqueKey;
import org.jooq.impl.DSL;
@@ -15,19 +19,23 @@
/**
- * A class modelling foreign key relationships and constraints of tables in public.
+ * A class modelling foreign key relationships and constraints of tables in
+ * public.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Keys {
- // -------------------------------------------------------------------------
- // UNIQUE and PRIMARY KEY definitions
- // -------------------------------------------------------------------------
+ // -------------------------------------------------------------------------
+ // UNIQUE and PRIMARY KEY definitions
+ // -------------------------------------------------------------------------
+
+ public static final UniqueKey NEW_MAPPING_PK = Internal.createUniqueKey(Mapping.MAPPING, DSL.name("new_mapping_pk"), new TableField[] { Mapping.MAPPING.ID, Mapping.MAPPING.VERSION }, true);
+ public static final UniqueKey NEW_SOURCE_SYSTEM_PKEY = Internal.createUniqueKey(SourceSystem.SOURCE_SYSTEM, DSL.name("new_source_system_pkey"), new TableField[] { SourceSystem.SOURCE_SYSTEM.ID }, true);
+ public static final UniqueKey TRANSLATOR_JOB_RECORD_PKEY = Internal.createUniqueKey(TranslatorJobRecord.TRANSLATOR_JOB_RECORD, DSL.name("translator_job_record_pkey"), new TableField[] { TranslatorJobRecord.TRANSLATOR_JOB_RECORD.JOB_ID, TranslatorJobRecord.TRANSLATOR_JOB_RECORD.SOURCE_SYSTEM_ID }, true);
+
+ // -------------------------------------------------------------------------
+ // FOREIGN KEY definitions
+ // -------------------------------------------------------------------------
- public static final UniqueKey NEW_MAPPING_PK = Internal.createUniqueKey(
- Mapping.MAPPING, DSL.name("new_mapping_pk"),
- new TableField[]{Mapping.MAPPING.ID, Mapping.MAPPING.VERSION}, true);
- public static final UniqueKey NEW_SOURCE_SYSTEM_PKEY = Internal.createUniqueKey(
- SourceSystem.SOURCE_SYSTEM, DSL.name("new_source_system_pkey"),
- new TableField[]{SourceSystem.SOURCE_SYSTEM.ID}, true);
+ public static final ForeignKey TRANSLATOR_JOB_RECORD__TRANSLATOR_JOB_RECORD_SOURCE_SYSTEM_ID_FKEY = Internal.createForeignKey(TranslatorJobRecord.TRANSLATOR_JOB_RECORD, DSL.name("translator_job_record_source_system_id_fkey"), new TableField[] { TranslatorJobRecord.TRANSLATOR_JOB_RECORD.SOURCE_SYSTEM_ID }, Keys.NEW_SOURCE_SYSTEM_PKEY, new TableField[] { SourceSystem.SOURCE_SYSTEM.ID }, true);
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/Public.java b/src/main/java/eu/dissco/core/translator/database/jooq/Public.java
index 662c659..3afc5fd 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/Public.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/Public.java
@@ -6,6 +6,8 @@
import eu.dissco.core.translator.database.jooq.tables.Mapping;
import eu.dissco.core.translator.database.jooq.tables.SourceSystem;
+import eu.dissco.core.translator.database.jooq.tables.TranslatorJobRecord;
+
import java.util.Arrays;
import java.util.List;
@@ -17,42 +19,50 @@
/**
* This class is generated by jOOQ.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Public extends SchemaImpl {
- /**
- * The reference instance of public
- */
- public static final Public PUBLIC = new Public();
- private static final long serialVersionUID = 1L;
- /**
- * The table public.mapping
.
- */
- public final Mapping MAPPING = Mapping.MAPPING;
-
- /**
- * The table public.source_system
.
- */
- public final SourceSystem SOURCE_SYSTEM = SourceSystem.SOURCE_SYSTEM;
-
- /**
- * No further instances allowed
- */
- private Public() {
- super("public", null);
- }
-
-
- @Override
- public Catalog getCatalog() {
- return DefaultCatalog.DEFAULT_CATALOG;
- }
-
- @Override
- public final List> getTables() {
- return Arrays.asList(
- Mapping.MAPPING,
- SourceSystem.SOURCE_SYSTEM
- );
- }
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of public
+ */
+ public static final Public PUBLIC = new Public();
+
+ /**
+ * The table public.mapping
.
+ */
+ public final Mapping MAPPING = Mapping.MAPPING;
+
+ /**
+ * The table public.source_system
.
+ */
+ public final SourceSystem SOURCE_SYSTEM = SourceSystem.SOURCE_SYSTEM;
+
+ /**
+ * The table public.translator_job_record
.
+ */
+ public final TranslatorJobRecord TRANSLATOR_JOB_RECORD = TranslatorJobRecord.TRANSLATOR_JOB_RECORD;
+
+ /**
+ * No further instances allowed
+ */
+ private Public() {
+ super("public", null);
+ }
+
+
+ @Override
+ public Catalog getCatalog() {
+ return DefaultCatalog.DEFAULT_CATALOG;
+ }
+
+ @Override
+ public final List> getTables() {
+ return Arrays.asList(
+ Mapping.MAPPING,
+ SourceSystem.SOURCE_SYSTEM,
+ TranslatorJobRecord.TRANSLATOR_JOB_RECORD
+ );
+ }
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/Tables.java b/src/main/java/eu/dissco/core/translator/database/jooq/Tables.java
index 9e8654d..768314b 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/Tables.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/Tables.java
@@ -6,21 +6,27 @@
import eu.dissco.core.translator.database.jooq.tables.Mapping;
import eu.dissco.core.translator.database.jooq.tables.SourceSystem;
+import eu.dissco.core.translator.database.jooq.tables.TranslatorJobRecord;
/**
* Convenience access to all tables in public.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Tables {
- /**
- * The table public.mapping
.
- */
- public static final Mapping MAPPING = Mapping.MAPPING;
+ /**
+ * The table public.mapping
.
+ */
+ public static final Mapping MAPPING = Mapping.MAPPING;
- /**
- * The table public.source_system
.
- */
- public static final SourceSystem SOURCE_SYSTEM = SourceSystem.SOURCE_SYSTEM;
+ /**
+ * The table public.source_system
.
+ */
+ public static final SourceSystem SOURCE_SYSTEM = SourceSystem.SOURCE_SYSTEM;
+
+ /**
+ * The table public.translator_job_record
.
+ */
+ public static final TranslatorJobRecord TRANSLATOR_JOB_RECORD = TranslatorJobRecord.TRANSLATOR_JOB_RECORD;
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/enums/ErrorCode.java b/src/main/java/eu/dissco/core/translator/database/jooq/enums/ErrorCode.java
new file mode 100644
index 0000000..14ed1fe
--- /dev/null
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/enums/ErrorCode.java
@@ -0,0 +1,56 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package eu.dissco.core.translator.database.jooq.enums;
+
+
+import eu.dissco.core.translator.database.jooq.Public;
+
+import org.jooq.Catalog;
+import org.jooq.EnumType;
+import org.jooq.Schema;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public enum ErrorCode implements EnumType {
+
+ TIMEOUT("TIMEOUT"),
+
+ DISSCO_EXCEPTION("DISSCO_EXCEPTION");
+
+ private final String literal;
+
+ private ErrorCode(String literal) {
+ this.literal = literal;
+ }
+
+ @Override
+ public Catalog getCatalog() {
+ return getSchema().getCatalog();
+ }
+
+ @Override
+ public Schema getSchema() {
+ return Public.PUBLIC;
+ }
+
+ @Override
+ public String getName() {
+ return "error_code";
+ }
+
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Lookup a value of this EnumType by its literal
+ */
+ public static ErrorCode lookupLiteral(String literal) {
+ return EnumType.lookupLiteral(ErrorCode.class, literal);
+ }
+}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/enums/JobState.java b/src/main/java/eu/dissco/core/translator/database/jooq/enums/JobState.java
new file mode 100644
index 0000000..0199881
--- /dev/null
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/enums/JobState.java
@@ -0,0 +1,60 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package eu.dissco.core.translator.database.jooq.enums;
+
+
+import eu.dissco.core.translator.database.jooq.Public;
+
+import org.jooq.Catalog;
+import org.jooq.EnumType;
+import org.jooq.Schema;
+
+
+/**
+ * This class is generated by jOOQ.
+ */
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public enum JobState implements EnumType {
+
+ SCHEDULED("SCHEDULED"),
+
+ RUNNING("RUNNING"),
+
+ FAILED("FAILED"),
+
+ COMPLETED("COMPLETED");
+
+ private final String literal;
+
+ private JobState(String literal) {
+ this.literal = literal;
+ }
+
+ @Override
+ public Catalog getCatalog() {
+ return getSchema().getCatalog();
+ }
+
+ @Override
+ public Schema getSchema() {
+ return Public.PUBLIC;
+ }
+
+ @Override
+ public String getName() {
+ return "job_state";
+ }
+
+ @Override
+ public String getLiteral() {
+ return literal;
+ }
+
+ /**
+ * Lookup a value of this EnumType by its literal
+ */
+ public static JobState lookupLiteral(String literal) {
+ return EnumType.lookupLiteral(JobState.class, literal);
+ }
+}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/tables/Mapping.java b/src/main/java/eu/dissco/core/translator/database/jooq/tables/Mapping.java
index eca9599..f42d163 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/tables/Mapping.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/tables/Mapping.java
@@ -7,8 +7,10 @@
import eu.dissco.core.translator.database.jooq.Keys;
import eu.dissco.core.translator.database.jooq.Public;
import eu.dissco.core.translator.database.jooq.tables.records.MappingRecord;
+
import java.time.Instant;
import java.util.function.Function;
+
import org.jooq.Field;
import org.jooq.ForeignKey;
import org.jooq.Function9;
@@ -31,172 +33,172 @@
/**
* This class is generated by jOOQ.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class Mapping extends TableImpl {
- /**
- * The reference instance of public.mapping
- */
- public static final Mapping MAPPING = new Mapping();
- private static final long serialVersionUID = 1L;
- /**
- * The column public.mapping.id
.
- */
- public final TableField ID = createField(DSL.name("id"),
- SQLDataType.CLOB.nullable(false), this, "");
- /**
- * The column public.mapping.version
.
- */
- public final TableField VERSION = createField(DSL.name("version"),
- SQLDataType.INTEGER.nullable(false), this, "");
- /**
- * The column public.mapping.name
.
- */
- public final TableField NAME = createField(DSL.name("name"),
- SQLDataType.CLOB.nullable(false), this, "");
- /**
- * The column public.mapping.description
.
- */
- public final TableField DESCRIPTION = createField(DSL.name("description"),
- SQLDataType.CLOB, this, "");
- /**
- * The column public.mapping.mapping
.
- */
- public final TableField MAPPING_ = createField(DSL.name("mapping"),
- SQLDataType.JSONB.nullable(false), this, "");
- /**
- * The column public.mapping.created
.
- */
- public final TableField CREATED = createField(DSL.name("created"),
- SQLDataType.INSTANT.nullable(false), this, "");
- /**
- * The column public.mapping.creator
.
- */
- public final TableField CREATOR = createField(DSL.name("creator"),
- SQLDataType.CLOB.nullable(false), this, "");
- /**
- * The column public.mapping.deleted
.
- */
- public final TableField DELETED = createField(DSL.name("deleted"),
- SQLDataType.INSTANT, this, "");
- /**
- * The column public.mapping.sourcedatastandard
.
- */
- public final TableField SOURCEDATASTANDARD = createField(
- DSL.name("sourcedatastandard"), SQLDataType.VARCHAR.nullable(false), this, "");
-
- private Mapping(Name alias, Table aliased) {
- this(alias, aliased, null);
- }
-
- private Mapping(Name alias, Table aliased, Field>[] parameters) {
- super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
- }
-
- /**
- * Create an aliased public.mapping
table reference
- */
- public Mapping(String alias) {
- this(DSL.name(alias), MAPPING);
- }
-
- /**
- * Create an aliased public.mapping
table reference
- */
- public Mapping(Name alias) {
- this(alias, MAPPING);
- }
-
- /**
- * Create a public.mapping
table reference
- */
- public Mapping() {
- this(DSL.name("mapping"), null);
- }
-
- public Mapping(Table child, ForeignKey key) {
- super(child, key, MAPPING);
- }
-
- /**
- * The class holding records for this type
- */
- @Override
- public Class getRecordType() {
- return MappingRecord.class;
- }
-
- @Override
- public Schema getSchema() {
- return aliased() ? null : Public.PUBLIC;
- }
-
- @Override
- public UniqueKey getPrimaryKey() {
- return Keys.NEW_MAPPING_PK;
- }
-
- @Override
- public Mapping as(String alias) {
- return new Mapping(DSL.name(alias), this);
- }
-
- @Override
- public Mapping as(Name alias) {
- return new Mapping(alias, this);
- }
-
- @Override
- public Mapping as(Table> alias) {
- return new Mapping(alias.getQualifiedName(), this);
- }
-
- /**
- * Rename this table
- */
- @Override
- public Mapping rename(String name) {
- return new Mapping(DSL.name(name), null);
- }
-
- /**
- * Rename this table
- */
- @Override
- public Mapping rename(Name name) {
- return new Mapping(name, null);
- }
-
- /**
- * Rename this table
- */
- @Override
- public Mapping rename(Table> name) {
- return new Mapping(name.getQualifiedName(), null);
- }
-
- // -------------------------------------------------------------------------
- // Row9 type methods
- // -------------------------------------------------------------------------
-
- @Override
- public Row9 fieldsRow() {
- return (Row9) super.fieldsRow();
- }
-
- /**
- * Convenience mapping calling {@link SelectField#convertFrom(Function)}.
- */
- public SelectField mapping(
- Function9 super String, ? super Integer, ? super String, ? super String, ? super JSONB, ? super Instant, ? super String, ? super Instant, ? super String, ? extends U> from) {
- return convertFrom(Records.mapping(from));
- }
-
- /**
- * Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
- */
- public SelectField mapping(Class toType,
- Function9 super String, ? super Integer, ? super String, ? super String, ? super JSONB, ? super Instant, ? super String, ? super Instant, ? super String, ? extends U> from) {
- return convertFrom(toType, Records.mapping(from));
- }
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of public.mapping
+ */
+ public static final Mapping MAPPING = new Mapping();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return MappingRecord.class;
+ }
+
+ /**
+ * The column public.mapping.id
.
+ */
+ public final TableField ID = createField(DSL.name("id"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.mapping.version
.
+ */
+ public final TableField VERSION = createField(DSL.name("version"), SQLDataType.INTEGER.nullable(false), this, "");
+
+ /**
+ * The column public.mapping.name
.
+ */
+ public final TableField NAME = createField(DSL.name("name"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.mapping.description
.
+ */
+ public final TableField DESCRIPTION = createField(DSL.name("description"), SQLDataType.CLOB, this, "");
+
+ /**
+ * The column public.mapping.mapping
.
+ */
+ public final TableField MAPPING_ = createField(DSL.name("mapping"), SQLDataType.JSONB.nullable(false), this, "");
+
+ /**
+ * The column public.mapping.created
.
+ */
+ public final TableField CREATED = createField(DSL.name("created"), SQLDataType.INSTANT.nullable(false), this, "");
+
+ /**
+ * The column public.mapping.creator
.
+ */
+ public final TableField CREATOR = createField(DSL.name("creator"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.mapping.deleted
.
+ */
+ public final TableField DELETED = createField(DSL.name("deleted"), SQLDataType.INSTANT, this, "");
+
+ /**
+ * The column public.mapping.sourcedatastandard
.
+ */
+ public final TableField SOURCEDATASTANDARD = createField(DSL.name("sourcedatastandard"), SQLDataType.VARCHAR.nullable(false), this, "");
+
+ private Mapping(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private Mapping(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
+ }
+
+ /**
+ * Create an aliased public.mapping
table reference
+ */
+ public Mapping(String alias) {
+ this(DSL.name(alias), MAPPING);
+ }
+
+ /**
+ * Create an aliased public.mapping
table reference
+ */
+ public Mapping(Name alias) {
+ this(alias, MAPPING);
+ }
+
+ /**
+ * Create a public.mapping
table reference
+ */
+ public Mapping() {
+ this(DSL.name("mapping"), null);
+ }
+
+ public Mapping(Table child, ForeignKey key) {
+ super(child, key, MAPPING);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return aliased() ? null : Public.PUBLIC;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.NEW_MAPPING_PK;
+ }
+
+ @Override
+ public Mapping as(String alias) {
+ return new Mapping(DSL.name(alias), this);
+ }
+
+ @Override
+ public Mapping as(Name alias) {
+ return new Mapping(alias, this);
+ }
+
+ @Override
+ public Mapping as(Table> alias) {
+ return new Mapping(alias.getQualifiedName(), this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Mapping rename(String name) {
+ return new Mapping(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Mapping rename(Name name) {
+ return new Mapping(name, null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public Mapping rename(Table> name) {
+ return new Mapping(name.getQualifiedName(), null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row9 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row9 fieldsRow() {
+ return (Row9) super.fieldsRow();
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Function)}.
+ */
+ public SelectField mapping(Function9 super String, ? super Integer, ? super String, ? super String, ? super JSONB, ? super Instant, ? super String, ? super Instant, ? super String, ? extends U> from) {
+ return convertFrom(Records.mapping(from));
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Class,
+ * Function)}.
+ */
+ public SelectField mapping(Class toType, Function9 super String, ? super Integer, ? super String, ? super String, ? super JSONB, ? super Instant, ? super String, ? super Instant, ? super String, ? extends U> from) {
+ return convertFrom(toType, Records.mapping(from));
+ }
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/tables/SourceSystem.java b/src/main/java/eu/dissco/core/translator/database/jooq/tables/SourceSystem.java
index d45d64c..a7b497f 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/tables/SourceSystem.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/tables/SourceSystem.java
@@ -7,15 +7,17 @@
import eu.dissco.core.translator.database.jooq.Keys;
import eu.dissco.core.translator.database.jooq.Public;
import eu.dissco.core.translator.database.jooq.tables.records.SourceSystemRecord;
+
import java.time.Instant;
import java.util.function.Function;
+
import org.jooq.Field;
import org.jooq.ForeignKey;
-import org.jooq.Function9;
+import org.jooq.Function10;
import org.jooq.Name;
import org.jooq.Record;
import org.jooq.Records;
-import org.jooq.Row9;
+import org.jooq.Row10;
import org.jooq.Schema;
import org.jooq.SelectField;
import org.jooq.Table;
@@ -30,175 +32,177 @@
/**
* This class is generated by jOOQ.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
public class SourceSystem extends TableImpl {
- /**
- * The reference instance of public.source_system
- */
- public static final SourceSystem SOURCE_SYSTEM = new SourceSystem();
- private static final long serialVersionUID = 1L;
- /**
- * The column public.source_system.id
.
- */
- public final TableField ID = createField(DSL.name("id"),
- SQLDataType.CLOB.nullable(false), this, "");
- /**
- * The column public.source_system.name
.
- */
- public final TableField NAME = createField(DSL.name("name"),
- SQLDataType.CLOB.nullable(false), this, "");
- /**
- * The column public.source_system.endpoint
.
- */
- public final TableField ENDPOINT = createField(DSL.name("endpoint"),
- SQLDataType.CLOB.nullable(false), this, "");
- /**
- * The column public.source_system.description
.
- */
- public final TableField DESCRIPTION = createField(
- DSL.name("description"), SQLDataType.CLOB, this, "");
- /**
- * The column public.source_system.created
.
- */
- public final TableField CREATED = createField(DSL.name("created"),
- SQLDataType.INSTANT.nullable(false), this, "");
- /**
- * The column public.source_system.deleted
.
- */
- public final TableField DELETED = createField(DSL.name("deleted"),
- SQLDataType.INSTANT, this, "");
- /**
- * The column public.source_system.mapping_id
.
- */
- public final TableField MAPPING_ID = createField(
- DSL.name("mapping_id"), SQLDataType.CLOB.nullable(false), this, "");
- /**
- * The column public.source_system.version
.
- */
- public final TableField VERSION = createField(DSL.name("version"),
- SQLDataType.INTEGER.nullable(false)
- .defaultValue(DSL.field(DSL.raw("1"), SQLDataType.INTEGER)), this, "");
- /**
- * The column public.source_system.creator
.
- */
- public final TableField CREATOR = createField(DSL.name("creator"),
- SQLDataType.CLOB.nullable(false)
- .defaultValue(DSL.field(DSL.raw("'0000-0002-5669-2769'::text"), SQLDataType.CLOB)), this,
- "");
-
- private SourceSystem(Name alias, Table aliased) {
- this(alias, aliased, null);
- }
-
- private SourceSystem(Name alias, Table aliased, Field>[] parameters) {
- super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
- }
-
- /**
- * Create an aliased public.source_system
table reference
- */
- public SourceSystem(String alias) {
- this(DSL.name(alias), SOURCE_SYSTEM);
- }
-
- /**
- * Create an aliased public.source_system
table reference
- */
- public SourceSystem(Name alias) {
- this(alias, SOURCE_SYSTEM);
- }
-
- /**
- * Create a public.source_system
table reference
- */
- public SourceSystem() {
- this(DSL.name("source_system"), null);
- }
-
- public SourceSystem(Table child, ForeignKey key) {
- super(child, key, SOURCE_SYSTEM);
- }
-
- /**
- * The class holding records for this type
- */
- @Override
- public Class getRecordType() {
- return SourceSystemRecord.class;
- }
-
- @Override
- public Schema getSchema() {
- return aliased() ? null : Public.PUBLIC;
- }
-
- @Override
- public UniqueKey getPrimaryKey() {
- return Keys.NEW_SOURCE_SYSTEM_PKEY;
- }
-
- @Override
- public SourceSystem as(String alias) {
- return new SourceSystem(DSL.name(alias), this);
- }
-
- @Override
- public SourceSystem as(Name alias) {
- return new SourceSystem(alias, this);
- }
-
- @Override
- public SourceSystem as(Table> alias) {
- return new SourceSystem(alias.getQualifiedName(), this);
- }
-
- /**
- * Rename this table
- */
- @Override
- public SourceSystem rename(String name) {
- return new SourceSystem(DSL.name(name), null);
- }
-
- /**
- * Rename this table
- */
- @Override
- public SourceSystem rename(Name name) {
- return new SourceSystem(name, null);
- }
-
- /**
- * Rename this table
- */
- @Override
- public SourceSystem rename(Table> name) {
- return new SourceSystem(name.getQualifiedName(), null);
- }
-
- // -------------------------------------------------------------------------
- // Row9 type methods
- // -------------------------------------------------------------------------
-
- @Override
- public Row9 fieldsRow() {
- return (Row9) super.fieldsRow();
- }
-
- /**
- * Convenience mapping calling {@link SelectField#convertFrom(Function)}.
- */
- public SelectField mapping(
- Function9 super String, ? super String, ? super String, ? super String, ? super Instant, ? super Instant, ? super String, ? super Integer, ? super String, ? extends U> from) {
- return convertFrom(Records.mapping(from));
- }
-
- /**
- * Convenience mapping calling {@link SelectField#convertFrom(Class, Function)}.
- */
- public SelectField mapping(Class toType,
- Function9 super String, ? super String, ? super String, ? super String, ? super Instant, ? super Instant, ? super String, ? super Integer, ? super String, ? extends U> from) {
- return convertFrom(toType, Records.mapping(from));
- }
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of public.source_system
+ */
+ public static final SourceSystem SOURCE_SYSTEM = new SourceSystem();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return SourceSystemRecord.class;
+ }
+
+ /**
+ * The column public.source_system.id
.
+ */
+ public final TableField ID = createField(DSL.name("id"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.source_system.name
.
+ */
+ public final TableField NAME = createField(DSL.name("name"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.source_system.endpoint
.
+ */
+ public final TableField ENDPOINT = createField(DSL.name("endpoint"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.source_system.description
.
+ */
+ public final TableField DESCRIPTION = createField(DSL.name("description"), SQLDataType.CLOB, this, "");
+
+ /**
+ * The column public.source_system.created
.
+ */
+ public final TableField CREATED = createField(DSL.name("created"), SQLDataType.INSTANT.nullable(false), this, "");
+
+ /**
+ * The column public.source_system.deleted
.
+ */
+ public final TableField DELETED = createField(DSL.name("deleted"), SQLDataType.INSTANT, this, "");
+
+ /**
+ * The column public.source_system.mapping_id
.
+ */
+ public final TableField MAPPING_ID = createField(DSL.name("mapping_id"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.source_system.version
.
+ */
+ public final TableField VERSION = createField(DSL.name("version"), SQLDataType.INTEGER.nullable(false).defaultValue(DSL.field(DSL.raw("1"), SQLDataType.INTEGER)), this, "");
+
+ /**
+ * The column public.source_system.creator
.
+ */
+ public final TableField CREATOR = createField(DSL.name("creator"), SQLDataType.CLOB.nullable(false).defaultValue(DSL.field(DSL.raw("'0000-0002-5669-2769'::text"), SQLDataType.CLOB)), this, "");
+
+ /**
+ * The column public.source_system.translator_type
.
+ */
+ public final TableField TRANSLATOR_TYPE = createField(DSL.name("translator_type"), org.jooq.impl.DefaultDataType.getDefaultDataType("\"public\".\"translator_type\""), this, "");
+
+ private SourceSystem(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private SourceSystem(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
+ }
+
+ /**
+ * Create an aliased public.source_system
table reference
+ */
+ public SourceSystem(String alias) {
+ this(DSL.name(alias), SOURCE_SYSTEM);
+ }
+
+ /**
+ * Create an aliased public.source_system
table reference
+ */
+ public SourceSystem(Name alias) {
+ this(alias, SOURCE_SYSTEM);
+ }
+
+ /**
+ * Create a public.source_system
table reference
+ */
+ public SourceSystem() {
+ this(DSL.name("source_system"), null);
+ }
+
+ public SourceSystem(Table child, ForeignKey key) {
+ super(child, key, SOURCE_SYSTEM);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return aliased() ? null : Public.PUBLIC;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.NEW_SOURCE_SYSTEM_PKEY;
+ }
+
+ @Override
+ public SourceSystem as(String alias) {
+ return new SourceSystem(DSL.name(alias), this);
+ }
+
+ @Override
+ public SourceSystem as(Name alias) {
+ return new SourceSystem(alias, this);
+ }
+
+ @Override
+ public SourceSystem as(Table> alias) {
+ return new SourceSystem(alias.getQualifiedName(), this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public SourceSystem rename(String name) {
+ return new SourceSystem(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public SourceSystem rename(Name name) {
+ return new SourceSystem(name, null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public SourceSystem rename(Table> name) {
+ return new SourceSystem(name.getQualifiedName(), null);
+ }
+
+ // -------------------------------------------------------------------------
+ // Row10 type methods
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row10 fieldsRow() {
+ return (Row10) super.fieldsRow();
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Function)}.
+ */
+ public SelectField mapping(Function10 super String, ? super String, ? super String, ? super String, ? super Instant, ? super Instant, ? super String, ? super Integer, ? super String, ? super Object, ? extends U> from) {
+ return convertFrom(Records.mapping(from));
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Class,
+ * Function)}.
+ */
+ public SelectField mapping(Class toType, Function10 super String, ? super String, ? super String, ? super String, ? super Instant, ? super Instant, ? super String, ? super Integer, ? super String, ? super Object, ? extends U> from) {
+ return convertFrom(toType, Records.mapping(from));
+ }
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/tables/TranslatorJobRecord.java b/src/main/java/eu/dissco/core/translator/database/jooq/tables/TranslatorJobRecord.java
new file mode 100644
index 0000000..f49c969
--- /dev/null
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/tables/TranslatorJobRecord.java
@@ -0,0 +1,218 @@
+/*
+ * This file is generated by jOOQ.
+ */
+package eu.dissco.core.translator.database.jooq.tables;
+
+
+import eu.dissco.core.translator.database.jooq.Keys;
+import eu.dissco.core.translator.database.jooq.Public;
+import eu.dissco.core.translator.database.jooq.enums.ErrorCode;
+import eu.dissco.core.translator.database.jooq.enums.JobState;
+import eu.dissco.core.translator.database.jooq.tables.records.TranslatorJobRecordRecord;
+
+import java.time.Instant;
+import java.util.Arrays;
+import java.util.List;
+import java.util.UUID;
+import java.util.function.Function;
+
+import org.jooq.Field;
+import org.jooq.ForeignKey;
+import org.jooq.Function7;
+import org.jooq.Name;
+import org.jooq.Record;
+import org.jooq.Records;
+import org.jooq.Row7;
+import org.jooq.Schema;
+import org.jooq.SelectField;
+import org.jooq.Table;
+import org.jooq.TableField;
+import org.jooq.TableOptions;
+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 TranslatorJobRecord extends TableImpl {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * The reference instance of public.translator_job_record
+ */
+ public static final TranslatorJobRecord TRANSLATOR_JOB_RECORD = new TranslatorJobRecord();
+
+ /**
+ * The class holding records for this type
+ */
+ @Override
+ public Class getRecordType() {
+ return TranslatorJobRecordRecord.class;
+ }
+
+ /**
+ * The column public.translator_job_record.job_id
.
+ */
+ public final TableField JOB_ID = createField(DSL.name("job_id"), SQLDataType.UUID.nullable(false), this, "");
+
+ /**
+ * The column public.translator_job_record.job_state
.
+ */
+ public final TableField JOB_STATE = createField(DSL.name("job_state"), SQLDataType.VARCHAR.nullable(false).asEnumDataType(eu.dissco.core.translator.database.jooq.enums.JobState.class), this, "");
+
+ /**
+ * The column public.translator_job_record.source_system_id
.
+ */
+ public final TableField SOURCE_SYSTEM_ID = createField(DSL.name("source_system_id"), SQLDataType.CLOB.nullable(false), this, "");
+
+ /**
+ * The column public.translator_job_record.time_started
.
+ */
+ public final TableField TIME_STARTED = createField(DSL.name("time_started"), SQLDataType.INSTANT.nullable(false), this, "");
+
+ /**
+ * The column public.translator_job_record.time_completed
.
+ */
+ public final TableField TIME_COMPLETED = createField(DSL.name("time_completed"), SQLDataType.INSTANT, this, "");
+
+ /**
+ * The column public.translator_job_record.processed_records
.
+ */
+ public final TableField PROCESSED_RECORDS = createField(DSL.name("processed_records"), SQLDataType.INTEGER, this, "");
+
+ /**
+ * The column public.translator_job_record.error
.
+ */
+ public final TableField ERROR = createField(DSL.name("error"), SQLDataType.VARCHAR.asEnumDataType(eu.dissco.core.translator.database.jooq.enums.ErrorCode.class), this, "");
+
+ private TranslatorJobRecord(Name alias, Table aliased) {
+ this(alias, aliased, null);
+ }
+
+ private TranslatorJobRecord(Name alias, Table aliased, Field>[] parameters) {
+ super(alias, null, aliased, parameters, DSL.comment(""), TableOptions.table());
+ }
+
+ /**
+ * Create an aliased public.translator_job_record
table
+ * reference
+ */
+ public TranslatorJobRecord(String alias) {
+ this(DSL.name(alias), TRANSLATOR_JOB_RECORD);
+ }
+
+ /**
+ * Create an aliased public.translator_job_record
table
+ * reference
+ */
+ public TranslatorJobRecord(Name alias) {
+ this(alias, TRANSLATOR_JOB_RECORD);
+ }
+
+ /**
+ * Create a public.translator_job_record
table reference
+ */
+ public TranslatorJobRecord() {
+ this(DSL.name("translator_job_record"), null);
+ }
+
+ public TranslatorJobRecord(Table child, ForeignKey key) {
+ super(child, key, TRANSLATOR_JOB_RECORD);
+ }
+
+ @Override
+ public Schema getSchema() {
+ return aliased() ? null : Public.PUBLIC;
+ }
+
+ @Override
+ public UniqueKey getPrimaryKey() {
+ return Keys.TRANSLATOR_JOB_RECORD_PKEY;
+ }
+
+ @Override
+ public List> getReferences() {
+ return Arrays.asList(Keys.TRANSLATOR_JOB_RECORD__TRANSLATOR_JOB_RECORD_SOURCE_SYSTEM_ID_FKEY);
+ }
+
+ private transient SourceSystem _sourceSystem;
+
+ /**
+ * Get the implicit join path to the public.source_system
+ * table.
+ */
+ public SourceSystem sourceSystem() {
+ if (_sourceSystem == null)
+ _sourceSystem = new SourceSystem(this, Keys.TRANSLATOR_JOB_RECORD__TRANSLATOR_JOB_RECORD_SOURCE_SYSTEM_ID_FKEY);
+
+ return _sourceSystem;
+ }
+
+ @Override
+ public TranslatorJobRecord as(String alias) {
+ return new TranslatorJobRecord(DSL.name(alias), this);
+ }
+
+ @Override
+ public TranslatorJobRecord as(Name alias) {
+ return new TranslatorJobRecord(alias, this);
+ }
+
+ @Override
+ public TranslatorJobRecord as(Table> alias) {
+ return new TranslatorJobRecord(alias.getQualifiedName(), this);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public TranslatorJobRecord rename(String name) {
+ return new TranslatorJobRecord(DSL.name(name), null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public TranslatorJobRecord rename(Name name) {
+ return new TranslatorJobRecord(name, null);
+ }
+
+ /**
+ * Rename this table
+ */
+ @Override
+ public TranslatorJobRecord rename(Table> name) {
+ return new TranslatorJobRecord(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 UUID, ? super JobState, ? super String, ? super Instant, ? super Instant, ? super Integer, ? super ErrorCode, ? extends U> from) {
+ return convertFrom(Records.mapping(from));
+ }
+
+ /**
+ * Convenience mapping calling {@link SelectField#convertFrom(Class,
+ * Function)}.
+ */
+ public SelectField mapping(Class toType, Function7 super UUID, ? super JobState, ? super String, ? super Instant, ? super Instant, ? super Integer, ? super ErrorCode, ? extends U> from) {
+ return convertFrom(toType, Records.mapping(from));
+ }
+}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/MappingRecord.java b/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/MappingRecord.java
index 7ab0435..574b600 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/MappingRecord.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/MappingRecord.java
@@ -5,7 +5,9 @@
import eu.dissco.core.translator.database.jooq.tables.Mapping;
+
import java.time.Instant;
+
import org.jooq.Field;
import org.jooq.JSONB;
import org.jooq.Record2;
@@ -17,392 +19,389 @@
/**
* This class is generated by jOOQ.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
-public class MappingRecord extends UpdatableRecordImpl implements
- Record9 {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a detached MappingRecord
- */
- public MappingRecord() {
- super(Mapping.MAPPING);
- }
-
- /**
- * Create a detached, initialised MappingRecord
- */
- public MappingRecord(String id, Integer version, String name, String description, JSONB mapping,
- Instant created, String creator, Instant deleted, String sourcedatastandard) {
- super(Mapping.MAPPING);
-
- setId(id);
- setVersion(version);
- setName(name);
- setDescription(description);
- setMapping(mapping);
- setCreated(created);
- setCreator(creator);
- setDeleted(deleted);
- setSourcedatastandard(sourcedatastandard);
- resetChangedOnNotNull();
- }
-
- /**
- * Getter for public.mapping.id
.
- */
- public String getId() {
- return (String) get(0);
- }
-
- /**
- * Setter for public.mapping.id
.
- */
- public void setId(String value) {
- set(0, value);
- }
-
- /**
- * Getter for public.mapping.version
.
- */
- public Integer getVersion() {
- return (Integer) get(1);
- }
-
- /**
- * Setter for public.mapping.version
.
- */
- public void setVersion(Integer value) {
- set(1, value);
- }
-
- /**
- * Getter for public.mapping.name
.
- */
- public String getName() {
- return (String) get(2);
- }
-
- /**
- * Setter for public.mapping.name
.
- */
- public void setName(String value) {
- set(2, value);
- }
-
- /**
- * Getter for public.mapping.description
.
- */
- public String getDescription() {
- return (String) get(3);
- }
-
- /**
- * Setter for public.mapping.description
.
- */
- public void setDescription(String value) {
- set(3, value);
- }
-
- /**
- * Getter for public.mapping.mapping
.
- */
- public JSONB getMapping() {
- return (JSONB) get(4);
- }
-
- /**
- * Setter for public.mapping.mapping
.
- */
- public void setMapping(JSONB value) {
- set(4, value);
- }
-
- /**
- * Getter for public.mapping.created
.
- */
- public Instant getCreated() {
- return (Instant) get(5);
- }
-
- /**
- * Setter for public.mapping.created
.
- */
- public void setCreated(Instant value) {
- set(5, value);
- }
-
- /**
- * Getter for public.mapping.creator
.
- */
- public String getCreator() {
- return (String) get(6);
- }
-
- /**
- * Setter for public.mapping.creator
.
- */
- public void setCreator(String value) {
- set(6, value);
- }
-
- /**
- * Getter for public.mapping.deleted
.
- */
- public Instant getDeleted() {
- return (Instant) get(7);
- }
-
- /**
- * Setter for public.mapping.deleted
.
- */
- public void setDeleted(Instant value) {
- set(7, value);
- }
-
- // -------------------------------------------------------------------------
- // Primary key information
- // -------------------------------------------------------------------------
-
- /**
- * Getter for public.mapping.sourcedatastandard
.
- */
- public String getSourcedatastandard() {
- return (String) get(8);
- }
-
- // -------------------------------------------------------------------------
- // Record9 type implementation
- // -------------------------------------------------------------------------
-
- /**
- * Setter for public.mapping.sourcedatastandard
.
- */
- public void setSourcedatastandard(String value) {
- set(8, value);
- }
-
- @Override
- public Record2 key() {
- return (Record2) super.key();
- }
-
- @Override
- public Row9 fieldsRow() {
- return (Row9) super.fieldsRow();
- }
-
- @Override
- public Row9 valuesRow() {
- return (Row9) super.valuesRow();
- }
-
- @Override
- public Field field1() {
- return Mapping.MAPPING.ID;
- }
-
- @Override
- public Field field2() {
- return Mapping.MAPPING.VERSION;
- }
-
- @Override
- public Field field3() {
- return Mapping.MAPPING.NAME;
- }
-
- @Override
- public Field field4() {
- return Mapping.MAPPING.DESCRIPTION;
- }
-
- @Override
- public Field field5() {
- return Mapping.MAPPING.MAPPING_;
- }
-
- @Override
- public Field field6() {
- return Mapping.MAPPING.CREATED;
- }
-
- @Override
- public Field field7() {
- return Mapping.MAPPING.CREATOR;
- }
-
- @Override
- public Field field8() {
- return Mapping.MAPPING.DELETED;
- }
-
- @Override
- public Field field9() {
- return Mapping.MAPPING.SOURCEDATASTANDARD;
- }
-
- @Override
- public String component1() {
- return getId();
- }
-
- @Override
- public Integer component2() {
- return getVersion();
- }
-
- @Override
- public String component3() {
- return getName();
- }
-
- @Override
- public String component4() {
- return getDescription();
- }
-
- @Override
- public JSONB component5() {
- return getMapping();
- }
-
- @Override
- public Instant component6() {
- return getCreated();
- }
-
- @Override
- public String component7() {
- return getCreator();
- }
-
- @Override
- public Instant component8() {
- return getDeleted();
- }
-
- @Override
- public String component9() {
- return getSourcedatastandard();
- }
-
- @Override
- public String value1() {
- return getId();
- }
-
- @Override
- public Integer value2() {
- return getVersion();
- }
-
- @Override
- public String value3() {
- return getName();
- }
-
- @Override
- public String value4() {
- return getDescription();
- }
-
- @Override
- public JSONB value5() {
- return getMapping();
- }
-
- @Override
- public Instant value6() {
- return getCreated();
- }
-
- @Override
- public String value7() {
- return getCreator();
- }
-
- @Override
- public Instant value8() {
- return getDeleted();
- }
-
- @Override
- public String value9() {
- return getSourcedatastandard();
- }
-
- @Override
- public MappingRecord value1(String value) {
- setId(value);
- return this;
- }
-
- @Override
- public MappingRecord value2(Integer value) {
- setVersion(value);
- return this;
- }
-
- @Override
- public MappingRecord value3(String value) {
- setName(value);
- return this;
- }
-
- @Override
- public MappingRecord value4(String value) {
- setDescription(value);
- return this;
- }
-
- @Override
- public MappingRecord value5(JSONB value) {
- setMapping(value);
- return this;
- }
-
- @Override
- public MappingRecord value6(Instant value) {
- setCreated(value);
- return this;
- }
-
- @Override
- public MappingRecord value7(String value) {
- setCreator(value);
- return this;
- }
-
- @Override
- public MappingRecord value8(Instant value) {
- setDeleted(value);
- return this;
- }
-
- // -------------------------------------------------------------------------
- // Constructors
- // -------------------------------------------------------------------------
-
- @Override
- public MappingRecord value9(String value) {
- setSourcedatastandard(value);
- return this;
- }
-
- @Override
- public MappingRecord values(String value1, Integer value2, String value3, String value4,
- JSONB value5, Instant value6, String value7, Instant value8, String value9) {
- value1(value1);
- value2(value2);
- value3(value3);
- value4(value4);
- value5(value5);
- value6(value6);
- value7(value7);
- value8(value8);
- value9(value9);
- return this;
- }
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class MappingRecord extends UpdatableRecordImpl implements Record9 {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Setter for public.mapping.id
.
+ */
+ public void setId(String value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for public.mapping.id
.
+ */
+ public String getId() {
+ return (String) get(0);
+ }
+
+ /**
+ * Setter for public.mapping.version
.
+ */
+ public void setVersion(Integer value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for public.mapping.version
.
+ */
+ public Integer getVersion() {
+ return (Integer) get(1);
+ }
+
+ /**
+ * Setter for public.mapping.name
.
+ */
+ public void setName(String value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for public.mapping.name
.
+ */
+ public String getName() {
+ return (String) get(2);
+ }
+
+ /**
+ * Setter for public.mapping.description
.
+ */
+ public void setDescription(String value) {
+ set(3, value);
+ }
+
+ /**
+ * Getter for public.mapping.description
.
+ */
+ public String getDescription() {
+ return (String) get(3);
+ }
+
+ /**
+ * Setter for public.mapping.mapping
.
+ */
+ public void setMapping(JSONB value) {
+ set(4, value);
+ }
+
+ /**
+ * Getter for public.mapping.mapping
.
+ */
+ public JSONB getMapping() {
+ return (JSONB) get(4);
+ }
+
+ /**
+ * Setter for public.mapping.created
.
+ */
+ public void setCreated(Instant value) {
+ set(5, value);
+ }
+
+ /**
+ * Getter for public.mapping.created
.
+ */
+ public Instant getCreated() {
+ return (Instant) get(5);
+ }
+
+ /**
+ * Setter for public.mapping.creator
.
+ */
+ public void setCreator(String value) {
+ set(6, value);
+ }
+
+ /**
+ * Getter for public.mapping.creator
.
+ */
+ public String getCreator() {
+ return (String) get(6);
+ }
+
+ /**
+ * Setter for public.mapping.deleted
.
+ */
+ public void setDeleted(Instant value) {
+ set(7, value);
+ }
+
+ /**
+ * Getter for public.mapping.deleted
.
+ */
+ public Instant getDeleted() {
+ return (Instant) get(7);
+ }
+
+ /**
+ * Setter for public.mapping.sourcedatastandard
.
+ */
+ public void setSourcedatastandard(String value) {
+ set(8, value);
+ }
+
+ /**
+ * Getter for public.mapping.sourcedatastandard
.
+ */
+ public String getSourcedatastandard() {
+ return (String) get(8);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record2 key() {
+ return (Record2) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record9 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row9 fieldsRow() {
+ return (Row9) super.fieldsRow();
+ }
+
+ @Override
+ public Row9 valuesRow() {
+ return (Row9) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return Mapping.MAPPING.ID;
+ }
+
+ @Override
+ public Field field2() {
+ return Mapping.MAPPING.VERSION;
+ }
+
+ @Override
+ public Field field3() {
+ return Mapping.MAPPING.NAME;
+ }
+
+ @Override
+ public Field field4() {
+ return Mapping.MAPPING.DESCRIPTION;
+ }
+
+ @Override
+ public Field field5() {
+ return Mapping.MAPPING.MAPPING_;
+ }
+
+ @Override
+ public Field field6() {
+ return Mapping.MAPPING.CREATED;
+ }
+
+ @Override
+ public Field field7() {
+ return Mapping.MAPPING.CREATOR;
+ }
+
+ @Override
+ public Field field8() {
+ return Mapping.MAPPING.DELETED;
+ }
+
+ @Override
+ public Field field9() {
+ return Mapping.MAPPING.SOURCEDATASTANDARD;
+ }
+
+ @Override
+ public String component1() {
+ return getId();
+ }
+
+ @Override
+ public Integer component2() {
+ return getVersion();
+ }
+
+ @Override
+ public String component3() {
+ return getName();
+ }
+
+ @Override
+ public String component4() {
+ return getDescription();
+ }
+
+ @Override
+ public JSONB component5() {
+ return getMapping();
+ }
+
+ @Override
+ public Instant component6() {
+ return getCreated();
+ }
+
+ @Override
+ public String component7() {
+ return getCreator();
+ }
+
+ @Override
+ public Instant component8() {
+ return getDeleted();
+ }
+
+ @Override
+ public String component9() {
+ return getSourcedatastandard();
+ }
+
+ @Override
+ public String value1() {
+ return getId();
+ }
+
+ @Override
+ public Integer value2() {
+ return getVersion();
+ }
+
+ @Override
+ public String value3() {
+ return getName();
+ }
+
+ @Override
+ public String value4() {
+ return getDescription();
+ }
+
+ @Override
+ public JSONB value5() {
+ return getMapping();
+ }
+
+ @Override
+ public Instant value6() {
+ return getCreated();
+ }
+
+ @Override
+ public String value7() {
+ return getCreator();
+ }
+
+ @Override
+ public Instant value8() {
+ return getDeleted();
+ }
+
+ @Override
+ public String value9() {
+ return getSourcedatastandard();
+ }
+
+ @Override
+ public MappingRecord value1(String value) {
+ setId(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value2(Integer value) {
+ setVersion(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value3(String value) {
+ setName(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value4(String value) {
+ setDescription(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value5(JSONB value) {
+ setMapping(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value6(Instant value) {
+ setCreated(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value7(String value) {
+ setCreator(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value8(Instant value) {
+ setDeleted(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord value9(String value) {
+ setSourcedatastandard(value);
+ return this;
+ }
+
+ @Override
+ public MappingRecord values(String value1, Integer value2, String value3, String value4, JSONB value5, Instant value6, String value7, Instant value8, String value9) {
+ value1(value1);
+ value2(value2);
+ value3(value3);
+ value4(value4);
+ value5(value5);
+ value6(value6);
+ value7(value7);
+ value8(value8);
+ value9(value9);
+ return this;
+ }
+
+ // -------------------------------------------------------------------------
+ // Constructors
+ // -------------------------------------------------------------------------
+
+ /**
+ * Create a detached MappingRecord
+ */
+ public MappingRecord() {
+ super(Mapping.MAPPING);
+ }
+
+ /**
+ * Create a detached, initialised MappingRecord
+ */
+ public MappingRecord(String id, Integer version, String name, String description, JSONB mapping, Instant created, String creator, Instant deleted, String sourcedatastandard) {
+ super(Mapping.MAPPING);
+
+ setId(id);
+ setVersion(version);
+ setName(name);
+ setDescription(description);
+ setMapping(mapping);
+ setCreated(created);
+ setCreator(creator);
+ setDeleted(deleted);
+ setSourcedatastandard(sourcedatastandard);
+ resetChangedOnNotNull();
+ }
}
diff --git a/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/SourceSystemRecord.java b/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/SourceSystemRecord.java
index e8e2816..a6c6bf3 100644
--- a/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/SourceSystemRecord.java
+++ b/src/main/java/eu/dissco/core/translator/database/jooq/tables/records/SourceSystemRecord.java
@@ -5,403 +5,439 @@
import eu.dissco.core.translator.database.jooq.tables.SourceSystem;
+
import java.time.Instant;
+
import org.jooq.Field;
import org.jooq.Record1;
-import org.jooq.Record9;
-import org.jooq.Row9;
+import org.jooq.Record10;
+import org.jooq.Row10;
import org.jooq.impl.UpdatableRecordImpl;
/**
* This class is generated by jOOQ.
*/
-@SuppressWarnings({"all", "unchecked", "rawtypes"})
-public class SourceSystemRecord extends UpdatableRecordImpl implements
- Record9 {
-
- private static final long serialVersionUID = 1L;
-
- /**
- * Create a detached SourceSystemRecord
- */
- public SourceSystemRecord() {
- super(SourceSystem.SOURCE_SYSTEM);
- }
-
- /**
- * Create a detached, initialised SourceSystemRecord
- */
- public SourceSystemRecord(String id, String name, String endpoint, String description,
- Instant created, Instant deleted, String mappingId, Integer version, String creator) {
- super(SourceSystem.SOURCE_SYSTEM);
-
- setId(id);
- setName(name);
- setEndpoint(endpoint);
- setDescription(description);
- setCreated(created);
- setDeleted(deleted);
- setMappingId(mappingId);
- setVersion(version);
- setCreator(creator);
- resetChangedOnNotNull();
- }
-
- /**
- * Getter for public.source_system.id
.
- */
- public String getId() {
- return (String) get(0);
- }
-
- /**
- * Setter for public.source_system.id
.
- */
- public void setId(String value) {
- set(0, value);
- }
-
- /**
- * Getter for public.source_system.name
.
- */
- public String getName() {
- return (String) get(1);
- }
-
- /**
- * Setter for public.source_system.name
.
- */
- public void setName(String value) {
- set(1, value);
- }
-
- /**
- * Getter for public.source_system.endpoint
.
- */
- public String getEndpoint() {
- return (String) get(2);
- }
-
- /**
- * Setter for public.source_system.endpoint
.
- */
- public void setEndpoint(String value) {
- set(2, value);
- }
-
- /**
- * Getter for public.source_system.description
.
- */
- public String getDescription() {
- return (String) get(3);
- }
-
- /**
- * Setter for public.source_system.description
.
- */
- public void setDescription(String value) {
- set(3, value);
- }
-
- /**
- * Getter for public.source_system.created
.
- */
- public Instant getCreated() {
- return (Instant) get(4);
- }
-
- /**
- * Setter for public.source_system.created
.
- */
- public void setCreated(Instant value) {
- set(4, value);
- }
-
- /**
- * Getter for public.source_system.deleted
.
- */
- public Instant getDeleted() {
- return (Instant) get(5);
- }
-
- /**
- * Setter for public.source_system.deleted
.
- */
- public void setDeleted(Instant value) {
- set(5, value);
- }
-
- /**
- * Getter for public.source_system.mapping_id
.
- */
- public String getMappingId() {
- return (String) get(6);
- }
-
- /**
- * Setter for public.source_system.mapping_id
.
- */
- public void setMappingId(String value) {
- set(6, value);
- }
-
- /**
- * Getter for public.source_system.version
.
- */
- public Integer getVersion() {
- return (Integer) get(7);
- }
-
- /**
- * Setter for public.source_system.version
.
- */
- public void setVersion(Integer value) {
- set(7, value);
- }
-
- // -------------------------------------------------------------------------
- // Primary key information
- // -------------------------------------------------------------------------
-
- /**
- * Getter for public.source_system.creator
.
- */
- public String getCreator() {
- return (String) get(8);
- }
-
- // -------------------------------------------------------------------------
- // Record9 type implementation
- // -------------------------------------------------------------------------
-
- /**
- * Setter for public.source_system.creator
.
- */
- public void setCreator(String value) {
- set(8, value);
- }
-
- @Override
- public Record1 key() {
- return (Record1) super.key();
- }
-
- @Override
- public Row9 fieldsRow() {
- return (Row9) super.fieldsRow();
- }
-
- @Override
- public Row9 valuesRow() {
- return (Row9) super.valuesRow();
- }
-
- @Override
- public Field field1() {
- return SourceSystem.SOURCE_SYSTEM.ID;
- }
-
- @Override
- public Field field2() {
- return SourceSystem.SOURCE_SYSTEM.NAME;
- }
-
- @Override
- public Field field3() {
- return SourceSystem.SOURCE_SYSTEM.ENDPOINT;
- }
-
- @Override
- public Field field4() {
- return SourceSystem.SOURCE_SYSTEM.DESCRIPTION;
- }
-
- @Override
- public Field field5() {
- return SourceSystem.SOURCE_SYSTEM.CREATED;
- }
-
- @Override
- public Field field6() {
- return SourceSystem.SOURCE_SYSTEM.DELETED;
- }
-
- @Override
- public Field field7() {
- return SourceSystem.SOURCE_SYSTEM.MAPPING_ID;
- }
-
- @Override
- public Field field8() {
- return SourceSystem.SOURCE_SYSTEM.VERSION;
- }
-
- @Override
- public Field field9() {
- return SourceSystem.SOURCE_SYSTEM.CREATOR;
- }
-
- @Override
- public String component1() {
- return getId();
- }
-
- @Override
- public String component2() {
- return getName();
- }
-
- @Override
- public String component3() {
- return getEndpoint();
- }
-
- @Override
- public String component4() {
- return getDescription();
- }
-
- @Override
- public Instant component5() {
- return getCreated();
- }
-
- @Override
- public Instant component6() {
- return getDeleted();
- }
-
- @Override
- public String component7() {
- return getMappingId();
- }
-
- @Override
- public Integer component8() {
- return getVersion();
- }
-
- @Override
- public String component9() {
- return getCreator();
- }
-
- @Override
- public String value1() {
- return getId();
- }
-
- @Override
- public String value2() {
- return getName();
- }
-
- @Override
- public String value3() {
- return getEndpoint();
- }
-
- @Override
- public String value4() {
- return getDescription();
- }
-
- @Override
- public Instant value5() {
- return getCreated();
- }
-
- @Override
- public Instant value6() {
- return getDeleted();
- }
-
- @Override
- public String value7() {
- return getMappingId();
- }
-
- @Override
- public Integer value8() {
- return getVersion();
- }
-
- @Override
- public String value9() {
- return getCreator();
- }
-
- @Override
- public SourceSystemRecord value1(String value) {
- setId(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord value2(String value) {
- setName(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord value3(String value) {
- setEndpoint(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord value4(String value) {
- setDescription(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord value5(Instant value) {
- setCreated(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord value6(Instant value) {
- setDeleted(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord value7(String value) {
- setMappingId(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord value8(Integer value) {
- setVersion(value);
- return this;
- }
-
- // -------------------------------------------------------------------------
- // Constructors
- // -------------------------------------------------------------------------
-
- @Override
- public SourceSystemRecord value9(String value) {
- setCreator(value);
- return this;
- }
-
- @Override
- public SourceSystemRecord values(String value1, String value2, String value3, String value4,
- Instant value5, Instant value6, String value7, Integer value8, String value9) {
- value1(value1);
- value2(value2);
- value3(value3);
- value4(value4);
- value5(value5);
- value6(value6);
- value7(value7);
- value8(value8);
- value9(value9);
- return this;
- }
+@SuppressWarnings({ "all", "unchecked", "rawtypes" })
+public class SourceSystemRecord extends UpdatableRecordImpl implements Record10 {
+
+ private static final long serialVersionUID = 1L;
+
+ /**
+ * Setter for public.source_system.id
.
+ */
+ public void setId(String value) {
+ set(0, value);
+ }
+
+ /**
+ * Getter for public.source_system.id
.
+ */
+ public String getId() {
+ return (String) get(0);
+ }
+
+ /**
+ * Setter for public.source_system.name
.
+ */
+ public void setName(String value) {
+ set(1, value);
+ }
+
+ /**
+ * Getter for public.source_system.name
.
+ */
+ public String getName() {
+ return (String) get(1);
+ }
+
+ /**
+ * Setter for public.source_system.endpoint
.
+ */
+ public void setEndpoint(String value) {
+ set(2, value);
+ }
+
+ /**
+ * Getter for public.source_system.endpoint
.
+ */
+ public String getEndpoint() {
+ return (String) get(2);
+ }
+
+ /**
+ * Setter for public.source_system.description
.
+ */
+ public void setDescription(String value) {
+ set(3, value);
+ }
+
+ /**
+ * Getter for public.source_system.description
.
+ */
+ public String getDescription() {
+ return (String) get(3);
+ }
+
+ /**
+ * Setter for public.source_system.created
.
+ */
+ public void setCreated(Instant value) {
+ set(4, value);
+ }
+
+ /**
+ * Getter for public.source_system.created
.
+ */
+ public Instant getCreated() {
+ return (Instant) get(4);
+ }
+
+ /**
+ * Setter for public.source_system.deleted
.
+ */
+ public void setDeleted(Instant value) {
+ set(5, value);
+ }
+
+ /**
+ * Getter for public.source_system.deleted
.
+ */
+ public Instant getDeleted() {
+ return (Instant) get(5);
+ }
+
+ /**
+ * Setter for public.source_system.mapping_id
.
+ */
+ public void setMappingId(String value) {
+ set(6, value);
+ }
+
+ /**
+ * Getter for public.source_system.mapping_id
.
+ */
+ public String getMappingId() {
+ return (String) get(6);
+ }
+
+ /**
+ * Setter for public.source_system.version
.
+ */
+ public void setVersion(Integer value) {
+ set(7, value);
+ }
+
+ /**
+ * Getter for public.source_system.version
.
+ */
+ public Integer getVersion() {
+ return (Integer) get(7);
+ }
+
+ /**
+ * Setter for public.source_system.creator
.
+ */
+ public void setCreator(String value) {
+ set(8, value);
+ }
+
+ /**
+ * Getter for public.source_system.creator
.
+ */
+ public String getCreator() {
+ return (String) get(8);
+ }
+
+ /**
+ * Setter for public.source_system.translator_type
.
+ */
+ public void setTranslatorType(Object value) {
+ set(9, value);
+ }
+
+ /**
+ * Getter for public.source_system.translator_type
.
+ */
+ public Object getTranslatorType() {
+ return get(9);
+ }
+
+ // -------------------------------------------------------------------------
+ // Primary key information
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Record1 key() {
+ return (Record1) super.key();
+ }
+
+ // -------------------------------------------------------------------------
+ // Record10 type implementation
+ // -------------------------------------------------------------------------
+
+ @Override
+ public Row10 fieldsRow() {
+ return (Row10) super.fieldsRow();
+ }
+
+ @Override
+ public Row10 valuesRow() {
+ return (Row10) super.valuesRow();
+ }
+
+ @Override
+ public Field field1() {
+ return SourceSystem.SOURCE_SYSTEM.ID;
+ }
+
+ @Override
+ public Field field2() {
+ return SourceSystem.SOURCE_SYSTEM.NAME;
+ }
+
+ @Override
+ public Field field3() {
+ return SourceSystem.SOURCE_SYSTEM.ENDPOINT;
+ }
+
+ @Override
+ public Field field4() {
+ return SourceSystem.SOURCE_SYSTEM.DESCRIPTION;
+ }
+
+ @Override
+ public Field field5() {
+ return SourceSystem.SOURCE_SYSTEM.CREATED;
+ }
+
+ @Override
+ public Field field6() {
+ return SourceSystem.SOURCE_SYSTEM.DELETED;
+ }
+
+ @Override
+ public Field field7() {
+ return SourceSystem.SOURCE_SYSTEM.MAPPING_ID;
+ }
+
+ @Override
+ public Field field8() {
+ return SourceSystem.SOURCE_SYSTEM.VERSION;
+ }
+
+ @Override
+ public Field field9() {
+ return SourceSystem.SOURCE_SYSTEM.CREATOR;
+ }
+
+ @Override
+ public Field