Examples of executeQuery()


Examples of org.jrdf.query.client.QueryClient.executeQuery()

                fullServerNames.add(create(server.toString() + "/graph/" + graphName));
            }
            final QueryClient queryClient = new DistributedQueryClientImpl(fullServerNames, handler);
            final Map<String, String> ext = new HashMap<String, String>();
            ext.put("maxRows", Long.toString(maxRows));
            return queryClient.executeQuery(queryString, ext);
        } catch (Exception e) {
            throw new ResourceException(e);
        }
    }
View Full Code Here

Examples of org.jrdf.sparql.SparqlConnection.executeQuery()

                "SELECT ?s ?add \n" +
                "WHERE { \n" +
                "        ?s <http://example.org/terms#hasConfirmed> ?add \n" +
                "        OPTIONAL { ?add <http://www.w3.org/1999/02/22-rdf-syntax-ns#subject> ?o } \n" +
                "        FILTER ( bound(?add) && !bound(?o) ) }";
        SelectAnswer answer = (SelectAnswer) connection.executeQuery(graph, query);
        System.out.println("Query Result:\n" + answer);
        StringWriter writer = new StringWriter();
        SparqlXmlWriter answerXMLWriter = new SparqlSelectXmlWriter(writer, answer.getVariableNames(),
            answer.columnValuesIterator(), answer.numberOfTuples());
        answerXMLWriter.writeFullDocument();
View Full Code Here

Examples of org.lealone.command.Command.executeQuery()

            command.getPrepared().setFetchSize(fetchSize);
            setParameters(command);
            int old = session.getModificationId();
            ResultInterface result;
            synchronized (session) {
                result = command.executeQuery(maxRows, false);
            }
            cache.addObject(objectId, result);
            int columnCount = result.getVisibleColumnCount();
            int state = getState(old);
            transfer.writeInt(state);
View Full Code Here

Examples of org.lealone.command.CommandInterface.executeQuery()

        List<ResultInterface> results = New.arrayList(size);
        for (int i = 0; i < size; i++) {
            final CommandInterface c = commands.get(i);
            futures.add(pool.submit(new Callable<ResultInterface>() {
                public ResultInterface call() throws Exception {
                    return c.executeQuery(maxRows, scrollable);
                }
            }));
        }
        try {
            for (int i = 0; i < size; i++) {
View Full Code Here

Examples of org.lealone.command.CommandRemote.executeQuery()

            CommandRemote cr = null;
            try {
                sr = SessionRemotePool.getMasterSessionRemote(s.getOriginalProperties());
                cr = SessionRemotePool.getCommandRemote(sr, "ALTER SEQUENCE " + getSQL() + " NEXT VALUE MARGIN", null, 1);
                //cr.executeUpdate();
                ResultInterface ri = cr.executeQuery(-1, false);
                ri.next();
                valueWithMargin = ri.currentRow()[0].getLong();
                value = valueWithMargin - increment * cacheSize;
            } catch (Exception e) {
                throw DbException.convert(e);
View Full Code Here

Examples of org.ofbiz.entity.jdbc.SQLProcessor.executeQuery()

        SQLProcessor sqlP = new SQLProcessor(helperInfo);

        try {
            sqlP.prepareStatement(sqlBuffer.toString(), true, ResultSet.TYPE_FORWARD_ONLY, ResultSet.CONCUR_READ_ONLY);
            SqlJdbcUtil.setPkValues(sqlP, modelEntity, entity, modelFieldTypeReader);
            sqlP.executeQuery();

            if (sqlP.next()) {
                for (int j = 0; j < partialFields.size(); j++) {
                    ModelField curField = partialFields.get(j);
                    SqlJdbcUtil.getValue(sqlP.getResultSet(), j + 1, curField, entity, modelFieldTypeReader);
View Full Code Here

Examples of org.olap4cloud.client.OLAPEngine.executeQuery()

    cubeQuery.getAggregates().add(new CubeQueryAggregate("min(m1)"));
    cubeQuery.getAggregates().add(new CubeQueryAggregate("max(m2)"));
    cubeQuery.getAggregates().add(new CubeQueryAggregate("count(m3)"));
    cubeQuery.getGroupBy().add("d1");
    OLAPEngine olapEngine = new OLAPEngine();
    CubeQueryResult r = olapEngine.executeQuery(cubeQuery, cubeDescriptor);
    for(CubeQueryResultRow row: r.getRows()) {
      for(long l: row.getGroupBy())
        System.out.print(l + "\t");
      for(double d: row.getValues())
        System.out.print(d + "\t");
View Full Code Here

Examples of org.olap4j.PreparedOlapStatement.executeQuery()

      }
      statement.setObject(i, parameterValue);
    }

    return new QueryResultWrapper(statement, statement.executeQuery());
  }

  public String[] getParameterFields(final DataRow parameter, final String query) throws ReportDataFactoryException
  {
    try
View Full Code Here

Examples of org.openqreg.db.DbHandler.executeQuery()

public class DbHandlerTest {
    public static void main(String[] args) {
    try {
      DbHandler db = new DbHandler();
 
      ResultSet rs = db.executeQuery("select * from language");
      while (rs.next()) {       
        System.out.print(rs.getString(1));
                System.out.println(rs.getString(2));
      }
        }
View Full Code Here

Examples of org.openqreg.util.HtpasswdHandler.executeQuery()

      HtpasswdHandler hq = new HtpasswdHandler();
      hq.setPath("C:\\server\\Apache\\bin\\htpasswd.exe");
      hq.setOutputFormat(HtpasswdHandler.TRIM);
      hq.setEncryption(HtpasswdHandler.ENCRYPT_SHA);
      hq.setCheckExistence(HtpasswdHandler.CHECK);
      System.out.println(hq.executeQuery(args[0], args[1]));
      //System.out.println("ReturnCode is: "+hq.getReturnCode());
           // System.out.println("Match is: "+hq.comparePasswords(args[0],args[1],args[2]));
    }
  }
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.