Package org.eobjects.metamodel.data

Examples of org.eobjects.metamodel.data.DataSet


      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);

      TransformedInputRow resultRow;
      if (inputRow instanceof TransformedInputRow) {
        // re-use existing transformed input 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

    _pageSize = pageSize;
    _title = "DataSet: " + _query.toSql();
    _tableModelCallable = new Callable<TableModel>() {
      @Override
      public TableModel call() throws Exception {
        DataSet dataSet = dataContext.executeQuery(_query);
        return dataSet.toTableModel();
      }
    };
    _previousPageButton = WidgetFactory.createButton("Previous page", "images/actions/back.png");
    _previousPageButton.setEnabled(false);
    _nextPageButton = WidgetFactory.createButton("Next page", "images/actions/forward.png");
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();

        licensedProject.name = row.getValue(projectColumn).toString();
        licensedProject.websiteUrl = row.getValue(websiteColumn).toString();
        licensedProject.license = getLicense(licenseName);
View Full Code Here

      }

      @Override
      protected void done() {
        try {
          DataSet dataSet = get();
          if (dataSet != null) {
            _previewTable.setModel(dataSet.toTableModel());
          }
        } catch (Throwable e) {
          if (e instanceof ExecutionException) {
            // get the cause of the execution exception (it's a
            // wrapper around the throwable)
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

Related Classes of org.eobjects.metamodel.data.DataSet

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.