diff --git a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/Keys.java b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/Keys.java index 6aa18290e4..eb4ddd924b 100644 --- a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/Keys.java +++ b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/Keys.java @@ -22,11 +22,6 @@ import org.jooq.impl.Internal; @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Keys { - // ------------------------------------------------------------------------- - // IDENTITY definitions - // ------------------------------------------------------------------------- - - // ------------------------------------------------------------------------- // UNIQUE and PRIMARY KEY definitions // ------------------------------------------------------------------------- diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/Keys.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/Keys.java index a3dd6e41c9..ed74761c4c 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/Keys.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/Keys.java @@ -5,7 +5,6 @@ package org.jooq.example.jpa.jooq; import org.jooq.ForeignKey; -import org.jooq.Identity; import org.jooq.TableField; import org.jooq.UniqueKey; import org.jooq.example.jpa.jooq.tables.Actor; @@ -27,14 +26,6 @@ import org.jooq.impl.Internal; @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Keys { - // ------------------------------------------------------------------------- - // IDENTITY definitions - // ------------------------------------------------------------------------- - - public static final Identity IDENTITY_ACTOR = Identities0.IDENTITY_ACTOR; - public static final Identity IDENTITY_FILM = Identities0.IDENTITY_FILM; - public static final Identity IDENTITY_LANGUAGE = Identities0.IDENTITY_LANGUAGE; - // ------------------------------------------------------------------------- // UNIQUE and PRIMARY KEY definitions // ------------------------------------------------------------------------- @@ -57,12 +48,6 @@ public class Keys { // [#1459] distribute members to avoid static initialisers > 64kb // ------------------------------------------------------------------------- - private static class Identities0 { - static final Identity IDENTITY_ACTOR = Internal.createIdentity(Actor.ACTOR, Actor.ACTOR.ACTORID); - static final Identity IDENTITY_FILM = Internal.createIdentity(Film.FILM, Film.FILM.FILMID); - static final Identity IDENTITY_LANGUAGE = Internal.createIdentity(Language.LANGUAGE, Language.LANGUAGE.LANGUAGEID); - } - private static class UniqueKeys0 { static final UniqueKey CONSTRAINT_3 = Internal.createUniqueKey(Actor.ACTOR, DSL.name("CONSTRAINT_3"), new TableField[] { Actor.ACTOR.ACTORID }, true); static final UniqueKey CONSTRAINT_2 = Internal.createUniqueKey(Film.FILM, DSL.name("CONSTRAINT_2"), new TableField[] { Film.FILM.FILMID }, true); diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java index 240a3a61e7..84726055d3 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Actor.java @@ -31,7 +31,7 @@ import org.jooq.impl.TableImpl; @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Actor extends TableImpl { - private static final long serialVersionUID = -1488770024; + private static final long serialVersionUID = -837715027; /** * The reference instance of ACTOR @@ -101,7 +101,7 @@ public class Actor extends TableImpl { @Override public Identity getIdentity() { - return Keys.IDENTITY_ACTOR; + return (Identity) super.getIdentity(); } @Override diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java index 18900ca4b8..f3788f823a 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Film.java @@ -32,7 +32,7 @@ import org.jooq.impl.TableImpl; @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Film extends TableImpl { - private static final long serialVersionUID = 313776890; + private static final long serialVersionUID = 380882165; /** * The reference instance of FILM @@ -117,7 +117,7 @@ public class Film extends TableImpl { @Override public Identity getIdentity() { - return Keys.IDENTITY_FILM; + return (Identity) super.getIdentity(); } @Override diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java index 589cb534fb..3fdeca487e 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/Language.java @@ -31,7 +31,7 @@ import org.jooq.impl.TableImpl; @SuppressWarnings({ "all", "unchecked", "rawtypes" }) public class Language extends TableImpl { - private static final long serialVersionUID = 888214397; + private static final long serialVersionUID = -1201806006; /** * The reference instance of LANGUAGE @@ -96,7 +96,7 @@ public class Language extends TableImpl { @Override public Identity getIdentity() { - return Keys.IDENTITY_LANGUAGE; + return (Identity) super.getIdentity(); } @Override diff --git a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/Keys.kt b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/Keys.kt index 3286488e84..217aa7cbf6 100644 --- a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/Keys.kt +++ b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/Keys.kt @@ -5,7 +5,6 @@ package org.jooq.example.kotlin.db.h2 import org.jooq.ForeignKey -import org.jooq.Identity import org.jooq.UniqueKey import org.jooq.example.kotlin.db.h2.tables.Author import org.jooq.example.kotlin.db.h2.tables.Book @@ -26,13 +25,6 @@ import org.jooq.impl.Internal @Suppress("UNCHECKED_CAST") object Keys { - // ------------------------------------------------------------------------- - // IDENTITY definitions - // ------------------------------------------------------------------------- - - val IDENTITY_AUTHOR = Identities0.IDENTITY_AUTHOR - val IDENTITY_BOOK = Identities0.IDENTITY_BOOK - // ------------------------------------------------------------------------- // UNIQUE and PRIMARY KEY definitions // ------------------------------------------------------------------------- @@ -55,11 +47,6 @@ object Keys { // [#1459] distribute members to avoid static initialisers > 64kb // ------------------------------------------------------------------------- - private object Identities0 { - val IDENTITY_AUTHOR: Identity = Internal.createIdentity(Author.AUTHOR, Author.AUTHOR.ID) - val IDENTITY_BOOK: Identity = Internal.createIdentity(Book.BOOK, Book.BOOK.ID) - } - private object UniqueKeys0 { val PK_T_AUTHOR: UniqueKey = Internal.createUniqueKey(Author.AUTHOR, DSL.name("PK_T_AUTHOR"), arrayOf(Author.AUTHOR.ID), true) val PK_T_BOOK: UniqueKey = Internal.createUniqueKey(Book.BOOK, DSL.name("PK_T_BOOK"), arrayOf(Book.BOOK.ID), true) diff --git a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Author.kt b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Author.kt index c14cf5d481..d505a05377 100644 --- a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Author.kt +++ b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Author.kt @@ -110,7 +110,7 @@ class Author( constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, AUTHOR, null) override fun getSchema(): Schema = Public.PUBLIC - override fun getIdentity(): Identity = Keys.IDENTITY_AUTHOR + override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = Keys.PK_T_AUTHOR override fun getKeys(): List> = listOf(Keys.PK_T_AUTHOR) override fun `as`(alias: String): Author = Author(DSL.name(alias), this) diff --git a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Book.kt b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Book.kt index 799762561b..ac91a6dde5 100644 --- a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Book.kt +++ b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/Book.kt @@ -135,7 +135,7 @@ class Book( constructor(child: Table, key: ForeignKey): this(Internal.createPathAlias(child, key), child, key, BOOK, null) override fun getSchema(): Schema = Public.PUBLIC - override fun getIdentity(): Identity = Keys.IDENTITY_BOOK + override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = Keys.PK_T_BOOK override fun getKeys(): List> = listOf(Keys.PK_T_BOOK) override fun getReferences(): List> = listOf(Keys.FK_T_BOOK_AUTHOR_ID, Keys.FK_T_BOOK_CO_AUTHOR_ID)