Class FilterCriteria

java.lang.Object
org.openhab.core.persistence.FilterCriteria

@NonNullByDefault public class FilterCriteria extends Object
This class is used to define a filter for queries to a PersistenceService.

It is designed as a Java bean, for which the different properties are constraints on the query result. These properties include the item name, begin and end date and the item state. A compare operator can be defined to compare not only state equality, but also its decimal value (<,>).

Additionally, the filter criteria supports ordering and paging of the result, so the caller can ask to only return chunks of the result of a certain size (=pageSize) from a starting index (pageNumber*pageSize).

All setter methods return the filter criteria instance, so that the methods can be easily chained in order to define a filter.

Author:
Kai Kreuzer - Initial contribution, Lyubomir Papazov - Deprecate methods using java.util and add methods that use Java8's ZonedDateTime