Package org.teiid.query.sql.symbol

Examples of org.teiid.query.sql.symbol.Expression.clone()


      List thisSymbols = getSymbols();
      List copySymbols = new ArrayList(thisSymbols.size());
      Iterator iter = thisSymbols.iterator();
      while(iter.hasNext()) {
        Expression es = (Expression) iter.next();
        copySymbols.add(es.clone());
      }

    return new GroupBy(copySymbols);
  }
View Full Code Here


      if (element instanceof Reference) {
        Reference r = (Reference)element;
        Expression ex = refs.getMappedExpression(r.getExpression());
        if (ex != null) {
          if (ex instanceof ElementSymbol) {
            ElementSymbol es = (ElementSymbol) ex.clone();
            es.setIsExternalReference(false);
            ex = es;
          }
          replacedAny = true;
          return ex;
View Full Code Here

   
    public Expression replaceExpression(Expression element) {
        Expression mapped = (Expression) this.symbolMap.get(element);
        if(mapped != null) {
          if (clone) {
            return (Expression)mapped.clone();
          }
          return mapped;
        }
        return element;   
    }
View Full Code Here

    Expression  actual = QueryParser.getQueryParser().parseExpression(sql);
    String actualString = actual.toString();

    assertEquals("Parse string does not match: ", expectedString, actualString); //$NON-NLS-1$
    assertEquals("Command objects do not match: ", expected, actual);         //$NON-NLS-1$
    assertEquals("Cloned command objects do not match: ", expected, actual.clone());         //$NON-NLS-1$
  }

    static void helpException(String sql) {
        helpException(sql, null);
    }
View Full Code Here

TOP
Copyright © 2018 www.massapi.com. 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.