Examples of clone()


Examples of org.teiid.query.sql.lang.CompoundCriteria.clone()

        CompareCriteria ccrit1 = new CompareCriteria(e1, CompareCriteria.EQ, new Constant("abc")); //$NON-NLS-1$
        ElementSymbol e2 = new ElementSymbol("e2"); //$NON-NLS-1$
        CompareCriteria ccrit2 = new CompareCriteria(e2, CompareCriteria.EQ, new Constant("xyz")); //$NON-NLS-1$
        CompoundCriteria comp = new CompoundCriteria(CompoundCriteria.AND, ccrit1, ccrit2);
       
        UnitTestUtil.helpTestEquivalence(0, comp, comp.clone());       
    }
   
    public void testClone2() {
        ElementSymbol e1 = new ElementSymbol("e1"); //$NON-NLS-1$
        CompareCriteria ccrit1 = new CompareCriteria(e1, CompareCriteria.EQ, new Constant("abc")); //$NON-NLS-1$
View Full Code Here

Examples of org.teiid.query.sql.lang.Criteria.clone()

               
                if (joinCriteria == null) {
                    joinCriteria = QueryRewriter.TRUE_CRITERIA;
                }
               
                joinCriteria = (Criteria)joinCriteria.clone();
               
                //update the from clause
                FromClause clause = (FromClause)currentQuery.getFrom().getClauses().remove(0);
               
                JoinPredicate join = null;
View Full Code Here

Examples of org.teiid.query.sql.lang.DependentSetCriteria.clone()

   
    public void testEquivalence() {
        DependentSetCriteria dsc = example();
       
        UnitTestUtil.helpTestEquivalence(0, dsc, dsc);           
        UnitTestUtil.helpTestEquivalence(0, dsc, dsc.clone());           
    }
   
    public void testEquivalence1() {
        DependentSetCriteria dsc = example();
        DependentSetCriteria dsc1 = example();
View Full Code Here

Examples of org.teiid.query.sql.lang.DynamicCommand.clone()

        sqlCmd.setAsColumns(symbols);
        sqlCmd.setAsClauseSet(true);
       
        sqlCmd.setIntoGroup(new GroupSymbol("#g")); //$NON-NLS-1$
       
        UnitTestUtil.helpTestEquivalence(0, sqlCmd, sqlCmd.clone());       
    }
   
    public void testClone2() {
      List symbols = new ArrayList();
View Full Code Here

Examples of org.teiid.query.sql.lang.Query.clone()

            if (planEnv.isStagingTable(group.getMetadataID()) && stagableQuery.getCriteria() == null) {
                return false;
            }
        }
       
        stagableQuery = (Query)stagableQuery.clone();
               
        // stage the transformation query and it is successful
        String stagingGroupName = planEnv.getStagedResultName(groupName);        
        if (!XMLQueryPlanner.planStagaingQuery(true, groupName, stagingGroupName, stagableQuery, planEnv)) {
            return false;
View Full Code Here

Examples of org.teiid.query.sql.lang.SetQuery.clone()

    @Test public void testUnionQueryClone() throws Exception{
        SetQuery command = (SetQuery)helpResolve("SELECT e2, e3 FROM pm1.g1 UNION SELECT e3, e2 from pm1.g1"); //$NON-NLS-1$
       
        assertEquals(DataTypeManager.DefaultDataClasses.INTEGER, ((SingleElementSymbol)command.getProjectedSymbols().get(1)).getType());
       
        command = (SetQuery)command.clone();
       
        assertEquals(DataTypeManager.DefaultDataClasses.INTEGER, ((SingleElementSymbol)command.getProjectedSymbols().get(1)).getType());
    }
   
    @Test public void testSelectIntoNoFrom() {
View Full Code Here

Examples of org.teiid.query.sql.lang.SubqueryFromClause.clone()

        UnitTestUtil.helpTestEquivalence(equals, s1, s2);
    }
   
    public void testClone() {
        SubqueryFromClause s1 = example1();
        Object clonedS1 = s1.clone();
        assertEquals(s1, clonedS1);
    }
}
View Full Code Here

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

    }

    public void testEquals() {
        CaseExpression sc1 = example(3);
        assertTrue(sc1.equals(sc1));
        assertTrue(sc1.equals(sc1.clone()));
        assertTrue(sc1.clone().equals(sc1));
        assertTrue(sc1.equals(example(3)));
       
        CaseExpression sc2 = example(4);
       
View Full Code Here

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

            ElementSymbol varSymbol = varIter.next().clone();
           
            varSymbol.getGroupSymbol().setName(ProcedureReservedWords.CHANGING);
            result.put(varSymbol, new Constant(Boolean.TRUE));
            if (!changingOnly) {
              varSymbol = varSymbol.clone();
              varSymbol.getGroupSymbol().setName(ProcedureReservedWords.INPUTS);
              result.put(varSymbol, (Expression)valIter.next());
            }
        }
       
View Full Code Here

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
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.