public class DateRangePredicateEvaluator extends RangePropertyPredicateEvaluator
YYYY-MM-DDTHH:mm:ss.SSSZ) and allows also partial
representations (eg. YYYY-MM-DD). Alternatively, the timestamp can be
provided as number of milliseconds since 1970 (UTC timezone, the unix time format).
You can ask for anything between two timestamps, anything newer or older than a given date, and also chose between inclusive and open intervals.
Supports facet extraction. Will provide buckets "today", "this week", "this month", "last 3 months", "this year", "last year" and "earlier than last year".
Does not support filtering.
jcr:lastModified2014-10-012014-10-01T12:15:00| Modifier and Type | Field and Description |
|---|---|
static java.lang.String |
EARLIER_THAN_LAST_YEAR |
static java.lang.String |
LAST_THREE_MONTHS |
static java.lang.String |
LAST_YEAR |
static java.lang.String |
THIS_MONTH |
static java.lang.String |
THIS_WEEK |
static java.lang.String |
THIS_YEAR |
static java.lang.String |
TIME_ZONE |
static java.lang.String |
TODAY |
LOWER_BOUND, LOWER_OPERATION, PROPERTY, PROPERTY_DECIMAL, UPPER_BOUND, UPPER_OPERATION| Constructor and Description |
|---|
DateRangePredicateEvaluator() |
| Modifier and Type | Method and Description |
|---|---|
boolean |
canFilter(Predicate p,
EvaluationContext context)
Returns the same as the deprecated
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. |
boolean |
canXpath(Predicate p,
EvaluationContext context)
Returns the inverted boolean value of the deprecated
AbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. |
FacetExtractor |
getFacetExtractor(Predicate p,
EvaluationContext context)
Default implementation that always returns
null, ie. |
java.lang.String |
getXPathExpression(Predicate p,
EvaluationContext context)
Default implementation that always returns
null, ie. |
static java.lang.String |
parseDateString(java.lang.String dateString,
java.lang.String timeZoneID,
Session session) |
getOrderByProperties, includesgetOrderByComparator, isFilteringpublic static final java.lang.String TIME_ZONE
public static final java.lang.String TODAY
public static final java.lang.String THIS_WEEK
public static final java.lang.String THIS_MONTH
public static final java.lang.String LAST_THREE_MONTHS
public static final java.lang.String THIS_YEAR
public static final java.lang.String LAST_YEAR
public static final java.lang.String EARLIER_THAN_LAST_YEAR
public java.lang.String getXPathExpression(Predicate p, EvaluationContext context)
AbstractPredicateEvaluatornull, ie. adds
nothing to the XPath query. Subclasses can choose whether they want to
implement this method or use the
AbstractPredicateEvaluator.includes(Predicate, Row, EvaluationContext) method for advanced
filtering (or both).getXPathExpression in interface PredicateEvaluatorgetXPathExpression in class RangePropertyPredicateEvaluatorp - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationpublic boolean canFilter(Predicate p, EvaluationContext context)
AbstractPredicateEvaluatorAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. if not
overridden, false).canFilter in interface PredicateEvaluatorcanFilter in class RangePropertyPredicateEvaluatorp - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationtrue if this evaluator can be express itself via
filtering, ie.
PredicateEvaluator.includes(Predicate, Row, EvaluationContext)public boolean canXpath(Predicate p, EvaluationContext context)
AbstractPredicateEvaluatorAbstractPredicateEvaluator.isFiltering(Predicate, EvaluationContext) method (ie. if not
overridden, true).canXpath in interface PredicateEvaluatorcanXpath in class RangePropertyPredicateEvaluatorp - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationtrue if this evaluator can express itself via xpath,
ie. PredicateEvaluator.getXPathExpression(Predicate, EvaluationContext)public static java.lang.String parseDateString(java.lang.String dateString,
java.lang.String timeZoneID,
Session session)
public FacetExtractor getFacetExtractor(Predicate p, EvaluationContext context)
AbstractPredicateEvaluatornull, ie. no
facets will be extracted for the predicate.getFacetExtractor in interface PredicateEvaluatorgetFacetExtractor in class AbstractPredicateEvaluatorp - predicate (for this evaluator type) which is evaluatedcontext - helper class which provides access to various elements of the
query evaluationFacetExtractor that is used to create a Facet
or null if no extractor shall be providedCopyright © 2010 - 2023 Adobe. All Rights Reserved