Examples of TableData


Examples of com.hp.hpl.jena.sparql.algebra.table.TableData

    { setValuesDataBlock(variables, values) ; }
   
    public void setValuesDataBlock(List<Var> variables, List<Binding> values)
    {
        checkDataBlock(variables, values) ;
        valuesDataBlock = new TableData(variables, values) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.table.TableData

    {
    }

    public Table getTable()
    {
        return new TableData(vars, rows) ;
    }
View Full Code Here

Examples of com.hp.hpl.jena.sparql.algebra.table.TableData

    public List<Binding> getValuesData()      { return valuesDataBlock==null ? null : valuesDataBlock.getRows() ; }

    public void setValuesDataBlock(List<Var> variables, List<Binding> values)
    {
        checkDataBlock(variables, values) ;
        valuesDataBlock = new TableData(variables, values) ;
    }
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.TableData

    try {
      OmniDTO returnTO = getSqlService().execute(inputs,
          DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, sql);

      if (returnTO != null) {
        TableData rt = returnTO.getTableData(sql);
        if (rt != null) {
          int records = rt.getTableSize();
          if (records > 0) {
            list = new ArrayList<ActiveRecord>();
            for (int i = 0; i < records; i++) {
              ActiveRecord newRecord = (ActiveRecord) createNewInstance();
              newRecord.populateDataFromDatabase(rt.getRow(i));
              list.add(newRecord);
            }
           
            if (modelCacheClient.useCache("findAllBySQL")) {
              modelCacheClient.getCache().put(cacheKey, list);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.TableData

    try {
      OmniDTO returnTO = getSqlService().execute(inputs,
          DataProcessorTypes.NAMED_SQL_STATEMENT_PROCESSOR, sqlKey);

      if (returnTO != null) {
        TableData rt = returnTO.getTableData(sqlKey);
        if (rt != null) {
          int records = rt.getTableSize();
          if (records > 0) {
            list = new ArrayList<ActiveRecord>();
            for (int i = 0; i < records; i++) {
              ActiveRecord newRecord = (ActiveRecord) createNewInstance();
              newRecord.populateDataFromDatabase(rt.getRow(i));
              list.add(newRecord);
            }
           
            if (modelCacheClient.useCache("findAllBySQLKey")) {
              modelCacheClient.getCache().put(cacheKey, list);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.TableData

        cacheKey = modelCacheClient.getCacheKey("findAll", findSQL, inputs, limit, offset);
        list = (List<ActiveRecord>) modelCacheClient.getCache().get(cacheKey);
        if (list != null) return list;
      }

      TableData td = getSqlService().retrieveRows(inputs,
          DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, findSQL,
          limit, offset);

      if (td != null) {
        int records = td.getTableSize();
        if (records > 0) {
          list = new ArrayList<ActiveRecord>();
          for (int i = 0; i < records; i++) {
            ActiveRecord newRecord = (ActiveRecord) createNewInstance();
            newRecord.populateDataFromDatabase(td.getRow(i));
            list.add(newRecord);
          }
         
          if (modelCacheClient.useCache("findAll")) {
            modelCacheClient.getCache().put(cacheKey, list);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.TableData

        cacheKey = modelCacheClient.getCacheKey("findAll", findSQL, inputs, limit, offset);
        list = (List<ActiveRecord>) modelCacheClient.getCache().get(cacheKey);
        if (list != null) return list;
      }

      TableData td = getSqlService().retrieveRows(inputs,
          DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, findSQL,
          limit, offset);

      if (td != null) {
        int records = td.getTableSize();
        if (records > 0) {
          list = new ArrayList<ActiveRecord>();
          for (int i = 0; i < records; i++) {
            ActiveRecord newRecord = (ActiveRecord) createNewInstance();
            newRecord.populateDataFromDatabase(td.getRow(i));
            list.add(newRecord);
          }
         
          if (modelCacheClient.useCache("findAll")) {
            modelCacheClient.getCache().put(cacheKey, list);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.TableData

        cacheKey = modelCacheClient.getCacheKey("findAll", findSQL, inputs, limit, offset);
        list = (List<ActiveRecord>) modelCacheClient.getCache().get(cacheKey);
        if (list != null) return list;
      }

      TableData td = getSqlService().retrieveRows(inputs,
          DataProcessorTypes.DIRECT_SQL_STATEMENT_PROCESSOR, findSQL,
          limit, offset);

      if (td != null) {
        list = sqlHelper.organizeData(td);
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.TableData

public class SqlServiceClientTest extends ScooterTestHelper {
 
  @Test
  public void test_retrieveTableDataBySQL() {
    String sql = "SELECT * FROM pets ORDER BY birth_date DESC";
    TableData td = SqlServiceClient.retrieveTableDataBySQL(sql);
    assertEquals("total vets", 13, td.getTableSize());
   
    RowData rd1 = td.getFirstRow();
    assertEquals("first row pet name", "Basil", rd1.getField("name"));
  }
View Full Code Here

Examples of com.scooterframework.orm.sqldataexpress.object.TableData

  @Test
  public void test_retrieveTableDataBySQL_inputs() {
    String sql = "SELECT * FROM pets WHERE name = ?name ORDER BY birth_date DESC";
    Map<String, Object> inputs = new HashMap<String, Object>();
    inputs.put("name", "Max");
    TableData td = SqlServiceClient.retrieveTableDataBySQL(sql, inputs);
    assertEquals("total vets", 1, td.getTableSize());
   
    RowData rd1 = td.getFirstRow();
    assertEquals("first row pet id", "8", rd1.getField("id").toString());
  }
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.