diff --git a/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java b/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java index 8310f7f580..f9b2c277d7 100644 --- a/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java +++ b/jOOQ-test/src/org/jooq/test/_/testcases/ExoticTests.java @@ -368,6 +368,25 @@ extends BaseTest implements DivideByOnStep, DivideByOnConditionStep { - /** - * Generated UID - */ - private static final long serialVersionUID = -4999896035630325449L; - private final Table dividend; private final Table divisor; private final ConditionProviderImpl condition; private final FieldList returning; DivideBy(Table dividend, Table divisor) { - super("division"); - this.dividend = dividend; this.divisor = divisor; @@ -88,26 +79,6 @@ implements // XXX: Table API // ------------------------------------------------------------------------ - @Override - public final Class getRecordType() { - return RecordImpl.class; - } - - @Override - public final boolean declaresTables() { - return true; - } - - @Override - public final void toSQL(RenderContext context) { - context.sql(table(context)); - } - - @Override - public final void bind(BindContext context) { - context.bind(table(context)); - } - /** * Transform the relational division operation into SQL. *

@@ -117,9 +88,7 @@ implements * >http://www.simple-talk.com/sql/t-sql-programming/divided-we-stand-the- * sql-of-relational-division/ */ - private final Table table(Configuration configuration) { - Executor create = create(configuration); - + private final Table table() { ConditionProviderImpl selfJoin = new ConditionProviderImpl(); FieldList select = new FieldList(); Table outer = dividend.as("dividend"); @@ -144,17 +113,17 @@ implements // Apply relational division using double-nested NOT EXISTS clauses // There are more efficient ways to express division in SQL, but those // are hard to simulate with jOOQ - return create.selectDistinct(select) - .from(outer) - .whereNotExists(create - .selectOne() - .from(divisor) - .whereNotExists(create - .selectOne() - .from(dividend) - .where(selfJoin) - .and(condition))) - .asTable(); + return selectDistinct(select) + .from(outer) + .whereNotExists( + selectOne() + .from(divisor) + .whereNotExists( + selectOne() + .from(dividend) + .where(selfJoin) + .and(condition))) + .asTable(); } /** @@ -173,21 +142,6 @@ implements } } - @Override - public final Table as(String alias) { - return new TableAlias(this, alias, true); - } - - @Override - public final Table as(String alias, String... fieldAliases) { - return new TableAlias(this, alias, fieldAliases, true); - } - - @Override - protected final FieldList getFieldList() { - return new FieldList(); - } - // ------------------------------------------------------------------------ // XXX: DivideBy API // ------------------------------------------------------------------------ @@ -224,7 +178,7 @@ implements @Override public final Table returning(Collection> fields) { returning.addAll(fields); - return this; + return table(); } @Override