[#6094] Resolved type hierarchy inconsistency (jOOQ Pro only)

This commit is contained in:
lukaseder 2017-05-03 11:20:43 +02:00
parent a3c6e4fa4c
commit 3605697b8d
5 changed files with 9 additions and 5 deletions

View File

@ -42,6 +42,6 @@ package org.jooq;
*
* @author Lukas Eder
*/
public interface TableOptionalOnStep<R extends Record> extends TablePartitionByStep<R>, Table<R> {
public interface TableOptionalOnStep<R extends Record> extends TableOnStep<R>, Table<R> {
}

View File

@ -971,9 +971,10 @@ abstract class AbstractTable<R extends Record> extends AbstractQueryPart impleme
return leftOuterJoin(table(name));
}
@SuppressWarnings("unchecked")
@Override
public final TablePartitionByStep<Record> leftOuterJoin(TableLike<?> table) {
return join(table, LEFT_OUTER_JOIN);
return (TablePartitionByStep<Record>) join(table, LEFT_OUTER_JOIN);
}
@Override
@ -1031,9 +1032,10 @@ abstract class AbstractTable<R extends Record> extends AbstractQueryPart impleme
return rightOuterJoin(table(name));
}
@SuppressWarnings("unchecked")
@Override
public final TablePartitionByStep<Record> rightOuterJoin(TableLike<?> table) {
return join(table, RIGHT_OUTER_JOIN);
return (TablePartitionByStep<Record>) join(table, RIGHT_OUTER_JOIN);
}
@Override

View File

@ -113,6 +113,7 @@ import org.jooq.TableLike;
import org.jooq.TableOnConditionStep;
import org.jooq.TableOptionalOnStep;
import org.jooq.TableOuterJoinStep;
import org.jooq.TablePartitionByStep;
import org.jooq.exception.DataAccessException;
/**
@ -124,6 +125,7 @@ final class JoinTable extends AbstractTable<Record>
implements
TableOuterJoinStep<Record>,
TableOptionalOnStep<Record>,
TablePartitionByStep<Record>,
TableOnConditionStep<Record> {
/**

View File

@ -2284,7 +2284,7 @@ class ParserImpl implements Parser {
TableOptionalOnStep<?> s0;
TablePartitionByStep<?> s1;
TableOnStep<?> s2;
s2 = s1 = s0 = left.join(right, joinType);
s2 = s1 = (TablePartitionByStep<?>) (s0 = left.join(right, joinType));
switch (joinType) {
case LEFT_OUTER_JOIN:

View File

@ -2126,7 +2126,7 @@ final class SelectQueryImpl<R extends Record> extends AbstractResultQuery<R> imp
case LEFT_OUTER_JOIN:
case RIGHT_OUTER_JOIN: {
TablePartitionByStep<?> p = getFrom().get(index).join(table, type);
TablePartitionByStep<?> p = (TablePartitionByStep<?>) getFrom().get(index).join(table, type);
TableOnStep<?> o = p;