Examples of ArrayList


Examples of java.util.ArrayList

    /**
     * Constructs a default instance of this class.
     */
    public GroupBy() {
        symbols = new ArrayList();
    }
View Full Code Here

Examples of java.util.ArrayList

    /**
     * Constructs an instance of this class from an ordered set of symbols.
     * @param symbols The ordered list of {@link org.teiid.query.sql.symbol.ElementSymbol}s
     */
    public GroupBy( List symbols ) {
        this.symbols = new ArrayList( symbols );
    }
View Full Code Here

Examples of java.util.ArrayList

    public void replaceSymbols( Collection symbols ) {
    if(symbols == null) {
            throw new IllegalArgumentException(QueryPlugin.Util.getString("ERR.015.010.0003")); //$NON-NLS-1$
    }

    this.symbols = new ArrayList(symbols);
    }
View Full Code Here

Examples of java.util.ArrayList

   * Return a deep copy of this object
   * @return Deep copy of object
   */
  public Object 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

Examples of java.util.ArrayList

    if (refill)
  selectAndFillCard();
}

protected void doSave() {
    ArrayList defaultValues = new ArrayList();
    int type = typeFromWidgets();
    int arity = arityFromWidgets();

    // Create list of new default values.
    switch (arity) {
    case Parameter.ARITY_ONE:
  switch (type) {
  case Parameter.TYPE_BOOLEAN:
      defaultValues.add(Boolean.valueOf(boolYesRButton.isSelected()));
  case Parameter.TYPE_DATE:
      break;
  default:
      defaultValues.add(singleField.getText());
      break;
  }
  break;
    case Parameter.ARITY_RANGE:
  defaultValues.add(rangeFromField.getText());
  defaultValues.add(rangeToField.getText());
  break;
    case Parameter.ARITY_LIST_SINGLE:
    case Parameter.ARITY_LIST_MULTIPLE:
  DefaultListModel model = (DefaultListModel)list.getModel();
  for (Enumeration e = model.elements(); e.hasMoreElements(); )
      defaultValues.add(e.nextElement());
  break;
    }

    ParamEditCommand cmd =
  new ParamEditCommand(param, nameField.getText(),
View Full Code Here

Examples of java.util.ArrayList

     */
    @Test
    public void testSingleSourceBatchCommandReferentialIntegrityRollback() throws Exception {
        AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testSingleSourceBatchCommandReferentialIntegrityRollback") {
            public void testCase() throws Exception {
                ArrayList list = new ArrayList();
                for (int i = 200; i < 210; i++) {
                    list.add("insert into pm1.g1 (e1, e2) values("+i+",'"+i+"')");
                }
               
                // try to rollback, since we are in single batch it must rollback
                list.add("insert into pm1.g2 (e1, e2) values(9999,'9999')");
                executeBatch((String[])list.toArray(new String[list.size()]));
            }
           
            public boolean exceptionExpected() {
                return true;
            }           
View Full Code Here

Examples of java.util.ArrayList

        MappingDocument doc = new MappingDocument(false);
       
        MappingElement root = doc.addChildElement(new MappingElement("root")); //$NON-NLS-1$
       
        List stagingTables = new ArrayList(1);
        stagingTables.add("tm1.stagingTable2"); //$NON-NLS-1$
        root.setStagingTables(stagingTables);

       
        // Create virtual documents
        // DOC 1
View Full Code Here

Examples of java.util.ArrayList

     * result = commit
     */
    @Test
    public void testMultipleSourceBulkRowInsertRollback() throws Exception {
        AbstractQueryTransactionTest userTxn = new AbstractQueryTransactionTest("testMultipleSourceBulkRowInsertRollback") {
            ArrayList list = new ArrayList();
            public void testCase() throws Exception {
                for (int i = 100; i < 120; i++) {
                    list.add("insert into vm.g1 (pm1e1, pm1e2, pm2e1, pm2e2) values("+i+",'"+i+"',"+i+",'"+i+"')");
                }
                list.add("select pm1.g1.e1, pm1.g1.e2 into pm2.g2 from pm1.g1 where pm1.g1.e1 >= 100");
               
                // force the rollback by trying to insert an invalid row.
                list.add("insert into pm1.g2 (e1, e2) values(9999,'9999')");
               
                executeBatch((String[])list.toArray(new String[list.size()]));
            }
           
            public boolean exceptionExpected() {
                return true;
            }           
View Full Code Here

Examples of java.util.ArrayList

    }

    
    // Helper to create a list of elements - used in creating sample data
    private static List createElements(List elementIDs) {
        List elements = new ArrayList();
        for(int i=0; i<elementIDs.size(); i++) {
            FakeMetadataObject elementID = (FakeMetadataObject) elementIDs.get(i);           
            ElementSymbol element = new ElementSymbol(elementID.getName());
            elements.add(element);
        }       
       
        return elements;
    }   
View Full Code Here

Examples of java.util.ArrayList

        es1.setType(DataTypeManager.DefaultDataClasses.INTEGER);

        ElementSymbol es2 = new ElementSymbol("e2"); //$NON-NLS-1$
        es2.setType(DataTypeManager.DefaultDataClasses.STRING);
       
        List elements = new ArrayList();
        elements.add(es1);
        elements.add(es2);
       
        List[] data = new List[0];
       
        List projectElements = new ArrayList();
        projectElements.add(es1);
        projectElements.add(es2);
       
        helpTestProject(elements, data, projectElements, data, 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.