diff --git a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java index 1646376dd9..92387b3124 100644 --- a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java +++ b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Author.java @@ -122,10 +122,31 @@ public class Author extends TableImpl { super(path, childPath, parentPath, AUTHOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class AuthorPath extends Author implements Path { public AuthorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private AuthorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public AuthorPath as(String alias) { + return new AuthorPath(DSL.name(alias), this); + } + + @Override + public AuthorPath as(Name alias) { + return new AuthorPath(alias, this); + } + + @Override + public AuthorPath as(Table alias) { + return new AuthorPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java index cb3954976f..8914b2623b 100644 --- a/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java +++ b/jOOQ-examples/jOOQ-flyway-ddl-example/src/main/java/org/jooq/example/flyway/ddl/db/h2/tables/Book.java @@ -108,10 +108,31 @@ public class Book extends TableImpl { super(path, childPath, parentPath, BOOK); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class BookPath extends Book implements Path { public BookPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private BookPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public BookPath as(String alias) { + return new BookPath(DSL.name(alias), this); + } + + @Override + public BookPath as(Name alias) { + return new BookPath(alias, this); + } + + @Override + public BookPath as(Table alias) { + return new BookPath(alias.getQualifiedName(), this); + } } @Override 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 d2b0d4b168..4a72cf00dd 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 @@ -107,10 +107,31 @@ public class Actor extends TableImpl { super(path, childPath, parentPath, ACTOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class ActorPath extends Actor implements Path { public ActorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private ActorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public ActorPath as(String alias) { + return new ActorPath(DSL.name(alias), this); + } + + @Override + public ActorPath as(Name alias) { + return new ActorPath(alias, this); + } + + @Override + public ActorPath as(Table alias) { + return new ActorPath(alias.getQualifiedName(), this); + } } @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 b148b0d2c0..26bc46db34 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 @@ -126,10 +126,31 @@ public class Film extends TableImpl { super(path, childPath, parentPath, FILM); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmPath extends Film implements Path { public FilmPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmPath as(String alias) { + return new FilmPath(DSL.name(alias), this); + } + + @Override + public FilmPath as(Name alias) { + return new FilmPath(alias, this); + } + + @Override + public FilmPath as(Table alias) { + return new FilmPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java index 6d533ea04a..f82e377808 100644 --- a/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java +++ b/jOOQ-examples/jOOQ-jpa-example/src/main/java/org/jooq/example/jpa/jooq/tables/FilmActor.java @@ -104,10 +104,31 @@ public class FilmActor extends TableImpl { super(path, childPath, parentPath, FILM_ACTOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmActorPath extends FilmActor implements Path { public FilmActorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmActorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmActorPath as(String alias) { + return new FilmActorPath(DSL.name(alias), this); + } + + @Override + public FilmActorPath as(Name alias) { + return new FilmActorPath(alias, this); + } + + @Override + public FilmActorPath as(Table alias) { + return new FilmActorPath(alias.getQualifiedName(), this); + } } @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 69b1f1f2c3..cc252edf00 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 @@ -101,10 +101,31 @@ public class Language extends TableImpl { super(path, childPath, parentPath, LANGUAGE); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class LanguagePath extends Language implements Path { public LanguagePath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private LanguagePath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public LanguagePath as(String alias) { + return new LanguagePath(DSL.name(alias), this); + } + + @Override + public LanguagePath as(Name alias) { + return new LanguagePath(alias, this); + } + + @Override + public LanguagePath as(Table alias) { + return new LanguagePath(alias.getQualifiedName(), this); + } } @Override 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 68971229e9..959f68813f 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 @@ -130,7 +130,16 @@ open class Author( constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, AUTHOR, null, null) - open class AuthorPath(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?) : Author(path, childPath, parentPath), Path + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class AuthorPath : Author, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): AuthorPath = AuthorPath(DSL.name(alias), this) + override fun `as`(alias: Name): AuthorPath = AuthorPath(alias, this) + override fun `as`(alias: Table<*>): AuthorPath = AuthorPath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = PK_T_AUTHOR 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 15f5a85419..826cadfe48 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 @@ -159,7 +159,16 @@ open class Book( constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, BOOK, null, null) - open class BookPath(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?) : Book(path, childPath, parentPath), Path + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class BookPath : Book, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): BookPath = BookPath(DSL.name(alias), this) + override fun `as`(alias: Name): BookPath = BookPath(alias, this) + override fun `as`(alias: Table<*>): BookPath = BookPath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getIdentity(): Identity = super.getIdentity() as Identity override fun getPrimaryKey(): UniqueKey = PK_T_BOOK diff --git a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookStore.kt b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookStore.kt index e75c36aea2..07fb70616b 100644 --- a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookStore.kt +++ b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookStore.kt @@ -103,7 +103,16 @@ open class BookStore( constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, BOOK_STORE, null, null) - open class BookStorePath(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?) : BookStore(path, childPath, parentPath), Path + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class BookStorePath : BookStore, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): BookStorePath = BookStorePath(DSL.name(alias), this) + override fun `as`(alias: Name): BookStorePath = BookStorePath(alias, this) + override fun `as`(alias: Table<*>): BookStorePath = BookStorePath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getPrimaryKey(): UniqueKey = UK_T_BOOK_STORE_NAME diff --git a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookToBookStore.kt b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookToBookStore.kt index 1ae478368c..9fc0ab08e6 100644 --- a/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookToBookStore.kt +++ b/jOOQ-examples/jOOQ-kotlin-example/src/main/kotlin/org/jooq/example/kotlin/db/h2/tables/BookToBookStore.kt @@ -115,7 +115,16 @@ open class BookToBookStore( constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): this(Internal.createPathAlias(path, childPath, parentPath), path, childPath, parentPath, BOOK_TO_BOOK_STORE, null, null) - open class BookToBookStorePath(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?) : BookToBookStore(path, childPath, parentPath), Path + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ + open class BookToBookStorePath : BookToBookStore, Path { + constructor(path: Table, childPath: ForeignKey?, parentPath: InverseForeignKey?): super(path, childPath, parentPath) + private constructor(alias: Name, aliased: Table): super(alias, aliased) + override fun `as`(alias: String): BookToBookStorePath = BookToBookStorePath(DSL.name(alias), this) + override fun `as`(alias: Name): BookToBookStorePath = BookToBookStorePath(alias, this) + override fun `as`(alias: Table<*>): BookToBookStorePath = BookToBookStorePath(alias.qualifiedName, this) + } override fun getSchema(): Schema? = if (aliased()) null else Public.PUBLIC override fun getPrimaryKey(): UniqueKey = PK_B2BS override fun getReferences(): List> = listOf(FK_B2BS_BS_NAME, FK_B2BS_B_ID) diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java index 1b770f2c24..3ebe084e8d 100644 --- a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java +++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Author.java @@ -107,10 +107,31 @@ public class Author extends TableImpl { super(path, childPath, parentPath, AUTHOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class AuthorPath extends Author implements Path { public AuthorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private AuthorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public AuthorPath as(String alias) { + return new AuthorPath(DSL.name(alias), this); + } + + @Override + public AuthorPath as(Name alias) { + return new AuthorPath(alias, this); + } + + @Override + public AuthorPath as(Table alias) { + return new AuthorPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java index 2c759e6bb4..56f80bdd10 100644 --- a/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java +++ b/jOOQ-examples/jOOQ-r2dbc-example/src/main/java/org/jooq/example/r2dbc/db/tables/Book.java @@ -109,10 +109,31 @@ public class Book extends TableImpl { super(path, childPath, parentPath, BOOK); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class BookPath extends Book implements Path { public BookPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private BookPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public BookPath as(String alias) { + return new BookPath(DSL.name(alias), this); + } + + @Override + public BookPath as(Name alias) { + return new BookPath(alias, this); + } + + @Override + public BookPath as(Table alias) { + return new BookPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java index acd52224a0..c174dc9e98 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Actor.java @@ -118,10 +118,31 @@ public class Actor extends TableImpl { super(path, childPath, parentPath, ACTOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class ActorPath extends Actor implements Path { public ActorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private ActorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public ActorPath as(String alias) { + return new ActorPath(DSL.name(alias), this); + } + + @Override + public ActorPath as(Name alias) { + return new ActorPath(alias, this); + } + + @Override + public ActorPath as(Table alias) { + return new ActorPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java index 7719828b54..80e12f8aa7 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Address.java @@ -140,10 +140,31 @@ public class Address extends TableImpl { super(path, childPath, parentPath, ADDRESS); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class AddressPath extends Address implements Path { public AddressPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private AddressPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public AddressPath as(String alias) { + return new AddressPath(DSL.name(alias), this); + } + + @Override + public AddressPath as(Name alias) { + return new AddressPath(alias, this); + } + + @Override + public AddressPath as(Table alias) { + return new AddressPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java index 4916af429e..7e92a492be 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Category.java @@ -109,10 +109,31 @@ public class Category extends TableImpl { super(path, childPath, parentPath, CATEGORY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CategoryPath extends Category implements Path { public CategoryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CategoryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CategoryPath as(String alias) { + return new CategoryPath(DSL.name(alias), this); + } + + @Override + public CategoryPath as(Name alias) { + return new CategoryPath(alias, this); + } + + @Override + public CategoryPath as(Table alias) { + return new CategoryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java index bb8796cb69..8bb88d9108 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/City.java @@ -118,10 +118,31 @@ public class City extends TableImpl { super(path, childPath, parentPath, CITY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CityPath extends City implements Path { public CityPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CityPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CityPath as(String alias) { + return new CityPath(DSL.name(alias), this); + } + + @Override + public CityPath as(Name alias) { + return new CityPath(alias, this); + } + + @Override + public CityPath as(Table alias) { + return new CityPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java index 05b1b901c8..2f72cb0b6f 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Country.java @@ -108,10 +108,31 @@ public class Country extends TableImpl { super(path, childPath, parentPath, COUNTRY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CountryPath extends Country implements Path { public CountryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CountryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CountryPath as(String alias) { + return new CountryPath(DSL.name(alias), this); + } + + @Override + public CountryPath as(Name alias) { + return new CountryPath(alias, this); + } + + @Override + public CountryPath as(Table alias) { + return new CountryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java index 3a8b722707..81559e242a 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Customer.java @@ -157,10 +157,31 @@ public class Customer extends TableImpl { super(path, childPath, parentPath, CUSTOMER); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CustomerPath extends Customer implements Path { public CustomerPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CustomerPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CustomerPath as(String alias) { + return new CustomerPath(DSL.name(alias), this); + } + + @Override + public CustomerPath as(Name alias) { + return new CustomerPath(alias, this); + } + + @Override + public CustomerPath as(Table alias) { + return new CustomerPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java index d661d49959..fabc9630cb 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Film.java @@ -180,10 +180,31 @@ public class Film extends TableImpl { super(path, childPath, parentPath, FILM); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmPath extends Film implements Path { public FilmPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmPath as(String alias) { + return new FilmPath(DSL.name(alias), this); + } + + @Override + public FilmPath as(Name alias) { + return new FilmPath(alias, this); + } + + @Override + public FilmPath as(Table alias) { + return new FilmPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java index 1713c0ae57..338c8d6a49 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmActor.java @@ -112,10 +112,31 @@ public class FilmActor extends TableImpl { super(path, childPath, parentPath, FILM_ACTOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmActorPath extends FilmActor implements Path { public FilmActorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmActorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmActorPath as(String alias) { + return new FilmActorPath(DSL.name(alias), this); + } + + @Override + public FilmActorPath as(Name alias) { + return new FilmActorPath(alias, this); + } + + @Override + public FilmActorPath as(Table alias) { + return new FilmActorPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java index 52014e3c2c..c32da4b8ac 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/FilmCategory.java @@ -110,10 +110,31 @@ public class FilmCategory extends TableImpl { super(path, childPath, parentPath, FILM_CATEGORY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmCategoryPath extends FilmCategory implements Path { public FilmCategoryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmCategoryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmCategoryPath as(String alias) { + return new FilmCategoryPath(DSL.name(alias), this); + } + + @Override + public FilmCategoryPath as(Name alias) { + return new FilmCategoryPath(alias, this); + } + + @Override + public FilmCategoryPath as(Table alias) { + return new FilmCategoryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java index 51872c9fc7..b90ad2af91 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Inventory.java @@ -119,10 +119,31 @@ public class Inventory extends TableImpl { super(path, childPath, parentPath, INVENTORY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class InventoryPath extends Inventory implements Path { public InventoryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private InventoryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public InventoryPath as(String alias) { + return new InventoryPath(DSL.name(alias), this); + } + + @Override + public InventoryPath as(Name alias) { + return new InventoryPath(alias, this); + } + + @Override + public InventoryPath as(Table alias) { + return new InventoryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java index 9619d55499..dc4bbd04f4 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Language.java @@ -108,10 +108,31 @@ public class Language extends TableImpl { super(path, childPath, parentPath, LANGUAGE); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class LanguagePath extends Language implements Path { public LanguagePath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private LanguagePath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public LanguagePath as(String alias) { + return new LanguagePath(DSL.name(alias), this); + } + + @Override + public LanguagePath as(Name alias) { + return new LanguagePath(alias, this); + } + + @Override + public LanguagePath as(Table alias) { + return new LanguagePath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Payment.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Payment.java index ddcdffc1f7..8bd5ab5184 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Payment.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Payment.java @@ -130,10 +130,31 @@ public class Payment extends TableImpl { super(path, childPath, parentPath, PAYMENT); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentPath extends Payment implements Path { public PaymentPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentPath as(String alias) { + return new PaymentPath(DSL.name(alias), this); + } + + @Override + public PaymentPath as(Name alias) { + return new PaymentPath(alias, this); + } + + @Override + public PaymentPath as(Table alias) { + return new PaymentPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java index 9bbe3615bb..7e6195ef24 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_01.java @@ -131,10 +131,31 @@ public class PaymentP2007_01 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_01); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_01Path extends PaymentP2007_01 implements Path { public PaymentP2007_01Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_01Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_01Path as(String alias) { + return new PaymentP2007_01Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_01Path as(Name alias) { + return new PaymentP2007_01Path(alias, this); + } + + @Override + public PaymentP2007_01Path as(Table alias) { + return new PaymentP2007_01Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java index 581719e44d..abf238c67f 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_02.java @@ -131,10 +131,31 @@ public class PaymentP2007_02 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_02); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_02Path extends PaymentP2007_02 implements Path { public PaymentP2007_02Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_02Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_02Path as(String alias) { + return new PaymentP2007_02Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_02Path as(Name alias) { + return new PaymentP2007_02Path(alias, this); + } + + @Override + public PaymentP2007_02Path as(Table alias) { + return new PaymentP2007_02Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java index 42e67f3f37..092c25ee8a 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_03.java @@ -131,10 +131,31 @@ public class PaymentP2007_03 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_03); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_03Path extends PaymentP2007_03 implements Path { public PaymentP2007_03Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_03Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_03Path as(String alias) { + return new PaymentP2007_03Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_03Path as(Name alias) { + return new PaymentP2007_03Path(alias, this); + } + + @Override + public PaymentP2007_03Path as(Table alias) { + return new PaymentP2007_03Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java index 62f352fe4f..c1b634ee1c 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_04.java @@ -131,10 +131,31 @@ public class PaymentP2007_04 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_04); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_04Path extends PaymentP2007_04 implements Path { public PaymentP2007_04Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_04Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_04Path as(String alias) { + return new PaymentP2007_04Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_04Path as(Name alias) { + return new PaymentP2007_04Path(alias, this); + } + + @Override + public PaymentP2007_04Path as(Table alias) { + return new PaymentP2007_04Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java index 929484b124..2bf1457848 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_05.java @@ -131,10 +131,31 @@ public class PaymentP2007_05 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_05); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_05Path extends PaymentP2007_05 implements Path { public PaymentP2007_05Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_05Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_05Path as(String alias) { + return new PaymentP2007_05Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_05Path as(Name alias) { + return new PaymentP2007_05Path(alias, this); + } + + @Override + public PaymentP2007_05Path as(Table alias) { + return new PaymentP2007_05Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java index 7204bce105..a99bf1ce8a 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/PaymentP2007_06.java @@ -131,10 +131,31 @@ public class PaymentP2007_06 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_06); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_06Path extends PaymentP2007_06 implements Path { public PaymentP2007_06Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_06Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_06Path as(String alias) { + return new PaymentP2007_06Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_06Path as(Name alias) { + return new PaymentP2007_06Path(alias, this); + } + + @Override + public PaymentP2007_06Path as(Table alias) { + return new PaymentP2007_06Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java index 6d91679371..58f9da64bd 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Rental.java @@ -141,10 +141,31 @@ public class Rental extends TableImpl { super(path, childPath, parentPath, RENTAL); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class RentalPath extends Rental implements Path { public RentalPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private RentalPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public RentalPath as(String alias) { + return new RentalPath(DSL.name(alias), this); + } + + @Override + public RentalPath as(Name alias) { + return new RentalPath(alias, this); + } + + @Override + public RentalPath as(Table alias) { + return new RentalPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java index aec520f3f7..7850b4358e 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Staff.java @@ -159,10 +159,31 @@ public class Staff extends TableImpl { super(path, childPath, parentPath, STAFF); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class StaffPath extends Staff implements Path { public StaffPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private StaffPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public StaffPath as(String alias) { + return new StaffPath(DSL.name(alias), this); + } + + @Override + public StaffPath as(Name alias) { + return new StaffPath(alias, this); + } + + @Override + public StaffPath as(Table alias) { + return new StaffPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java index 745ed29946..d338595db2 100644 --- a/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java +++ b/jOOQ-examples/jOOQ-testcontainers-example/src/main/java/org/jooq/example/testcontainers/db/tables/Store.java @@ -120,10 +120,31 @@ public class Store extends TableImpl { super(path, childPath, parentPath, STORE); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class StorePath extends Store implements Path { public StorePath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private StorePath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public StorePath as(String alias) { + return new StorePath(DSL.name(alias), this); + } + + @Override + public StorePath as(Name alias) { + return new StorePath(alias, this); + } + + @Override + public StorePath as(Table alias) { + return new StorePath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java index e6c1b8e5e0..c011d056aa 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Actor.java @@ -118,10 +118,31 @@ public class Actor extends TableImpl { super(path, childPath, parentPath, ACTOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class ActorPath extends Actor implements Path { public ActorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private ActorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public ActorPath as(String alias) { + return new ActorPath(DSL.name(alias), this); + } + + @Override + public ActorPath as(Name alias) { + return new ActorPath(alias, this); + } + + @Override + public ActorPath as(Table alias) { + return new ActorPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java index a74ad86d9e..8438064a63 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Address.java @@ -140,10 +140,31 @@ public class Address extends TableImpl { super(path, childPath, parentPath, ADDRESS); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class AddressPath extends Address implements Path { public AddressPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private AddressPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public AddressPath as(String alias) { + return new AddressPath(DSL.name(alias), this); + } + + @Override + public AddressPath as(Name alias) { + return new AddressPath(alias, this); + } + + @Override + public AddressPath as(Table alias) { + return new AddressPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java index 77e4e8baf6..9d84ff958a 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Category.java @@ -109,10 +109,31 @@ public class Category extends TableImpl { super(path, childPath, parentPath, CATEGORY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CategoryPath extends Category implements Path { public CategoryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CategoryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CategoryPath as(String alias) { + return new CategoryPath(DSL.name(alias), this); + } + + @Override + public CategoryPath as(Name alias) { + return new CategoryPath(alias, this); + } + + @Override + public CategoryPath as(Table alias) { + return new CategoryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java index 7cac05f6d9..428d710277 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/City.java @@ -118,10 +118,31 @@ public class City extends TableImpl { super(path, childPath, parentPath, CITY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CityPath extends City implements Path { public CityPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CityPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CityPath as(String alias) { + return new CityPath(DSL.name(alias), this); + } + + @Override + public CityPath as(Name alias) { + return new CityPath(alias, this); + } + + @Override + public CityPath as(Table alias) { + return new CityPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java index 6ac2696c68..47fd5d514b 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Country.java @@ -108,10 +108,31 @@ public class Country extends TableImpl { super(path, childPath, parentPath, COUNTRY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CountryPath extends Country implements Path { public CountryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CountryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CountryPath as(String alias) { + return new CountryPath(DSL.name(alias), this); + } + + @Override + public CountryPath as(Name alias) { + return new CountryPath(alias, this); + } + + @Override + public CountryPath as(Table alias) { + return new CountryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java index 5e93dc64a9..77705a5e8b 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Customer.java @@ -157,10 +157,31 @@ public class Customer extends TableImpl { super(path, childPath, parentPath, CUSTOMER); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class CustomerPath extends Customer implements Path { public CustomerPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private CustomerPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public CustomerPath as(String alias) { + return new CustomerPath(DSL.name(alias), this); + } + + @Override + public CustomerPath as(Name alias) { + return new CustomerPath(alias, this); + } + + @Override + public CustomerPath as(Table alias) { + return new CustomerPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java index dc1500f816..8689835993 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Film.java @@ -180,10 +180,31 @@ public class Film extends TableImpl { super(path, childPath, parentPath, FILM); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmPath extends Film implements Path { public FilmPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmPath as(String alias) { + return new FilmPath(DSL.name(alias), this); + } + + @Override + public FilmPath as(Name alias) { + return new FilmPath(alias, this); + } + + @Override + public FilmPath as(Table alias) { + return new FilmPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java index 6fc834986f..c5639a8f92 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmActor.java @@ -112,10 +112,31 @@ public class FilmActor extends TableImpl { super(path, childPath, parentPath, FILM_ACTOR); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmActorPath extends FilmActor implements Path { public FilmActorPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmActorPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmActorPath as(String alias) { + return new FilmActorPath(DSL.name(alias), this); + } + + @Override + public FilmActorPath as(Name alias) { + return new FilmActorPath(alias, this); + } + + @Override + public FilmActorPath as(Table alias) { + return new FilmActorPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java index 507fe8ae43..529b649706 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/FilmCategory.java @@ -110,10 +110,31 @@ public class FilmCategory extends TableImpl { super(path, childPath, parentPath, FILM_CATEGORY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class FilmCategoryPath extends FilmCategory implements Path { public FilmCategoryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private FilmCategoryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public FilmCategoryPath as(String alias) { + return new FilmCategoryPath(DSL.name(alias), this); + } + + @Override + public FilmCategoryPath as(Name alias) { + return new FilmCategoryPath(alias, this); + } + + @Override + public FilmCategoryPath as(Table alias) { + return new FilmCategoryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java index e526bb4636..a81fb3771c 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Inventory.java @@ -119,10 +119,31 @@ public class Inventory extends TableImpl { super(path, childPath, parentPath, INVENTORY); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class InventoryPath extends Inventory implements Path { public InventoryPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private InventoryPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public InventoryPath as(String alias) { + return new InventoryPath(DSL.name(alias), this); + } + + @Override + public InventoryPath as(Name alias) { + return new InventoryPath(alias, this); + } + + @Override + public InventoryPath as(Table alias) { + return new InventoryPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java index 5cc5fcb9d2..3720347bbe 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Language.java @@ -108,10 +108,31 @@ public class Language extends TableImpl { super(path, childPath, parentPath, LANGUAGE); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class LanguagePath extends Language implements Path { public LanguagePath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private LanguagePath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public LanguagePath as(String alias) { + return new LanguagePath(DSL.name(alias), this); + } + + @Override + public LanguagePath as(Name alias) { + return new LanguagePath(alias, this); + } + + @Override + public LanguagePath as(Table alias) { + return new LanguagePath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Payment.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Payment.java index b9324b8ba3..3ce7251688 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Payment.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Payment.java @@ -130,10 +130,31 @@ public class Payment extends TableImpl { super(path, childPath, parentPath, PAYMENT); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentPath extends Payment implements Path { public PaymentPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentPath as(String alias) { + return new PaymentPath(DSL.name(alias), this); + } + + @Override + public PaymentPath as(Name alias) { + return new PaymentPath(alias, this); + } + + @Override + public PaymentPath as(Table alias) { + return new PaymentPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java index b891ccff08..258b1f3e96 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_01.java @@ -131,10 +131,31 @@ public class PaymentP2007_01 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_01); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_01Path extends PaymentP2007_01 implements Path { public PaymentP2007_01Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_01Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_01Path as(String alias) { + return new PaymentP2007_01Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_01Path as(Name alias) { + return new PaymentP2007_01Path(alias, this); + } + + @Override + public PaymentP2007_01Path as(Table alias) { + return new PaymentP2007_01Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java index 669a7ea82f..636ce945e1 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_02.java @@ -131,10 +131,31 @@ public class PaymentP2007_02 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_02); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_02Path extends PaymentP2007_02 implements Path { public PaymentP2007_02Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_02Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_02Path as(String alias) { + return new PaymentP2007_02Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_02Path as(Name alias) { + return new PaymentP2007_02Path(alias, this); + } + + @Override + public PaymentP2007_02Path as(Table alias) { + return new PaymentP2007_02Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java index 6916001ff5..bff68d937d 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_03.java @@ -131,10 +131,31 @@ public class PaymentP2007_03 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_03); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_03Path extends PaymentP2007_03 implements Path { public PaymentP2007_03Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_03Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_03Path as(String alias) { + return new PaymentP2007_03Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_03Path as(Name alias) { + return new PaymentP2007_03Path(alias, this); + } + + @Override + public PaymentP2007_03Path as(Table alias) { + return new PaymentP2007_03Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java index 3b5e4bc471..b70a1c7a40 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_04.java @@ -131,10 +131,31 @@ public class PaymentP2007_04 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_04); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_04Path extends PaymentP2007_04 implements Path { public PaymentP2007_04Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_04Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_04Path as(String alias) { + return new PaymentP2007_04Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_04Path as(Name alias) { + return new PaymentP2007_04Path(alias, this); + } + + @Override + public PaymentP2007_04Path as(Table alias) { + return new PaymentP2007_04Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java index 63866bbf9b..7dd51d6158 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_05.java @@ -131,10 +131,31 @@ public class PaymentP2007_05 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_05); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_05Path extends PaymentP2007_05 implements Path { public PaymentP2007_05Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_05Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_05Path as(String alias) { + return new PaymentP2007_05Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_05Path as(Name alias) { + return new PaymentP2007_05Path(alias, this); + } + + @Override + public PaymentP2007_05Path as(Table alias) { + return new PaymentP2007_05Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java index abe7307e9e..3b2a517ac8 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/PaymentP2007_06.java @@ -131,10 +131,31 @@ public class PaymentP2007_06 extends TableImpl { super(path, childPath, parentPath, PAYMENT_P2007_06); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class PaymentP2007_06Path extends PaymentP2007_06 implements Path { public PaymentP2007_06Path(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private PaymentP2007_06Path(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public PaymentP2007_06Path as(String alias) { + return new PaymentP2007_06Path(DSL.name(alias), this); + } + + @Override + public PaymentP2007_06Path as(Name alias) { + return new PaymentP2007_06Path(alias, this); + } + + @Override + public PaymentP2007_06Path as(Table alias) { + return new PaymentP2007_06Path(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java index 370cbab1f3..18849ef622 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Rental.java @@ -141,10 +141,31 @@ public class Rental extends TableImpl { super(path, childPath, parentPath, RENTAL); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class RentalPath extends Rental implements Path { public RentalPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private RentalPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public RentalPath as(String alias) { + return new RentalPath(DSL.name(alias), this); + } + + @Override + public RentalPath as(Name alias) { + return new RentalPath(alias, this); + } + + @Override + public RentalPath as(Table alias) { + return new RentalPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java index b28c218930..94f02e0239 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Staff.java @@ -159,10 +159,31 @@ public class Staff extends TableImpl { super(path, childPath, parentPath, STAFF); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class StaffPath extends Staff implements Path { public StaffPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private StaffPath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public StaffPath as(String alias) { + return new StaffPath(DSL.name(alias), this); + } + + @Override + public StaffPath as(Name alias) { + return new StaffPath(alias, this); + } + + @Override + public StaffPath as(Table alias) { + return new StaffPath(alias.getQualifiedName(), this); + } } @Override diff --git a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java index 945f02da58..b67b7ee80c 100644 --- a/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java +++ b/jOOQ-examples/jOOQ-testcontainers-flyway-example/src/main/java/org/jooq/example/testcontainersflyway/db/tables/Store.java @@ -120,10 +120,31 @@ public class Store extends TableImpl { super(path, childPath, parentPath, STORE); } + /** + * A subtype implementing {@link Path} for simplified path-based joins. + */ public static class StorePath extends Store implements Path { public StorePath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { super(path, childPath, parentPath); } + private StorePath(Name alias, Table aliased) { + super(alias, aliased); + } + + @Override + public StorePath as(String alias) { + return new StorePath(DSL.name(alias), this); + } + + @Override + public StorePath as(Name alias) { + return new StorePath(alias, this); + } + + @Override + public StorePath as(Table alias) { + return new StorePath(alias.getQualifiedName(), this); + } } @Override