Examples of parseQuery()


Examples of org.hibernate.hql.QueryParser.parseQuery()

      }

      SearchFactoryIntegrator searchFactory = (SearchFactoryIntegrator) searchManager.getSearchFactory();
      LuceneProcessingChain processingChain = new LuceneProcessingChain.Builder(searchFactory, entityNamesResolver).buildProcessingChainForClassBasedEntities();
      QueryParser queryParser = new QueryParser();
      LuceneQueryParsingResult parsingResult = queryParser.parseQuery(jpqlString, processingChain);

      Sort sort = null;
      if (sortCriteria != null && !sortCriteria.isEmpty()) {
         SortField[] sortField = new SortField[sortCriteria.size()];
         int i = 0;
View Full Code Here

Examples of org.hibernate.hql.QueryParser.parseQuery()

  @Override
  public QueryParsingResult parseQuery(SessionFactoryImplementor sessionFactory, String queryString) {
    QueryParser queryParser = new QueryParser();
    Neo4jProcessingChain processingChain = createProcessingChain( sessionFactory );
    Neo4jQueryParsingResult result = queryParser.parseQuery( queryString, processingChain );

    log.createdQuery( queryString, result );

    return result;
  }
View Full Code Here

Examples of org.hibernate.hql.QueryParser.parseQuery()

  public void shouldRaiseExceptionDueToUnconsumedTokens() {
    expectedException.expect( ParsingException.class );
    expectedException.expectMessage( "HQLPARSER000006" );

    QueryParser queryParser = new QueryParser();
    queryParser.parseQuery( "FROM IndexedEntity u WHERE u.name = 'John' blah blah blah", new NoOpProcessingChain() );
  }

  private static class NoOpProcessingChain implements AstProcessingChain<Void> {

    @Override
View Full Code Here

Examples of org.jboss.dna.graph.query.parse.QueryParser.parseQuery()

            return new JcrSearch(this.session, expression, parser.getLanguage(), storedAtPath);
        }
        TypeSystem typeSystem = session.executionContext.getValueFactories().getTypeSystem();
        try {
            // Parsing must be done now ...
            QueryCommand command = parser.parseQuery(expression, typeSystem);
            if (command == null) {
                // The query is not well-formed and cannot be parsed ...
                throw new InvalidQueryException(JcrI18n.queryCannotBeParsedUsingLanguage.text(language, expression));
            }
            PlanHints hints = new PlanHints();
View Full Code Here

Examples of org.jboss.dna.graph.query.parse.SqlQueryParser.parseQuery()

        public Builder addView( String name,
                                String definition ) {
            CheckArg.isNotEmpty(name, "name");
            CheckArg.isNotEmpty(definition, "definition");
            SqlQueryParser parser = new SqlQueryParser();
            QueryCommand command = parser.parseQuery(definition, typeSystem);
            this.viewDefinitions.put(new SelectorName(name), command);
            return this;
        }

        /**
 
View Full Code Here

Examples of org.modeshape.jcr.query.parse.BasicSqlQueryParser.parseQuery()

        public Builder addView( String name,
                                String definition ) {
            CheckArg.isNotEmpty(name, "name");
            CheckArg.isNotEmpty(definition, "definition");
            BasicSqlQueryParser parser = new BasicSqlQueryParser();
            QueryCommand command = parser.parseQuery(definition, typeSystem);
            this.viewDefinitions.put(new SelectorName(name), command);
            return this;
        }

        /**
 
View Full Code Here

Examples of org.modeshape.jcr.query.parse.QueryParser.parseQuery()

            Set<String> languages = queryParsers.getLanguages();
            throw new InvalidQueryException(JcrI18n.invalidQueryLanguage.text(language, languages));
        }
        try {
            // Parsing must be done now ...
            QueryCommand command = parser.parseQuery(expression, typeSystem);
            if (command == null) {
                // The query is not well-formed and cannot be parsed ...
                throw new InvalidQueryException(JcrI18n.queryCannotBeParsedUsingLanguage.text(language, expression));
            }
            // Set up the hints ...
View Full Code Here

Examples of org.openrdf.query.parser.QueryParser.parseQuery()

    String query = IOUtil.readString(new InputStreamReader(stream, "UTF-8"));
    stream.close();

    try {
      QueryParser parser = createParser();
      parser.parseQuery(query, null);
      if (MFX_PARSE_ERROR.equals(result)) {
        fail("Negative syntax test failed. Malformed query caused no error.");
      }
    }
    catch (MalformedQueryException e) {
View Full Code Here

Examples of org.openrdf.query.parser.sparql.SPARQLParser.parseQuery()

     */
    public List<Map<String, Vertex>> executeSparql(String sparqlQuery) throws RuntimeException {
        try {
            sparqlQuery = getPrefixes() + sparqlQuery;
            final SPARQLParser parser = new SPARQLParser();
            final ParsedQuery query = parser.parseQuery(sparqlQuery, null);
            boolean includeInferred = false;
            final CloseableIteration<? extends BindingSet, QueryEvaluationException> results = this.sailConnection.get().evaluate(query.getTupleExpr(), query.getDataset(), new MapBindingSet(), includeInferred);
            final List<Map<String, Vertex>> returnList = new ArrayList<Map<String, Vertex>>();
            try {
                while (results.hasNext()) {
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.