Package java.util

Examples of java.util.ArrayList$ArrayListIterator


    @Test public void testMergeJoinOptimizationWithDistinctAlreadySorted() throws Exception {
        this.joinType = JoinType.JOIN_INNER;
        int rows = 50;
        List[] data = new List[rows];
        for(int i=0; i<rows; i++) {
            data[i] = new ArrayList();
            Integer value = new Integer((i*17) % 47);
            data[i].add(value);
        }
        this.leftTuples = data;
        this.rightTuples = new List[] {
View Full Code Here


    @Test
    public void testMultipleSourceBulkRowInsert() throws Exception {

 
        AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceBulkRowInsert") {
            ArrayList list = new ArrayList();
            public void testCase() throws Exception {
                for (int i = 800; i < 807; i++) {
                    list.add("insert into pm1.g1 (e1, e2) values("+i+",'"+i+"')");
                    list.add("insert into pm2.g1 (e1, e2) values("+i+",'"+i+"')");
                }
                list.add("select pm1.g1.e1, pm1.g1.e2 into pm2.g2 from pm1.g1 where pm1.g1.e1 >= 800");
               
                // force the rollback by trying to insert an invalid row.
                list.add("insert into pm1.g2 (e1, e2) values(9999,'9999')");            

//               execute((String[])list.toArray(new String[list.size()]));
                executeBatch((String[])list.toArray(new String[list.size()]), -1);
            }
           
            public boolean exceptionExpected() {
                return true;
            }           
View Full Code Here

     
    }   
   
       
    static String[] getMultipleSourceBatch() {
        ArrayList list = new ArrayList();
       
        for (int i = 600; i < 750; i++) {
            list.add("insert into pm1.g1 (e1, e2) values("+i+",'"+i+"')");
            list.add("insert into pm1.g2 (e1, e2) values ("+i+",'"+i+"')");
            list.add("insert into pm2.g1 (e1, e2) values("+i+",'"+i+"')");
            list.add("insert into pm2.g2 (e1, e2) values ("+i+",'"+i+"')");                               
        }
       
        list.add("update pm1.g1 set e2='blah' where pm1.g1.e1 >= 600");
        list.add("update pm2.g1 set e2='blah' where pm2.g1.e1 >= 600");
       
        list.add("delete from pm1.g2 where pm1.g2.e1 >= 610");
        list.add("delete from pm1.g1 where pm1.g1.e1 >= 610");
        list.add("delete from pm2.g2 where pm2.g2.e1 >= 610");
        list.add("delete from pm2.g1 where pm2.g1.e1 >= 610");
       
        return(String[])list.toArray(new String[list.size()]);
    }
View Full Code Here

     * is not supported.
     */
    public void testSupportsFunctionInGroupBy() throws Exception {
        Function f = new Function("concat", new Expression[] { new Constant("a"), new Constant("b") }); //$NON-NLS-1$ //$NON-NLS-2$ //$NON-NLS-3$
        ExpressionSymbol expr = new ExpressionSymbol("e", f); //$NON-NLS-1$
        List cols = new ArrayList();
        cols.add(expr);
        helpTestSupportsAggregates(false, false, cols);
    }
View Full Code Here

     
      Collection copyValues = null;
      if (isAllConstants()) {
        copyValues = new LinkedHashSet(values);
      } else {
        copyValues = LanguageObject.Util.deepClone(new ArrayList(values), Expression.class);
      }
     
        SetCriteria criteriaCopy = new SetCriteria(copy, copyValues);
        criteriaCopy.setNegated(isNegated());
        criteriaCopy.allConstants = allConstants;
View Full Code Here

                    }
                } catch (XMLStreamException e) {
                    synLog.error("Source Property cannot be parsed : " + e.getStackTrace().toString());
                }
            } else if (o instanceof ArrayList) {
                ArrayList nodesList = (ArrayList) o;
                for (Object node : nodesList) {
                    if (node instanceof OMElement) {
                        if (node instanceof SOAPEnvelope) {
                            SOAPEnvelope soapEnvelope = (SOAPEnvelope) node;
                            String soapNamespace = null;
View Full Code Here


  /** Default Constructor. */
  public SearchVO()
  {
    searchCriteria = new ArrayList();
  } //end of SearchVO constructor
View Full Code Here

   */
  public Collection getSearchCriteria()
  {
    if (this.searchCriteria == null)
    {
      this.searchCriteria = new ArrayList();
    } //end of if statement (this.searchCriteria == null)
    return this.searchCriteria;
  } //end of getSearchCriteria method
View Full Code Here

   */
  public void addSearchCriteria(SearchCriteriaVO searchCriteriaVO)
  {
    if (this.searchCriteria == null)
    {
      this.searchCriteria = new ArrayList();
    } //end of if statement (this.searchCriteria == null)
    this.searchCriteria.add(searchCriteriaVO);
  } //end of addSearchCriteria method
View Full Code Here

   *
   * @return An Integer Array of unique Group IDs.
   */
  public Integer[] getGroupIDs()
  {
    Collection groupIDs = new ArrayList();
    if (this.searchCriteria != null)
    {
      Iterator it = this.searchCriteria.iterator();
      while (it.hasNext())
      {
        SearchCriteriaVO searchCriteriaVO = (SearchCriteriaVO) it.next();
        if (!groupIDs.contains(new Integer(searchCriteriaVO.getGroupID())))
        {
          groupIDs.add(new Integer(searchCriteriaVO.getGroupID()));
        } //end of if statement (!groupIDs.contains(...
      } //end of while loop (iterator.hasNext())
    } //end of if statement (this.searchCriteria != null)
    return (Integer[]) groupIDs.toArray(new Integer[groupIDs.size()]);
  } //end of getGroupIDs method
View Full Code Here

TOP

Related Classes of java.util.ArrayList$ArrayListIterator

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.