Package org.eobjects.metamodel

Examples of org.eobjects.metamodel.DataContext.executeQuery()


      List<MutableInputColumn<?>> cols = tjb.getOutputColumns();
      outputColumns.put(tjb, cols);
    }

    final List<InputRow> result = new ArrayList<InputRow>();
    final DataSet dataSet = dc.executeQuery(q);
    int rowNumber = 0;
    while (dataSet.next()) {
      Row row = dataSet.getRow();
      InputRow inputRow = new MetaModelInputRow(rowNumber, row);
View Full Code Here


    writer.close();
   
    DataContext dc = DataContextFactory.createCsvDataContext(new File(filename));
    Table table = dc.getDefaultSchema().getTables()[0];
    Query q = dc.query().from(table).select(table.getColumns()).toQuery();
    DataSet dataSet = dc.executeQuery(q);
   
    scenarioHelper.performAssertions(dataSet, false);
  }
}
View Full Code Here

        DataContextProvider dcp = datastore.getDataContextProvider();
        DataContext dc = dcp.getDataContext();

        Table table = dc.getDefaultSchema().getTables()[0];
        Query q = dc.query().from(table).select(table.getColumns()).toQuery();
        DataSet dataSet = dc.executeQuery(q);

        scenarioHelper.performAssertions(dataSet, true);

        dcp.close();
      }
View Full Code Here

      Table table = dc.getDefaultSchema().getTables()[0];
      Column projectColumn = table.getColumnByName("Project");
      Column websiteColumn = table.getColumnByName("Website");
      Column licenseColumn = table.getColumnByName("License");
      Query q = dc.query().from(table).select(table.getColumns()).orderBy(projectColumn).asc().toQuery();
      DataSet ds = dc.executeQuery(q);
      while (ds.next()) {
        final LicensedProject licensedProject = new LicensedProject();
        final Row row = ds.getRow();
        final String licenseName = row.getValue(licenseColumn).toString();
View Full Code Here

      columns = Arrays.copyOf(columns, getPreviewColumns());
    }
    Query q = dc.query().from(table).select(columns).toQuery();
    q.setMaxRows(7);

    DataSet dataSet = dc.executeQuery(q);

    dcp.close();

    return dataSet;
  }
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.