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

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
All Implemented Interfaces:
LuceneParameter, SearchParameter
Direct Known Subclasses:
DateParameter, FreeTextParameter, NumberParameter, StringParameter, StringRangeParameter, WorkRatioParameter

public abstract class SingleFieldSingleValueLuceneParameter
extends AbstractLuceneParameter


Constructor Summary
SingleFieldSingleValueLuceneParameter()
           
SingleFieldSingleValueLuceneParameter(String name)
           
 
Method Summary
 org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project, User searcher)
           
 electric.xml.Element getXml()
          Return an XML elemnt representation of this search parameter.
protected  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.
 boolean isValid()
          Returns true if this parameter is valid, false otherwise.
 
Methods inherited from class com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
addValue, clearValues, equals, getName, getQueryString, getQueryStringPrefix, getValues, hashCode, setName, setXml, 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, getQueryString, getValues, setName, setXml
 

Constructor Detail

SingleFieldSingleValueLuceneParameter

public SingleFieldSingleValueLuceneParameter()

SingleFieldSingleValueLuceneParameter

public SingleFieldSingleValueLuceneParameter(String name)
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

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

getXmlElementName

protected 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. For those parameters, you can override the element name here).

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

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


Copyright © 2002-2008 Atlassian. All Rights Reserved.