|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.atlassian.jira.issue.search.parameters.AbstractSearchParameter com.atlassian.jira.issue.search.parameters.LuceneParameter com.atlassian.jira.issue.search.parameters.lucene.SingleFieldSingleValueLuceneParameter com.atlassian.jira.issue.search.parameters.lucene.PeriodParameter
Parameter indicating a period of time, unbounded at one end. Period is specified by a time offset (t1) from 'now' (t0), and a direction (indicating past, future) in which the period is unbounded.
t1 is positive in the past, so t1=-20000 means "20 seconds ago".
The direction is specified as an EntityOperator
operator;
EntityOperator.GREATER_THAN_EQUAL_TO
means that times after t1 match (t1 is the lower/earlier boundary);
EntityOperator.LESS_THAN_EQUAL_TO
means times before t1 match (t1 is upper/latest boundary)
Field Summary | |
protected org.ofbiz.core.entity.EntityOperator |
operator
|
Fields inherited from class com.atlassian.jira.issue.search.parameters.AbstractSearchParameter |
log |
Constructor Summary | |
PeriodParameter()
|
|
PeriodParameter(java.lang.String name,
org.ofbiz.core.entity.EntityOperator operator,
java.lang.Long offset)
|
|
PeriodParameter(java.lang.String name,
java.lang.Long offset)
Create a PeriodParameter, with future unbounded. |
Method Summary | |
java.lang.String |
getName()
|
long |
getOffset()
|
org.ofbiz.core.entity.EntityOperator |
getOperator()
Whether past or future is unbounded. |
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. |
electric.xml.Element |
getXml()
Return an XML representation of this search parameter |
void |
setName(java.lang.String name)
|
void |
setOperator(org.ofbiz.core.entity.EntityOperator operator)
|
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 |
getXmlElementName, isValid |
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 |
Field Detail |
protected org.ofbiz.core.entity.EntityOperator operator
Constructor Detail |
public PeriodParameter()
public PeriodParameter(java.lang.String name, java.lang.Long offset)
name
- Parameter name, typically from DocumentConstants
.offset
- Offset in milliseconds, positive for dates in the past,
specifying one boundary for the period.public PeriodParameter(java.lang.String name, org.ofbiz.core.entity.EntityOperator operator, java.lang.Long offset)
name
- Period name, typically from DocumentConstants
.operator
- Direction in time, relative to 'offset'.offset
- offset in milliseconds, positive for dates in the past,
specifying one boundary for the period.Method Detail |
public java.lang.String getName()
getName
in interface SearchParameter
getName
in class AbstractSearchParameter
public void setName(java.lang.String name)
setName
in interface SearchParameter
setName
in class AbstractSearchParameter
name
- Period name, eg. "duedate".public org.ofbiz.core.entity.EntityOperator getOperator()
EntityOperator.GREATER_THAN_EQUAL_TO
for "future unbounded"
and EntityOperator.LESS_THAN_EQUAL_TO
for "past unbounded"public org.apache.lucene.search.Query getQuery(org.ofbiz.core.entity.GenericValue project, com.opensymphony.user.User searcher) throws org.apache.lucene.queryParser.ParseException
getQuery
in class SingleFieldSingleValueLuceneParameter
org.apache.lucene.queryParser.ParseException
public void setXml(electric.xml.Element el)
SearchParameter
setXml
in interface SearchParameter
setXml
in class AbstractSearchParameter
public electric.xml.Element getXml()
SearchParameter
getXml
in interface SearchParameter
getXml
in class SingleFieldSingleValueLuceneParameter
public void setOperator(org.ofbiz.core.entity.EntityOperator operator)
public long getOffset()
protected java.lang.String getQueryStringPrefix()
AbstractSearchParameter
URLEncoder.encode(String)
method.
getQueryStringPrefix
in class AbstractSearchParameter
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |