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

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.SingleFieldSingleValueLuceneParameter
              extended by com.atlassian.jira.issue.search.parameters.lucene.DateParameter
All Implemented Interfaces:
LuceneParameter, SearchParameter

Deprecated. You should now use AbsoluteDateRangeParameter which is much more efficient

public class DateParameter
extends SingleFieldSingleValueLuceneParameter

Limits search to issues before/after/between certain dates.


Field Summary
static String DATE_SUFFIX_AFTER
          Deprecated.  
static String DATE_SUFFIX_BEFORE
          Deprecated.  
 
Constructor Summary
DateParameter()
          Deprecated.  
DateParameter(String name, org.ofbiz.core.entity.EntityOperator operator, Date date)
          Deprecated. Construct a DateParameter.
 
Method Summary
 String getName()
          Deprecated. Get issue field name.
 org.ofbiz.core.entity.EntityOperator getOperator()
          Deprecated.  
 org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project, User searcher)
          Deprecated.  
protected  String getQueryStringPrefix()
          Deprecated. Query parameter name, suitable for inclusion in URL.
 electric.xml.Element getXml()
          Deprecated. Return an XML elemnt representation of this search parameter.
protected  String getXmlElementName()
          Deprecated. For some parameters, the parameter name may not be a valid XML element name (eg, if it contains a ':' in the case of custom fields.
 boolean isValid()
          Deprecated. Returns true if this parameter is valid, false otherwise.
 void setName(String name)
          Deprecated. Set name of date field to search against.
 void setOperator(org.ofbiz.core.entity.EntityOperator operator)
          Deprecated.  
 void setXml(electric.xml.Element el)
          Deprecated. Initialise this search parameter using an XML element.
 
Methods inherited from class com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
addValue, clearValues, equals, getQueryString, getValues, hashCode, 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, getQueryString, getValues
 

Field Detail

DATE_SUFFIX_AFTER

public static final String DATE_SUFFIX_AFTER
Deprecated. 
See Also:
Constant Field Values

DATE_SUFFIX_BEFORE

public static final String DATE_SUFFIX_BEFORE
Deprecated. 
See Also:
Constant Field Values
Constructor Detail

DateParameter

public DateParameter()
Deprecated. 

DateParameter

public DateParameter(String name,
                     org.ofbiz.core.entity.EntityOperator operator,
                     Date date)
Deprecated. 
Construct a DateParameter.

Parameters:
name - Field name, eg. IssueFieldConstants.CREATED, IssueFieldConstants.UPDATED or Field.getId().
operator - EntityOperator.EQUALS, EntityOperator.LESS_THAN_EQUAL_TO etc.
date - date, can be null
Method Detail

getName

public String getName()
Deprecated. 
Description copied from interface: SearchParameter
Get issue field name.

Specified by:
getName in interface SearchParameter
Overrides:
getName in class AbstractSearchParameter
Returns:
issue field name

getXmlElementName

protected String getXmlElementName()
Deprecated. 
Description copied from class: SingleFieldSingleValueLuceneParameter
For some parameters, the parameter name may not be a valid XML element name (eg, if it contains a ':' in the case of custom fields. For those parameters, you can override the element name here).

Overrides:
getXmlElementName in class SingleFieldSingleValueLuceneParameter
Returns:
The element name to describe this parameter. By default, it returns the same as AbstractSearchParameter.getName()

setName

public void setName(String name)
Deprecated. 
Set name of date field to search against.

Specified by:
setName in interface SearchParameter
Overrides:
setName in class AbstractSearchParameter
Parameters:
name - Field name, eg. IssueFieldConstants.CREATED, IssueFieldConstants.UPDATED or Field.getId().

getQuery

public org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project,
                                               User searcher)
                                        throws org.apache.lucene.queryParser.ParseException
Deprecated. 
Specified by:
getQuery in interface LuceneParameter
Overrides:
getQuery in class SingleFieldSingleValueLuceneParameter
Returns:
a collection of Query objects.
Throws:
org.apache.lucene.queryParser.ParseException

getXml

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

Specified by:
getXml in interface SearchParameter
Overrides:
getXml in class SingleFieldSingleValueLuceneParameter
Returns:
XML element

setXml

public void setXml(electric.xml.Element el)
Deprecated. 
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

getOperator

public org.ofbiz.core.entity.EntityOperator getOperator()
Deprecated. 

setOperator

public void setOperator(org.ofbiz.core.entity.EntityOperator operator)
Deprecated. 

isValid

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

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

getQueryStringPrefix

protected String getQueryStringPrefix()
Deprecated. 
Description copied from class: AbstractSearchParameter
Query parameter name, suitable for inclusion in URL. Note that implementations of this method should ensure that the values that they return are URLEncoded, perhaps using the URLEncoder.encode(String) method.

Overrides:
getQueryStringPrefix in class AbstractSearchParameter
Returns:
nothing, always throws UnsupportedOperationException


Copyright © 2002-2009 Atlassian. All Rights Reserved.