Package org.teiid.language

Examples of org.teiid.language.TableReference


        }
        buffer.append(NULL);
    }

    public void visit(Join obj) {
        TableReference leftItem = obj.getLeftItem();
        if(useParensForJoins() && leftItem instanceof Join) {
            buffer.append(Tokens.LPAREN);
            append(leftItem);
            buffer.append(Tokens.RPAREN);
        } else {
            append(leftItem);
        }
        buffer.append(Tokens.SPACE);
       
        switch(obj.getJoinType()) {
            case CROSS_JOIN:
                buffer.append(CROSS);
                break;
            case FULL_OUTER_JOIN:
                buffer.append(FULL)
                      .append(Tokens.SPACE)
                      .append(OUTER);
                break;
            case INNER_JOIN:
                buffer.append(INNER);
                break;
            case LEFT_OUTER_JOIN:
                buffer.append(LEFT)
                      .append(Tokens.SPACE)
                      .append(OUTER);
                break;
            case RIGHT_OUTER_JOIN:
                buffer.append(RIGHT)
                      .append(Tokens.SPACE)
                      .append(OUTER);
                break;
            default: buffer.append(UNDEFINED);
        }
        buffer.append(Tokens.SPACE)
              .append(JOIN)
              .append(Tokens.SPACE);
       
        TableReference rightItem = obj.getRightItem();
        if(rightItem instanceof Join && (useParensForJoins() || obj.getJoinType() == Join.JoinType.CROSS_JOIN)) {
            buffer.append(Tokens.LPAREN);
            append(rightItem);
            buffer.append(Tokens.RPAREN);
        } else {
View Full Code Here


      Iterator<TableReference> itr = fromList.iterator();
      if(!itr.hasNext()) {
              final String msg = LDAPPlugin.Util.getString("IQueryToLdapSearchParser.noTablesInFromError"); //$NON-NLS-1$
        throw new TranslatorException(msg);
      }
      TableReference fItm = itr.next();
      if(itr.hasNext()) {
              final String msg = LDAPPlugin.Util.getString("IQueryToLdapSearchParser.multiItemsInFromError"); //$NON-NLS-1$
        throw new TranslatorException(msg);
      }
      String contextName = getContextNameFromFromItem(fItm);
View Full Code Here

  // Has to be a left outer join
  @Override
  public void visit(Join join) {
    try {
      TableReference left = join.getLeftItem();
      if (left instanceof NamedTable) {
        NamedTable leftGroup = (NamedTable) left;
        leftTableInJoin = leftGroup.getMetadataObject();
        loadColumnMetadata(leftGroup);
      }

      TableReference right = join.getRightItem();
      if (right instanceof NamedTable) {
        NamedTable rightGroup = (NamedTable) right;
        rightTableInJoin = rightGroup.getMetadataObject();
        loadColumnMetadata((NamedTable) right);
      }
View Full Code Here

TOP

Related Classes of org.teiid.language.TableReference

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.