From 35a80da4c25598987319d8629b6eb84f7c1a641f Mon Sep 17 00:00:00 2001 From: Lukas Eder Date: Wed, 9 Aug 2023 16:46:48 +0200 Subject: [PATCH] [jOOQ/jOOQ#15005] No need for Path subtypes in jOOQ-meta (for now) --- .../tables/CheckConstraints.java | 35 +------- .../information_schema/tables/Columns.java | 42 ++-------- .../tables/KeyColumnUsage.java | 35 +------- .../tables/ReferentialConstraints.java | 35 +------- .../information_schema/tables/Routines.java | 35 +------- .../information_schema/tables/Schemata.java | 84 ++++++------------- .../information_schema/tables/Sequences.java | 35 +------- .../information_schema/tables/Tables.java | 56 +++---------- .../information_schema/tables/Triggers.java | 35 +------- .../information_schema/tables/Views.java | 42 ++-------- 10 files changed, 66 insertions(+), 368 deletions(-) diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/CheckConstraints.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/CheckConstraints.java index d967c8149d..c37f3c38df 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/CheckConstraints.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/CheckConstraints.java @@ -12,7 +12,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -24,7 +23,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; /** @@ -109,33 +107,6 @@ public class CheckConstraints extends TableImpl { super(path, childPath, parentPath, CHECK_CONSTRAINTS); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class CheckConstraintsPath extends CheckConstraints implements Path { - public CheckConstraintsPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private CheckConstraintsPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public CheckConstraintsPath as(String alias) { - return new CheckConstraintsPath(DSL.name(alias), this); - } - - @Override - public CheckConstraintsPath as(Name alias) { - return new CheckConstraintsPath(alias, this); - } - - @Override - public CheckConstraintsPath as(Table alias) { - return new CheckConstraintsPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -151,15 +122,15 @@ public class CheckConstraints extends TableImpl { return Arrays.asList(Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA); } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Columns.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Columns.java index 3f8dcf148c..40a4bf2fc5 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Columns.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Columns.java @@ -12,7 +12,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -23,8 +22,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; -import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath; /** @@ -304,33 +301,6 @@ public class Columns extends TableImpl { super(path, childPath, parentPath, COLUMNS); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class ColumnsPath extends Columns implements Path { - public ColumnsPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private ColumnsPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public ColumnsPath as(String alias) { - return new ColumnsPath(DSL.name(alias), this); - } - - @Override - public ColumnsPath as(Name alias) { - return new ColumnsPath(alias, this); - } - - @Override - public ColumnsPath as(Table alias) { - return new ColumnsPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -341,28 +311,28 @@ public class Columns extends TableImpl { return Arrays.asList(Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA); } - private transient TablesPath _tables; + private transient Tables _tables; /** * Get the implicit join path to the information_schema.tables * table. */ - public TablesPath tables() { + public Tables tables() { if (_tables == null) - _tables = new TablesPath(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null); + _tables = new Tables(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES, null); return _tables; } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/KeyColumnUsage.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/KeyColumnUsage.java index 07c9d00427..c50d4abf7f 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/KeyColumnUsage.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/KeyColumnUsage.java @@ -12,7 +12,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -23,7 +22,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; /** @@ -134,33 +132,6 @@ public class KeyColumnUsage extends TableImpl { super(path, childPath, parentPath, KEY_COLUMN_USAGE); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class KeyColumnUsagePath extends KeyColumnUsage implements Path { - public KeyColumnUsagePath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private KeyColumnUsagePath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public KeyColumnUsagePath as(String alias) { - return new KeyColumnUsagePath(DSL.name(alias), this); - } - - @Override - public KeyColumnUsagePath as(Name alias) { - return new KeyColumnUsagePath(alias, this); - } - - @Override - public KeyColumnUsagePath as(Table alias) { - return new KeyColumnUsagePath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -171,15 +142,15 @@ public class KeyColumnUsage extends TableImpl { return Arrays.asList(Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA); } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/ReferentialConstraints.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/ReferentialConstraints.java index 368e6a26a9..72f9e2fe58 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/ReferentialConstraints.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/ReferentialConstraints.java @@ -12,7 +12,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -23,7 +22,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; /** @@ -138,33 +136,6 @@ public class ReferentialConstraints extends TableImpl { super(path, childPath, parentPath, REFERENTIAL_CONSTRAINTS); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class ReferentialConstraintsPath extends ReferentialConstraints implements Path { - public ReferentialConstraintsPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private ReferentialConstraintsPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public ReferentialConstraintsPath as(String alias) { - return new ReferentialConstraintsPath(DSL.name(alias), this); - } - - @Override - public ReferentialConstraintsPath as(Name alias) { - return new ReferentialConstraintsPath(alias, this); - } - - @Override - public ReferentialConstraintsPath as(Table alias) { - return new ReferentialConstraintsPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -175,15 +146,15 @@ public class ReferentialConstraints extends TableImpl { return Arrays.asList(Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA); } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Routines.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Routines.java index fb4cda881b..2a7dd888aa 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Routines.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Routines.java @@ -13,7 +13,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -24,7 +23,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; /** @@ -525,33 +523,6 @@ public class Routines extends TableImpl { super(path, childPath, parentPath, ROUTINES); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class RoutinesPath extends Routines implements Path { - public RoutinesPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private RoutinesPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public RoutinesPath as(String alias) { - return new RoutinesPath(DSL.name(alias), this); - } - - @Override - public RoutinesPath as(Name alias) { - return new RoutinesPath(alias, this); - } - - @Override - public RoutinesPath as(Table alias) { - return new RoutinesPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -562,15 +533,15 @@ public class Routines extends TableImpl { return Arrays.asList(Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA); } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Schemata.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Schemata.java index 99a7c90550..5991e73dda 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Schemata.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Schemata.java @@ -9,7 +9,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -21,14 +20,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.CheckConstraints.CheckConstraintsPath; -import org.jooq.meta.postgres.information_schema.tables.Columns.ColumnsPath; -import org.jooq.meta.postgres.information_schema.tables.KeyColumnUsage.KeyColumnUsagePath; -import org.jooq.meta.postgres.information_schema.tables.ReferentialConstraints.ReferentialConstraintsPath; -import org.jooq.meta.postgres.information_schema.tables.Routines.RoutinesPath; -import org.jooq.meta.postgres.information_schema.tables.Sequences.SequencesPath; -import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath; -import org.jooq.meta.postgres.information_schema.tables.Views.ViewsPath; /** @@ -125,33 +116,6 @@ public class Schemata extends TableImpl { super(path, childPath, parentPath, SCHEMATA); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class SchemataPath extends Schemata implements Path { - public SchemataPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private SchemataPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public SchemataPath as(String alias) { - return new SchemataPath(DSL.name(alias), this); - } - - @Override - public SchemataPath as(Name alias) { - return new SchemataPath(alias, this); - } - - @Override - public SchemataPath as(Table alias) { - return new SchemataPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -162,106 +126,106 @@ public class Schemata extends TableImpl { return Keys.SYNTHETIC_PK_SCHEMATA; } - private transient CheckConstraintsPath _checkConstraints; + private transient CheckConstraints _checkConstraints; /** * Get the implicit to-many join path to the * information_schema.check_constraints table */ - public CheckConstraintsPath checkConstraints() { + public CheckConstraints checkConstraints() { if (_checkConstraints == null) - _checkConstraints = new CheckConstraintsPath(this, null, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _checkConstraints = new CheckConstraints(this, null, Keys.CHECK_CONSTRAINTS__SYNTHETIC_FK_CHECK_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _checkConstraints; } - private transient KeyColumnUsagePath _keyColumnUsage; + private transient KeyColumnUsage _keyColumnUsage; /** * Get the implicit to-many join path to the * information_schema.key_column_usage table */ - public KeyColumnUsagePath keyColumnUsage() { + public KeyColumnUsage keyColumnUsage() { if (_keyColumnUsage == null) - _keyColumnUsage = new KeyColumnUsagePath(this, null, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _keyColumnUsage = new KeyColumnUsage(this, null, Keys.KEY_COLUMN_USAGE__SYNTHETIC_FK_KEY_COLUMN_USAGE__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _keyColumnUsage; } - private transient ReferentialConstraintsPath _referentialConstraints; + private transient ReferentialConstraints _referentialConstraints; /** * Get the implicit to-many join path to the * information_schema.referential_constraints table */ - public ReferentialConstraintsPath referentialConstraints() { + public ReferentialConstraints referentialConstraints() { if (_referentialConstraints == null) - _referentialConstraints = new ReferentialConstraintsPath(this, null, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _referentialConstraints = new ReferentialConstraints(this, null, Keys.REFERENTIAL_CONSTRAINTS__SYNTHETIC_FK_REFERENTIAL_CONSTRAINTS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _referentialConstraints; } - private transient ColumnsPath _columns; + private transient Columns _columns; /** * Get the implicit to-many join path to the * information_schema.columns table */ - public ColumnsPath columns() { + public Columns columns() { if (_columns == null) - _columns = new ColumnsPath(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _columns = new Columns(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _columns; } - private transient TablesPath _tables; + private transient Tables _tables; /** * Get the implicit to-many join path to the * information_schema.tables table */ - public TablesPath tables() { + public Tables tables() { if (_tables == null) - _tables = new TablesPath(this, null, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _tables = new Tables(this, null, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _tables; } - private transient ViewsPath _views; + private transient Views _views; /** * Get the implicit to-many join path to the * information_schema.views table */ - public ViewsPath views() { + public Views views() { if (_views == null) - _views = new ViewsPath(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _views = new Views(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _views; } - private transient RoutinesPath _routines; + private transient Routines _routines; /** * Get the implicit to-many join path to the * information_schema.routines table */ - public RoutinesPath routines() { + public Routines routines() { if (_routines == null) - _routines = new RoutinesPath(this, null, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _routines = new Routines(this, null, Keys.ROUTINES__SYNTHETIC_FK_ROUTINES__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _routines; } - private transient SequencesPath _sequences; + private transient Sequences _sequences; /** * Get the implicit to-many join path to the * information_schema.sequences table */ - public SequencesPath sequences() { + public Sequences sequences() { if (_sequences == null) - _sequences = new SequencesPath(this, null, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA.getInverseKey()); + _sequences = new Sequences(this, null, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA.getInverseKey()); return _sequences; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Sequences.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Sequences.java index b42c155ea8..8653f33e83 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Sequences.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Sequences.java @@ -12,7 +12,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -24,7 +23,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; /** @@ -144,33 +142,6 @@ public class Sequences extends TableImpl { super(path, childPath, parentPath, SEQUENCES); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class SequencesPath extends Sequences implements Path { - public SequencesPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private SequencesPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public SequencesPath as(String alias) { - return new SequencesPath(DSL.name(alias), this); - } - - @Override - public SequencesPath as(Name alias) { - return new SequencesPath(alias, this); - } - - @Override - public SequencesPath as(Table alias) { - return new SequencesPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -186,15 +157,15 @@ public class Sequences extends TableImpl { return Arrays.asList(Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA); } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.SEQUENCES__SYNTHETIC_FK_SEQUENCES__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Tables.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Tables.java index 8d3eb248d6..cc73fbc0ca 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Tables.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Tables.java @@ -12,7 +12,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -24,10 +23,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Columns.ColumnsPath; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; -import org.jooq.meta.postgres.information_schema.tables.Triggers.TriggersPath; -import org.jooq.meta.postgres.information_schema.tables.Views.ViewsPath; /** @@ -147,33 +142,6 @@ public class Tables extends TableImpl { super(path, childPath, parentPath, TABLES); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class TablesPath extends Tables implements Path { - public TablesPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private TablesPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public TablesPath as(String alias) { - return new TablesPath(DSL.name(alias), this); - } - - @Override - public TablesPath as(Name alias) { - return new TablesPath(alias, this); - } - - @Override - public TablesPath as(Table alias) { - return new TablesPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -189,54 +157,54 @@ public class Tables extends TableImpl { return Arrays.asList(Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA); } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.TABLES__SYNTHETIC_FK_TABLES__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } - private transient ColumnsPath _columns; + private transient Columns _columns; /** * Get the implicit to-many join path to the * information_schema.columns table */ - public ColumnsPath columns() { + public Columns columns() { if (_columns == null) - _columns = new ColumnsPath(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES.getInverseKey()); + _columns = new Columns(this, null, Keys.COLUMNS__SYNTHETIC_FK_COLUMNS__SYNTHETIC_PK_TABLES.getInverseKey()); return _columns; } - private transient TriggersPath _triggers; + private transient Triggers _triggers; /** * Get the implicit to-many join path to the * information_schema.triggers table */ - public TriggersPath triggers() { + public Triggers triggers() { if (_triggers == null) - _triggers = new TriggersPath(this, null, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES.getInverseKey()); + _triggers = new Triggers(this, null, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES.getInverseKey()); return _triggers; } - private transient ViewsPath _views; + private transient Views _views; /** * Get the implicit to-many join path to the * information_schema.views table */ - public ViewsPath views() { + public Views views() { if (_views == null) - _views = new ViewsPath(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES.getInverseKey()); + _views = new Views(this, null, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES.getInverseKey()); return _views; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Triggers.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Triggers.java index acede6f958..85dabf960a 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Triggers.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Triggers.java @@ -13,7 +13,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -25,7 +24,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath; /** @@ -173,33 +171,6 @@ public class Triggers extends TableImpl { super(path, childPath, parentPath, TRIGGERS); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class TriggersPath extends Triggers implements Path { - public TriggersPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private TriggersPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public TriggersPath as(String alias) { - return new TriggersPath(DSL.name(alias), this); - } - - @Override - public TriggersPath as(Name alias) { - return new TriggersPath(alias, this); - } - - @Override - public TriggersPath as(Table alias) { - return new TriggersPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -215,15 +186,15 @@ public class Triggers extends TableImpl { return Arrays.asList(Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES); } - private transient TablesPath _tables; + private transient Tables _tables; /** * Get the implicit join path to the information_schema.tables * table. */ - public TablesPath tables() { + public Tables tables() { if (_tables == null) - _tables = new TablesPath(this, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES, null); + _tables = new Tables(this, Keys.TRIGGERS__SYNTHETIC_FK_TRIGGERS__SYNTHETIC_PK_TABLES, null); return _tables; } diff --git a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Views.java b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Views.java index 2f8a9cb6cb..20a453c240 100644 --- a/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Views.java +++ b/jOOQ-meta/src/main/java/org/jooq/meta/postgres/information_schema/tables/Views.java @@ -12,7 +12,6 @@ import org.jooq.Field; import org.jooq.ForeignKey; import org.jooq.InverseForeignKey; import org.jooq.Name; -import org.jooq.Path; import org.jooq.Record; import org.jooq.Schema; import org.jooq.Table; @@ -23,8 +22,6 @@ import org.jooq.impl.SQLDataType; import org.jooq.impl.TableImpl; import org.jooq.meta.postgres.information_schema.InformationSchema; import org.jooq.meta.postgres.information_schema.Keys; -import org.jooq.meta.postgres.information_schema.tables.Schemata.SchemataPath; -import org.jooq.meta.postgres.information_schema.tables.Tables.TablesPath; /** @@ -132,33 +129,6 @@ public class Views extends TableImpl { super(path, childPath, parentPath, VIEWS); } - /** - * A subtype implementing {@link Path} for simplified path-based joins. - */ - public static class ViewsPath extends Views implements Path { - public ViewsPath(Table path, ForeignKey childPath, InverseForeignKey parentPath) { - super(path, childPath, parentPath); - } - private ViewsPath(Name alias, Table aliased) { - super(alias, aliased); - } - - @Override - public ViewsPath as(String alias) { - return new ViewsPath(DSL.name(alias), this); - } - - @Override - public ViewsPath as(Name alias) { - return new ViewsPath(alias, this); - } - - @Override - public ViewsPath as(Table alias) { - return new ViewsPath(alias.getQualifiedName(), this); - } - } - @Override public Schema getSchema() { return aliased() ? null : InformationSchema.INFORMATION_SCHEMA; @@ -169,28 +139,28 @@ public class Views extends TableImpl { return Arrays.asList(Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES); } - private transient SchemataPath _schemata; + private transient Schemata _schemata; /** * Get the implicit join path to the * information_schema.schemata table. */ - public SchemataPath schemata() { + public Schemata schemata() { if (_schemata == null) - _schemata = new SchemataPath(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA, null); + _schemata = new Schemata(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_SCHEMATA, null); return _schemata; } - private transient TablesPath _tables; + private transient Tables _tables; /** * Get the implicit join path to the information_schema.tables * table. */ - public TablesPath tables() { + public Tables tables() { if (_tables == null) - _tables = new TablesPath(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES, null); + _tables = new Tables(this, Keys.VIEWS__SYNTHETIC_FK_VIEWS__SYNTHETIC_PK_TABLES, null); return _tables; }