public class DateRangePredicateEvaluator extends RangePropertyPredicateEvaluator
DateRangePropertyPredicate is a generic evaluator for
checking a jcr DATE property against an interval. This uses the ISO8601
format for dates (YYYY-MM-DDTHH:mm:ss.SSSZ) and allows also partial
representations (eg. YYYY-MM-DD). You can also provide the
dates (for the bounds) as number of milliseconds since 1970 (UTC timezone,
basically the unix format).
You can define a lower bound and an upper bound or only one of them. The operation (eg. "lesser than" or "lesser or equals") can also be specified for lower and upper bound individually.
Note: Does not implement filtering, which means this predicate cannot be used together with filter-only predicates in an OR group.
| 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 provided"Copyright © 2010 - 2018 Adobe Systems Incorporated. All Rights Reserved"