Examples of ResultSet


Examples of net.sourceforge.processdash.data.util.ResultSet

    @Override
    protected void writeHeader() {}

    @Override
    protected void writeContents() throws IOException {
        ResultSet resultSet = getResultSet();

        String format = getParameter(FORMAT_PARAM);
        if (FORMAT_XML.equals(format))
            writeXml(resultSet);
        else

Examples of org.adbcj.ResultSet

      // Clear out updates table
      Result result = connection.executeUpdate("DELETE FROM updates").get();
      assertNotNull(result);

      // Make sure updates is empty
      ResultSet rs = connection.executeQuery("SELECT id FROM updates").get();
      assertNotNull(rs);
      assertEquals(rs.size(), 0);

      connection.beginTransaction();

      // Insert a row
      result = connection.executeUpdate("INSERT INTO updates (id) VALUES (1)").get();
      assertNotNull(result);
      assertEquals(result.getAffectedRows(), Long.valueOf(1));

      // Make sure we can select the row
      rs = connection.executeQuery("SELECT id FROM updates").get();
      assertNotNull(rs);
      assertEquals(rs.size(), 1);
      Value value = rs.get(0).get(0);
      assertEquals(value.getInt(), 1);

      // Rollback transaction
      connection.rollback().get();

      // select query should now be empty
      rs = connection.executeQuery("SELECT id FROM updates").get();
      assertNotNull(rs);
      assertEquals(rs.size(), 0);

    } finally {
      connection.close(true);
    }
  }

Examples of org.alfresco.service.cmr.search.ResultSet

    sp.setLanguage(SearchService.LANGUAGE_LUCENE);
    String buildQuery = sc.buildQuery(3);
    sp.setQuery(buildQuery);
    sp.addStore(AlfrescoUtil.getInstance().getStoreRef());
    List<CMObject> model = new ArrayList<CMObject>();
    ResultSet rs = null;
    try {
      rs = serviceRegistry.getSearchService().query(sp);
      for (ResultSetRow row : rs) {
        NodeRef nodeRef = row.getNodeRef();
        if (serviceRegistry.getNodeService().exists(nodeRef)) {
          model.add(repositoryService.fetch(CMObject.class, nodeRef));
        }
      }
    } finally {
      if (rs != null) {
        rs.close();
      }
    }
    CollectionUtils.filter(model, new Predicate() {
      public boolean evaluate(Object object) {
        return !((CMObject) object).hasAspect(ContentModel.ASPECT_WORKING_COPY);

Examples of org.alfresco.webservice.types.ResultSet

        // execute a Lucene query against the repository
        queryResult = SearchUtils.luceneSearch(endpoint, username, password, socketTimeout, session, luceneQuery);
      }
 
      if(queryResult!=null){
        ResultSet resultSet = queryResult.getResultSet();
        ResultSetRow[] resultSetRows = resultSet.getRows();
        for (ResultSetRow resultSetRow : resultSetRows) {
            NamedValue[] properties = resultSetRow.getColumns();
            String nodeReference = PropertiesUtils.getNodeReference(properties);
            activities.addSeedDocument(nodeReference);
          }

Examples of org.apache.cassandra.cql3.ResultSet

    private ResultMessage resultMessage(List<PermissionDetails> details)
    {
        if (details.isEmpty())
            return new ResultMessage.Void();

        ResultSet result = new ResultSet(metadata);
        for (PermissionDetails pd : details)
        {
            result.addColumnValue(UTF8Type.instance.decompose(pd.username));
            result.addColumnValue(UTF8Type.instance.decompose(pd.resource.toString()));
            result.addColumnValue(UTF8Type.instance.decompose(pd.permission.toString()));
        }
        return new ResultMessage.Rows(result);
    }

Examples of org.apache.clerezza.rdf.core.sparql.ResultSet

        DC.title, new PlainLiteralImpl(titleValue)));
    String query = "SELECT ?title WHERE" +
        "{" +
        "  <http://example.org/book/book1> <"+DC.title.getUnicodeString()+"> ?title ." +
        "}";
    ResultSet resultSet = (ResultSet) TcManager.getInstance().executeSparqlQuery(
        QueryParser.getInstance().parse(query), data);
    Assert.assertEquals(titleValue,
        ((Literal)resultSet.next().get("title")).getLexicalForm());
  }

Examples of org.apache.derby.iapi.sql.ResultSet

      try
      {
                // This is a substatement; for now, we do not set any timeout
                // for it. We might change this behaviour later, by linking
                // timeout to its parent statement's timeout settings.
                ResultSet rs = ps.execute(spsActivation, false, 0L);
                if( rs.returnsRows())
                {
                    // Fetch all the data to ensure that functions in the select list or values statement will
                    // be evaluated and side effects will happen. Why else would the trigger action return
                    // rows, but for side effects?
                    // The result set was opened in ps.execute()
                    while( rs.getNextRow() != null)
                    {
                    }
                }
                rs.close();
      }
      catch (StandardException e)
      {
        /*
        ** When a trigger SPS action is executed and results in

Examples of org.apache.olio.webapp.util.geocoder.ResultSet

            return null;
       
        try {
            URL url = new URL(sb.toString());
            try {
                ResultSet rs = (ResultSet) u.unmarshal(url.openStream());
                List<ResultType> list = rs.getResult();
                // Set up the geo points
                GeoPoint[] gps = new GeoPoint[list.size()];
                int i=0;
                for (ResultType r: list) {
                    GeoPoint gp = new GeoPoint();

Examples of org.dmd.util.exceptions.ResultSet

  /**
   * Constructs a new JSON parser.
   */
  public JSONParser(){
    rsG = new ResultSet();
  }

Examples of org.jruby.pg.internal.ResultSet

    /******     PG::Connection INSTANCE METHODS: Command Execution     ******/

    @JRubyMethod(alias = {"query", "async_exec", "async_query"}, required = 1, optional = 2)
    public IRubyObject exec(ThreadContext context, IRubyObject[] args, Block block) {
        PostgresqlString query = rubyStringAsPostgresqlString(args[0]);
        ResultSet set = null;
        try {
            if (args.length == 1) {
              set = postgresqlConnection.exec(query);
            } else {

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.