Examples of prepareQuery()


Examples of edu.spbstu.hoteldb.sql.ClientSearchQuery.prepareQuery()

    SQLQuery query = new ClientSearchQuery(results, connect);
    try {
      List<Object> arg = new LinkedList<Object>();
      arg.add(((TextField) args.get(0)).getText());
      arg.add(((TextField) args.get(1)).getText());
      query.prepareQuery(arg);
      query.doQuery();
      query.close();
    } catch (SQLException e) {
      results.appendText("invalid query\n");
      e.printStackTrace();
View Full Code Here

Examples of edu.spbstu.hoteldb.sql.HistorySearchQuery.prepareQuery()

    }
   
    arg.add(from.toString()); arg.add(to.toString());
    try {
      SQLQuery query = new HistorySearchQuery(connect, results);
      query.prepareQuery(arg);
      query.doQuery();
      query.close();
    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

Examples of edu.spbstu.hoteldb.sql.IncomeCalcQuery.prepareQuery()

      return;
    }
    arg.add(from.toString()); arg.add(to.toString());
    try {
      SQLQuery query = new IncomeCalcQuery(connect, results);
      query.prepareQuery(arg);
      query.doQuery();
      query.close();
    } catch (SQLException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
View Full Code Here

Examples of edu.spbstu.hoteldb.sql.NewUserUpdate.prepareQuery()

    } else {
      SQLQuery nuu = new NewUserUpdate(connect, textArea);
      List<Object> args = new LinkedList<Object>();
      args.add(login); args.add(email); args.add(pass); args.add(name); args.add(country); args.add(lang);
      try {
        nuu.prepareQuery(args);
        nuu.doQuery();
        main.setPanel(PanelType.LoginPanel, null);       
      } catch (SQLException e) {
        e.printStackTrace();
      }
View Full Code Here

Examples of edu.spbstu.hoteldb.sql.PersonnelSearchQuery.prepareQuery()

    List<Object> arg = new LinkedList<Object>();
    arg.add(((TextField) args.get(0)).getText());
    arg.add(((TextField) args.get(1)).getText());
    try {
      SQLQuery query = new PersonnelSearchQuery(results, connect);
      query.prepareQuery(arg);
      query.doQuery();
      query.close();
    } catch (SQLException e) {
      results.appendText("invalid query\n");
      e.printStackTrace();
View Full Code Here

Examples of edu.spbstu.hoteldb.sql.SearchRoomQuery.prepareQuery()

    args.addLast(cost);
    args.addLast(new Boolean(chckbxdesc.isSelected()));
    args.addLast(chbbar.getValue());

    try {
      query.prepareQuery(args);
      query.doQuery();
      query.close();
    } catch (SQLException e) {
      results.appendText(e.getMessage() + '\n');
      e.printStackTrace();
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.prepareQuery()

    QueryLanguage queryLn = getQueryLanguage(params, response);
    String baseURI = params.getFirstValue(BASEURI_PARAM_NAME);

    try {
      RepositoryConnection connection = RequestAtt.getConnection(request);
      Query query = connection.prepareQuery(queryLn, queryStr, baseURI);
      parseQueryParameters(query, params, connection.getValueFactory());
      return query;
    }
    catch (StoreException e) {
      throw new ResourceException(SERVER_ERROR_INTERNAL, "Failed to prepare query", e);
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.prepareQuery()

    throws Exception
  {
    RepositoryConnection con = dataRep.getConnection();
    try {
      String queryString = readQueryString();
      Query query = con.prepareQuery(QueryLanguage.SPARQL, queryString, queryFileURL);
      if (dataset != null) {
        query.setDataset(dataset);
      }

      if (query instanceof TupleQuery) {
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.prepareQuery()

    RepositoryConnection conn = null;
    String query = request.getParameter("query");
   
    try {
      conn = dataRepository.getConnection();
      Query q = conn.prepareQuery(QueryLanguage.SPARQL, query);
     
      if (q instanceof TupleQuery) {
        /* <code>SELECT</code> form */
        response.setContentType("application/sparql-results+xml");
        SPARQLResultsXMLWriter sparqlWriter = new SPARQLResultsXMLWriter(outputStream);
View Full Code Here

Examples of org.openrdf.repository.RepositoryConnection.prepareQuery()

        assertTrue(connection.size() > 0);

        int count = connection.getStatements(null, null, null, false).asList().size();
        assertTrue(count > 0);

        BooleanQuery sparqlQuery = (BooleanQuery)connection.prepareQuery(QueryLanguage.SPARQL, IOUtils.toString(sparql).replaceAll("http://rdfa.digitalbazaar.com/test-suite/test-cases/xhtml1/rdfa1.1/","http://localhost/rdfa/"));
        assertTrue("SPARQL query evaluation for "+fileName+" failed",sparqlQuery.evaluate());

        connection.close();
        repository.shutDown();
    }
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.