Examples of ResultSet


Examples of HTTP.ResultSet

  public int doStartTag() throws JspException
  {
    this.setIterateResultSet(new IterateResultSet());

    ResultSet rs = (ResultSet) pageContext.getAttribute(getResultSet(), RESULT_SET_SCOPE);
    this.getIterateResultSet().setIndex(this.getStart());
    this.getIterateResultSet().setResultSet(rs);
    this.getIterateResultSet().setMemberName(this.getResultMember());
    pageContext.setAttribute(this.getIterator(), this.getIterateResultSet(), RESULT_SET_SCOPE);

    if (this.getEnd() <= 0 || this.getIterateResultSet().getIndex() <= this.getEnd())
    {
      if (rs != null)
      {
        if (this.getIterateResultSet().getIndex() <= rs.listItems(this.getResultMember()))
        {
          return EVAL_BODY_BUFFERED;
        }
      }
      else

Examples of at.tuwien.minireef.ResultSet

        if (sourceFormat != null && !"".equals(sourceFormat.getPuid())) {
            puid = sourceFormat.getPuid();
        }
        params.put("PUID", puid);
       
        ResultSet resultSet = MiniREEFResolver.getInstance().resolve(statement, params);
        ArrayList<PreservationActionDefinition> result = new ArrayList<PreservationActionDefinition>();

        if (resultSet == null) {
            // this should not happen if MiniREEF is properly configured
            log.error("querying miniREEF/P2 knowledge base failed for statement: " + statement);
            return result;
        }
       
        PreservationActionDefinition def;
        for (int i = 0 ; i < resultSet.size(); i++) {
            def = new PreservationActionDefinition();
            def.setShortname("Convert using " + resultSet.getRow(i).get(0)+" "+resultSet.getRow(i).get(1));
            def.setTargetFormat(resultSet.getRow(i).get(2)+" "+resultSet.getRow(i).get(3));
            def.setInfo("by "+resultSet.getRow(i).get(4));
            def.setActionIdentifier("P2");
            def.setExecutable(false);
//            if (service.getTargetFormat() != null) {
//               def.setTargetFormat(service.getTargetFormat().getDefaultExtension());
//               def.setTargetFormatInfo(service.getTargetFormat());

Examples of com.clarkparsia.empire.ds.ResultSet

      if (isConstruct()) {
        Graph aGraph = getSource().graphQuery(query());
        aList.add(aGraph);
      }
      else {
        ResultSet aResults = getSource().selectQuery(query());

                try {
                    if (getBeanClass() != null) {
                        // for now, by convention, for this to work like the JPQL stuff where you do something like
                        // "from Product pr join pr.poc as p where p.id = ?" and expect to get a list of Product instances
                        // back as the result set, you *MUST* have a var in the projection called 'result' which is
                        // the URI of the things you want to get back; when you don't do this, we prefix your partial query
                        // with this string
                        while (aResults.hasNext()) {
              BindingSet aBS = aResults.next();

                            Object aObj;

                            String aVarName = getProjectionVarName();

                            if (aBS.getValue(aVarName) instanceof URI && AnnotationChecker.isValid(getBeanClass())) {
                                if (EmpireOptions.ENABLE_QUERY_RESULT_PROXY) {
                                    aObj = new Proxy(getBeanClass(), asPrimaryKey(aBS.getValue(aVarName)), getSource());
                                }
                                else {
                                    aObj = RdfGenerator.fromRdf(getBeanClass(),
                                                                asPrimaryKey(aBS.getValue(aVarName)),
                                                                getSource());
                                }
                            }
                            else {
                                aObj = new RdfGenerator.ValueToObject(getSource(), null,
                                                                      getBeanClass(), null).apply(aBS.getValue(aVarName));
                            }

                            // if the object could not be created, or it was and its not the bean class type, or not a proxy
                            // for something of the bean class type, then we could not bind the value in the result set
                            // which is an error.
                            if (aObj == null
                                || !(getBeanClass().isInstance(aObj) || (aObj instanceof Proxy && getBeanClass().isAssignableFrom(((Proxy)aObj).getProxyClass())))) {
                                throw new PersistenceException("Cannot bind query result to bean: " + getBeanClass());
                            }
                            else {
                                aList.add(aObj);
                            }
                        }
                    }
                    else {
                        aList.addAll(Lists.newArrayList(aResults));
                    }
                }
                finally {
                    aResults.close();
                }
      }
    }
    catch (Exception e) {
      throw new PersistenceException(e);

Examples of com.datastax.driver.core.ResultSet

        AggregateNumericMetricMapper mapper = new AggregateNumericMetricMapper();

        List<AggregateNumericMetric> result = new ArrayList<AggregateNumericMetric>(pks.size());
        for (StorageResultSetFuture f : futureResults) {
            ResultSet r = f.get();

            // this should always get exactly 1 row
            if (!r.isExhausted()) {
                AggregateNumericMetric aggregate = mapper.mapOne(r);
                result.add(aggregate);
            }
        }

Examples of com.dbxml.db.core.query.ResultSet

            }
            else
               throw new CompilationException("Document '" + docName + "' not found");
         }
         else if ( hasXpath ) {
            ResultSet rs;
            if ( keys != null )
               rs = context.queryDocument(tx, XPathQueryResolver.STYLE_XPATH, xpath, nsMap, keys);
            else
               rs = context.queryCollection(tx, XPathQueryResolver.STYLE_XPATH, xpath, nsMap);

Examples of com.google.api.ads.dfp.axis.v201208.ResultSet

    List<Row> combinedRows = Lists.newArrayList(first.getRows());
    if (second.getRows() != null) {
      Collections.addAll(combinedRows, second.getRows());
    }

    ResultSet combinedResultSet = new ResultSet();
    combinedResultSet.setColumnTypes(first.getColumnTypes());
    combinedResultSet.setRows(combinedRows.toArray(new Row[] {}));
    return combinedResultSet;
  }

Examples of com.google.api.ads.dfp.axis.v201211.ResultSet

    List<Row> combinedRows = Lists.newArrayList(first.getRows());
    if (second.getRows() != null) {
      Collections.addAll(combinedRows, second.getRows());
    }

    ResultSet combinedResultSet = new ResultSet();
    combinedResultSet.setColumnTypes(first.getColumnTypes());
    combinedResultSet.setRows(combinedRows.toArray(new Row[] {}));
    return combinedResultSet;
  }

Examples of com.google.api.ads.dfp.axis.v201302.ResultSet

    List<Row> combinedRows = Lists.newArrayList(first.getRows());
    if (second.getRows() != null) {
      Collections.addAll(combinedRows, second.getRows());
    }

    ResultSet combinedResultSet = new ResultSet();
    combinedResultSet.setColumnTypes(first.getColumnTypes());
    combinedResultSet.setRows(combinedRows.toArray(new Row[] {}));
    return combinedResultSet;
  }

Examples of com.google.api.ads.dfp.axis.v201306.ResultSet

    List<Row> combinedRows = Lists.newArrayList(first.getRows());
    if (second.getRows() != null) {
      Collections.addAll(combinedRows, second.getRows());
    }

    ResultSet combinedResultSet = new ResultSet();
    combinedResultSet.setColumnTypes(first.getColumnTypes());
    combinedResultSet.setRows(combinedRows.toArray(new Row[] {}));
    return combinedResultSet;
  }

Examples of com.google.api.ads.dfp.axis.v201308.ResultSet

        .orderBy("Id ASC")
        .offset(0)
        .limit(StatementBuilder.SUGGESTED_PAGE_LIMIT);

    // Default for result sets.
    ResultSet combinedResultSet = null;
    ResultSet resultSet;
    int i = 0;

    do {
      // Get all line items.
      resultSet = pqlService.select(statementBuilder.toStatement());

      // Combine result sets with previous ones.
      combinedResultSet = combinedResultSet == null
          ? resultSet
          : Pql.combineResultSets(combinedResultSet, resultSet);

      System.out.printf("%d) %d line items beginning at offset %d were found.\n", i++,
          resultSet.getRows() == null ? 0 : resultSet.getRows().length,
          statementBuilder.getOffset());

      statementBuilder.increaseOffsetBy(StatementBuilder.SUGGESTED_PAGE_LIMIT);
    } while (resultSet.getRows() != null && resultSet.getRows().length > 0);

    // Change to your file location.
    String filePath = File.createTempFile("Line-Items-", ".csv").toString();

    // Write the result set to a CSV.
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.