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

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.AbsoluteDateRangeParameter
All Implemented Interfaces:
LuceneParameter, SearchParameter

public class AbsoluteDateRangeParameter
extends AbstractLuceneParameter

Represents two DateParameter objects. Can search a range with just the one param. This does not utilise the usual "values" collection used by the other parametrs.


Constructor Summary
AbsoluteDateRangeParameter()
           
AbsoluteDateRangeParameter(String name, Date fromDate, Date toDate)
           
 
Method Summary
 boolean equals(Object o)
           
 Date getFromDate()
           
 org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project, User searcher)
           
 String getQueryString()
          Returns the query string
 Date getToDate()
           
 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

AbsoluteDateRangeParameter

public AbsoluteDateRangeParameter()

AbsoluteDateRangeParameter

public AbsoluteDateRangeParameter(String name,
                                  Date fromDate,
                                  Date toDate)
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

getFromDate

public Date getFromDate()

getToDate

public Date getToDate()

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.