use of org.teiid.language.Join in project teiid by teiid.
the class JPQLSelectVisitor method handleJoin.
private JoinTable handleJoin(Join obj) throws TranslatorException {
TableReference left = obj.getLeftItem();
TableReference right = obj.getRightItem();
if ((left instanceof NamedTable) && (right instanceof NamedTable)) {
JoinTable join = handleJoin(obj.getJoinType(), left, right, true);
this.joins.add(join);
return join;
}
JoinTable leftJoin = null;
if (left instanceof Join) {
leftJoin = handleJoin((Join) left);
if (right instanceof NamedTable) {
JoinTable join = handleJoin(obj.getJoinType(), leftJoin, (NamedTable) right);
this.joins.add(join);
return join;
}
}
JoinTable rightJoin = null;
if (right instanceof Join) {
rightJoin = handleJoin((Join) right);
if (left instanceof NamedTable) {
JoinTable join = handleJoin(obj.getJoinType(), (NamedTable) left, rightJoin);
this.joins.add(join);
return join;
}
}
throw new TranslatorException(JPAPlugin.Util.gs(JPAPlugin.Event.TEIID14005));
}
use of org.teiid.language.Join in project teiid by teiid.
the class TestJoinImpl method testGetCriteria.
public void testGetCriteria() throws Exception {
Join join = example(JoinType.JOIN_INNER);
assertTrue(join.getCondition() instanceof Comparison);
}
Aggregations