com.atlassian.jira.issue.search.parameters.lucene
Class AbstractVersionParameter
java.lang.Object
com.atlassian.jira.issue.search.parameters.AbstractSearchParameter
com.atlassian.jira.issue.search.parameters.AbstractLuceneParameter
com.atlassian.jira.issue.search.parameters.lucene.SingleFieldMultiValueLuceneParameter
com.atlassian.jira.issue.search.parameters.lucene.LongListParameter
com.atlassian.jira.issue.search.parameters.lucene.AbstractVersionParameter
- All Implemented Interfaces:
- LuceneParameter, SearchParameter
- Direct Known Subclasses:
- FixForParameter, VersionParameter
public abstract class AbstractVersionParameter
- extends LongListParameter
Method Summary |
org.apache.lucene.search.Query |
getQuery(org.ofbiz.core.entity.GenericValue project,
User searcher)
|
boolean |
isValid()
Returns true if this parameter is valid, false otherwise. |
protected boolean |
isValidVersionId(Long id)
Validates whether the id is an allowed value, either a real id or a magic number. |
NO_VERSION
public static final int NO_VERSION
- See Also:
- Constant Field Values
ANY_UNRELEASED_VERSION
public static final int ANY_UNRELEASED_VERSION
- See Also:
- Constant Field Values
ANY_RELEASED_VERSION
public static final int ANY_RELEASED_VERSION
- See Also:
- Constant Field Values
ANY_VERSION
public static final int ANY_VERSION
- Deprecated. since v3.11 this is really badly named, it actually means that the is no version set at all!
- See Also:
- Constant Field Values
AbstractVersionParameter
public AbstractVersionParameter()
- We need a blank constructor here as subclasses' default constructors are invoked by reflection in
SearchRequest.init(electric.xml.Document)
AbstractVersionParameter
public AbstractVersionParameter(Collection entities)
- Instantiate with a list of
Version
s, GenericValue
s, or Long ids.
- Parameters:
entities
- collection of entities
getQuery
public org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project,
User searcher)
throws org.apache.lucene.queryParser.ParseException
- Specified by:
getQuery
in interface LuceneParameter
- Overrides:
getQuery
in class SingleFieldMultiValueLuceneParameter
- Returns:
- a collection of Query objects.
- Throws:
org.apache.lucene.queryParser.ParseException
isValid
public boolean isValid()
- Description copied from interface:
SearchParameter
- Returns true if this parameter is valid, false otherwise.
- Specified by:
isValid
in interface SearchParameter
- Overrides:
isValid
in class LongListParameter
- Returns:
- true if valid, false otherwise
isValidVersionId
protected boolean isValidVersionId(Long id)
- Validates whether the id is an allowed value, either a real id or a magic number.
Magic values are
ANY_RELEASED_VERSION
, ANY_UNRELEASED_VERSION
, ANY_VERSION
- Parameters:
id
- the id.
- Returns:
- true only if the id is valid.
Copyright © 2002-2009 Atlassian. All Rights Reserved.