@InjectableComponent public class QueryVisitor extends Object
Query
. This visits the nodes of the tree
and creates a lucene query based on its structure. Users of this class should only call createQuery(com.atlassian.query.clause.Clause, com.atlassian.jira.jql.query.QueryCreationContext)
and not
use the visitor directly as the query in a QueryFactoryResult
may not be valid.Modifier and Type | Class and Description |
---|---|
static class |
QueryVisitor.QueryVisitorFactory |
Modifier and Type | Field and Description |
---|---|
protected ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory |
contextAwareQueryVisitorFactory |
Constructor and Description |
---|
QueryVisitor(ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory contextAwareQueryVisitorFactory,
WorklogClausesTransformerVisitor.Factory worklogsVisitorFactory,
DeMorgansVisitor.DeMorgansVisitorFactory deMorgansVisitorFactory) |
Modifier and Type | Method and Description |
---|---|
protected ContextAwareQueryVisitor |
createContextAwareQueryVisitor(QueryCreationContext queryCreationContext,
Clause clause) |
org.apache.lucene.search.Query |
createQuery(Clause clause,
QueryCreationContext queryCreationContext)
Create a lucene query for the passed clause.
|
protected final ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory contextAwareQueryVisitorFactory
public QueryVisitor(ContextAwareQueryVisitor.ContextAwareQueryVisitorFactory contextAwareQueryVisitorFactory, WorklogClausesTransformerVisitor.Factory worklogsVisitorFactory, DeMorgansVisitor.DeMorgansVisitorFactory deMorgansVisitorFactory)
public org.apache.lucene.search.Query createQuery(Clause clause, QueryCreationContext queryCreationContext)
NotClause
out of the tree
by using the DeMorgansVisitor
so that the terminal clauses will handle
all the negation logic and the visitor does not need to deal with NOT's.clause
- the clause to process.protected ContextAwareQueryVisitor createContextAwareQueryVisitor(QueryCreationContext queryCreationContext, Clause clause)
Copyright © 2002-2015 Atlassian. All Rights Reserved.