com.atlassian.greenhopper.customfield.backlog.jira42
Class RelationalOperatorIdIndexValueQueryFactory<T>

java.lang.Object
  extended by com.atlassian.greenhopper.customfield.backlog.jira42.AbstractOperatorQueryFactory<T>
      extended by com.atlassian.greenhopper.customfield.backlog.jira42.RelationalOperatorIdIndexValueQueryFactory<T>
All Implemented Interfaces:
com.atlassian.jira.jql.query.OperatorSpecificQueryFactory
Direct Known Subclasses:
BacklogSpecificRelationalOperatorQueryFactory

public class RelationalOperatorIdIndexValueQueryFactory<T>
extends AbstractOperatorQueryFactory<T>
implements com.atlassian.jira.jql.query.OperatorSpecificQueryFactory

Generates queries for the operators '>', '>=', '<', '<='.

Since:
v4.0

Constructor Summary
RelationalOperatorIdIndexValueQueryFactory(java.util.Comparator<? super T> comparator, com.atlassian.jira.jql.resolver.NameResolver<T> resolver, com.atlassian.jira.jql.resolver.IndexInfoResolver<T> indexInfoResolver)
           
 
Method Summary
protected  com.atlassian.jira.util.Predicate<T> createPredicate(com.atlassian.query.operator.Operator operator, T domainObject)
          Override this method if you wish to have more than just relational operator predicate evaluation.
 com.atlassian.jira.jql.query.QueryFactoryResult createQueryForEmptyOperand(java.lang.String fieldName, com.atlassian.query.operator.Operator operator)
           
 com.atlassian.jira.jql.query.QueryFactoryResult createQueryForMultipleValues(java.lang.String fieldName, com.atlassian.query.operator.Operator operator, java.util.List<com.atlassian.jira.jql.operand.QueryLiteral> listOfIds)
           
 com.atlassian.jira.jql.query.QueryFactoryResult createQueryForSingleValue(java.lang.String fieldName, com.atlassian.query.operator.Operator operator, java.util.List<com.atlassian.jira.jql.operand.QueryLiteral> rawValues)
           
protected  org.apache.lucene.search.Query generateQueryForValue(java.lang.String fieldName, com.atlassian.query.operator.Operator operator, java.lang.String indexValue)
           
protected  org.apache.lucene.search.BooleanQuery generateRangeQueryForPredicate(java.lang.String fieldName, com.atlassian.jira.util.Predicate<T> match)
           
 boolean handlesOperator(com.atlassian.query.operator.Operator operator)
           
 
Methods inherited from class com.atlassian.greenhopper.customfield.backlog.jira42.AbstractOperatorQueryFactory
checkQueryForEmpty, getIndexValues, getTermQuery
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RelationalOperatorIdIndexValueQueryFactory

public RelationalOperatorIdIndexValueQueryFactory(java.util.Comparator<? super T> comparator,
                                                  com.atlassian.jira.jql.resolver.NameResolver<T> resolver,
                                                  com.atlassian.jira.jql.resolver.IndexInfoResolver<T> indexInfoResolver)
Method Detail

createQueryForSingleValue

public com.atlassian.jira.jql.query.QueryFactoryResult createQueryForSingleValue(java.lang.String fieldName,
                                                                                 com.atlassian.query.operator.Operator operator,
                                                                                 java.util.List<com.atlassian.jira.jql.operand.QueryLiteral> rawValues)
Specified by:
createQueryForSingleValue in interface com.atlassian.jira.jql.query.OperatorSpecificQueryFactory

createQueryForEmptyOperand

public com.atlassian.jira.jql.query.QueryFactoryResult createQueryForEmptyOperand(java.lang.String fieldName,
                                                                                  com.atlassian.query.operator.Operator operator)
Specified by:
createQueryForEmptyOperand in interface com.atlassian.jira.jql.query.OperatorSpecificQueryFactory

createQueryForMultipleValues

public com.atlassian.jira.jql.query.QueryFactoryResult createQueryForMultipleValues(java.lang.String fieldName,
                                                                                    com.atlassian.query.operator.Operator operator,
                                                                                    java.util.List<com.atlassian.jira.jql.operand.QueryLiteral> listOfIds)
Specified by:
createQueryForMultipleValues in interface com.atlassian.jira.jql.query.OperatorSpecificQueryFactory

handlesOperator

public boolean handlesOperator(com.atlassian.query.operator.Operator operator)
Specified by:
handlesOperator in interface com.atlassian.jira.jql.query.OperatorSpecificQueryFactory

generateQueryForValue

protected org.apache.lucene.search.Query generateQueryForValue(java.lang.String fieldName,
                                                               com.atlassian.query.operator.Operator operator,
                                                               java.lang.String indexValue)

createPredicate

protected com.atlassian.jira.util.Predicate<T> createPredicate(com.atlassian.query.operator.Operator operator,
                                                               T domainObject)
Override this method if you wish to have more than just relational operator predicate evaluation.

Parameters:
operator - the relational operator to use in comparisons
domainObject - the domain object as the basis of all comparisons
Returns:
a predicate which will exclude all domain objects that do not meet the comparison for the domain object

generateRangeQueryForPredicate

protected org.apache.lucene.search.BooleanQuery generateRangeQueryForPredicate(java.lang.String fieldName,
                                                                               com.atlassian.jira.util.Predicate<T> match)


Copyright © 2007-2011 Atlassian. All Rights Reserved.