com.atlassian.jira.issue.search.parameters.lucene
Class RelativeDateRangeParameter

java.lang.Object
  extended by com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
      extended by com.atlassian.jira.issue.search.parameters.AbstractLuceneParameter
          extended by com.atlassian.jira.issue.search.parameters.lucene.RelativeDateRangeParameter
All Implemented Interfaces:
LuceneParameter, SearchParameter

public class RelativeDateRangeParameter
extends AbstractLuceneParameter

Can search a relative range with just the one param. This does not utilise the usual "values" collection used by the other parameters.


Constructor Summary
RelativeDateRangeParameter()
           
RelativeDateRangeParameter(String name, Long previousOffset, Long nextOffset)
           
 
Method Summary
 boolean equals(Object o)
           
 Long getNextOffset()
           
 Long getPreviousOffset()
           
 org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project, User searcher)
           
 String getQueryString()
          Returns the query string
 electric.xml.Element getXml()
          Return an XML elemnt representation of this search parameter.
 int hashCode()
           
 boolean isValid()
          Returns true if this parameter is valid, false otherwise.
 void setXml(electric.xml.Element el)
          Initialise this search parameter using an XML element.
 
Methods inherited from class com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
addValue, clearValues, getName, getQueryStringPrefix, getValues, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.atlassian.jira.issue.search.SearchParameter
addValue, getName, getValues, setName
 

Constructor Detail

RelativeDateRangeParameter

public RelativeDateRangeParameter()

RelativeDateRangeParameter

public RelativeDateRangeParameter(String name,
                                  Long previousOffset,
                                  Long nextOffset)
Method Detail

getQuery

public org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project,
                                               User searcher)
                                        throws org.apache.lucene.queryParser.ParseException
Returns:
a collection of Query objects.
Throws:
org.apache.lucene.queryParser.ParseException

setXml

public void setXml(electric.xml.Element el)
Description copied from interface: SearchParameter
Initialise this search parameter using an XML element.

Usual process is:

    SearchParameter param = new MySearchParameter();
    param.setXml(element);
 

Specified by:
setXml in interface SearchParameter
Overrides:
setXml in class AbstractSearchParameter
Parameters:
el - XML element

getXml

public electric.xml.Element getXml()
Description copied from interface: SearchParameter
Return an XML elemnt representation of this search parameter.

Specified by:
getXml in interface SearchParameter
Specified by:
getXml in class AbstractSearchParameter
Returns:
XML element

isValid

public boolean isValid()
Description copied from interface: SearchParameter
Returns true if this parameter is valid, false otherwise.

Specified by:
isValid in interface SearchParameter
Specified by:
isValid in class AbstractSearchParameter
Returns:
true if valid, false otherwise

getQueryString

public String getQueryString()
Description copied from interface: SearchParameter
Returns the query string

Specified by:
getQueryString in interface SearchParameter
Overrides:
getQueryString in class AbstractSearchParameter
Returns:
query string

getPreviousOffset

public Long getPreviousOffset()

getNextOffset

public Long getNextOffset()

equals

public boolean equals(Object o)
Overrides:
equals in class AbstractSearchParameter

hashCode

public int hashCode()
Overrides:
hashCode in class AbstractSearchParameter


Copyright © 2002-2008 Atlassian. All Rights Reserved.