Package org.teiid.query.sql.symbol

Examples of org.teiid.query.sql.symbol.SingleElementSymbol


    private void replaceSymbols(List symbols, boolean alias) {
        for (int i = 0; i < symbols.size(); i++) {
            Object symbol = symbols.get(i);
           
            if (symbol instanceof SingleElementSymbol) {
                SingleElementSymbol ses = (SingleElementSymbol)symbol;
                SingleElementSymbol replacmentSymbol = replaceSymbol(ses, alias);
               
                symbols.set(i, replacmentSymbol);
            }
        }
    }
View Full Code Here


        }
    }

  private SingleElementSymbol replaceSymbol(SingleElementSymbol ses,
      boolean alias) {
    SingleElementSymbol replacmentSymbol = null;

    Expression expr = ses;
    if (ses instanceof ExpressionSymbol && !(ses instanceof AggregateSymbol)) {
        expr = ((ExpressionSymbol)ses).getExpression();
    }
   
    Expression replacement = replaceExpression(expr);
   
    if (replacement instanceof SingleElementSymbol) {
        replacmentSymbol = (SingleElementSymbol)replacement;
    } else {
        replacmentSymbol = new ExpressionSymbol(ses.getShortName(), replacement);
    }
   
    if (alias && createAliases() && !replacmentSymbol.getShortCanonicalName().equals(ses.getShortCanonicalName())) {
        replacmentSymbol = new AliasSymbol(ses.getShortName(), replacmentSymbol);
    }
    return replacmentSymbol;
  }
View Full Code Here

TOP

Related Classes of org.teiid.query.sql.symbol.SingleElementSymbol

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.