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

java.lang.Object
  extended bycom.atlassian.jira.issue.search.parameters.AbstractSearchParameter
      extended bycom.atlassian.jira.issue.search.parameters.LuceneParameter
          extended bycom.atlassian.jira.issue.search.parameters.lucene.SingleFieldSingleValueLuceneParameter
              extended bycom.atlassian.jira.issue.search.parameters.lucene.FreeTextParameter
All Implemented Interfaces:
SearchParameter

public class FreeTextParameter
extends SingleFieldSingleValueLuceneParameter

This parameter is similar to the StringParameter except that it passes the query through Lucene, which means that you get word stemming etc.


Field Summary
 
Fields inherited from class com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
log
 
Constructor Summary
FreeTextParameter()
           
FreeTextParameter(java.lang.String name, java.lang.String value)
           
FreeTextParameter(java.lang.String name, java.lang.String elementName, java.lang.String value)
           
 
Method Summary
 org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project, com.opensymphony.user.User searcher)
           
protected  java.lang.String getQueryStringPrefix()
          Note that implementations of this method should ensure that the values that they return are URLEncoded, perhaps using the URLEncoder#encode(String) method.
protected  java.lang.String getXmlElementName()
          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.
 void setXml(electric.xml.Element el)
          Initialise this search parameter using an XML element.
 
Methods inherited from class com.atlassian.jira.issue.search.parameters.lucene.SingleFieldSingleValueLuceneParameter
getXml, isValid
 
Methods inherited from class com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
addValue, clearValues, equals, getName, getQueryString, getValues, hashCode, setName, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

FreeTextParameter

public FreeTextParameter()

FreeTextParameter

public FreeTextParameter(java.lang.String name,
                         java.lang.String value)

FreeTextParameter

public FreeTextParameter(java.lang.String name,
                         java.lang.String elementName,
                         java.lang.String value)
Method Detail

getQuery

public org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project,
                                               com.opensymphony.user.User searcher)
                                        throws org.apache.lucene.queryParser.ParseException
Overrides:
getQuery in class SingleFieldSingleValueLuceneParameter
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

getXmlElementName

protected java.lang.String getXmlElementName()
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()

getQueryStringPrefix

protected java.lang.String getQueryStringPrefix()
Description copied from class: AbstractSearchParameter
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:


Copyright © 2002-2005 Atlassian. All Rights Reserved.