Package org.apache.metamodel.data

Examples of org.apache.metamodel.data.MaxRowsDataSet


        }

        DataSet dataSet = ExcelUtils.getDataSet(wb, sheet, table, _configuration);

        if (maxRows > 0) {
            dataSet = new MaxRowsDataSet(dataSet, maxRows);
        }
        return dataSet;
    }
View Full Code Here


        if (firstRow > 1) {
            dataSet = new FirstRowDataSet(dataSet, firstRow);
        }
        if (maxRows != -1) {
            dataSet = new MaxRowsDataSet(dataSet, maxRows);
        }
        return dataSet;
    }
View Full Code Here

        DataSet selectionDataSet = MetaModelHelper.getSelection(selectItems, dataSet);
        dataSet = selectionDataSet;

        // Handle maxRows
        if (maxRows != -1) {
            dataSet = new MaxRowsDataSet(dataSet, maxRows);
        }
        return dataSet;
    }
View Full Code Here

        @SuppressWarnings({ "rawtypes", "unchecked" })
        DataSet dataSet = new PojoDataSet(pojoTable, selectItems);

        if (maxRows > 0) {
            dataSet = new MaxRowsDataSet(dataSet, maxRows);
        }

        return dataSet;
    }
View Full Code Here

            } else {
                dataSet = new JdbcDataSet(compiledQuery, lease, resultSet);
            }

            if (postProcessMaxRows) {
                dataSet = new MaxRowsDataSet(dataSet, maxRows);
            }
        } catch (SQLException exception) {
            if (resultSet != null) {
                resultSet.close();
            }
View Full Code Here

  public void testInterceptDataSet() throws Exception {
    DataContext dc = new InterceptableDataContext(delegateDataContext)
        .addDataSetInterceptor(new DataSetInterceptor() {
          @Override
          public DataSet intercept(DataSet dataSet) {
            return new MaxRowsDataSet(dataSet, 1);
          }
        });

    DataSet ds = dc.query().from(table).select("foo").execute();
    assertEquals(MaxRowsDataSet.class, ds.getClass());
View Full Code Here

        final SugarCrmDataSet dataSet = new SugarCrmDataSet(columns, _service, session, entryList);
       
        if (maxRows > 0) {
            // sugar's responses are a bit weird to interpret regarding total count, so we apply a MaxRowsDataSet wrapper.
            return new MaxRowsDataSet(dataSet, maxRows);
        }
       
        return dataSet;
    }
View Full Code Here

        final DocumentSource documentSource = getDocumentSourceForTable(table.getName());

        DataSet dataSet = new DocumentSourceDataSet(header, documentSource, documentConverter);

        if (maxRows > 0) {
            dataSet = new MaxRowsDataSet(dataSet, maxRows);
        }

        return dataSet;
    }
View Full Code Here

            } else {
                dataSet = new JdbcDataSet(compiledQuery, lease, resultSet);
            }

            if (postProcessMaxRows) {
                dataSet = new MaxRowsDataSet(dataSet, maxRows);
            }
        } catch (SQLException exception) {
            if (resultSet != null) {
                resultSet.close();
            }
View Full Code Here

        }

        DataSet dataSet = ExcelUtils.getDataSet(wb, sheet, table, _configuration);

        if (maxRows > 0) {
            dataSet = new MaxRowsDataSet(dataSet, maxRows);
        }
        return dataSet;
    }
View Full Code Here

TOP

Related Classes of org.apache.metamodel.data.MaxRowsDataSet

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.