Filters

public classFiltersextendsObject

A factory for creating filters that are used to construct a Query.

Public Constructor Summary

Public Method Summary

staticFilter
and(Iterable<Filter> filters)
Returns a filter that matches items which are matched by every element of filters.
staticFilter
and(Filter filter,Filter... additionalFilters)
Returns a logical expression which combines filters with the 'AND' operator.
staticFilter
contains(SearchableMetadataField<String> field,Stringvalue)
Returns a filter which checks whethervalueis a substring of field.
staticFilter
eq(CustomPropertyKey key,String value)
Returns a filter which checks whether a custom property with the specified keyexists and its value equalsvalue.
static <T>Filter
eq(SearchableMetadataField<T> field, T value)
Returns a filter which checks if the value offieldequals value.
static <T extendsComparable<T>> Filter
greaterThan(SearchableOrderedMetadataField<T> field, T value)
Returns a filter which checks if the value offieldis greater thanvalue.
static <T extendsComparable<T>> Filter
greaterThanEquals(SearchableOrderedMetadataField<T> field, T value)
Returns a filter which checks if the value offieldis greater than or equal tovalue.
static <T>Filter
in(SearchableCollectionMetadataField<T> field, T value)
Returns a filter which checks whethervalueis an element of field.
static <T extendsComparable<T>> Filter
lessThan(SearchableOrderedMetadataField<T> field, T value)
Returns a filter which checks if the value offieldis less than value.
static <T extendsComparable<T>> Filter
lessThanEquals(SearchableOrderedMetadataField<T> field, T value)
Returns a filter which checks if the value offieldis less than or equal tovalue.
staticFilter
not(Filter toNegate)
Returns the negation of an filter.
staticFilter
openedByMe()
Returns a filter that matches only items that the current user has opened in the past.
staticFilter
or(Iterable<Filter> filters)
Returns a filter that matches items which are matched by any element of filters.
staticFilter
or(Filter filter,Filter... additionalFilters)
Returns a filter that matches items which are matched by any of the provided filter parameters.
staticFilter
ownedByMe()
Returns a filter that matches only items that the current user owns.
staticFilter
sharedWithMe()
Returns a filter that matches only items that are shared with the current user.

Inherited Method Summary

Public Constructors

publicFilters()

Public Methods

public staticFilter and(Iterable<Filter> filters)

Returns a filter that matches items which are matched by every element of filters.

public staticFilter and(Filterfilter, Filter... additionalFilters)

Returns a logical expression which combines filters with the 'AND' operator.

public staticFilter contains(SearchableMetadataField<String> field,String value)

Returns a filter which checks whethervalueis a substring of field.This filter can only be used with fields that contain a string value.

public staticFilter eq(CustomPropertyKey key,String value)

Returns a filter which checks whether a custom property with the specified keyexists and its value equalsvalue.The provided valuemay not be null.

public staticFilter eq(SearchableMetadataField<T> field, T value)

Returns a filter which checks if the value offieldequals value.

public staticFilter greaterThan(SearchableOrderedMetadataField<T> field, T value)

Returns a filter which checks if the value offieldis greater than value.This filter can only be used with fields that have a sort order.

public staticFilter greaterThanEquals(SearchableOrderedMetadataField<T> field, T value)

Returns a filter which checks if the value offieldis greater than or equal tovalue.This filter can only be used with fields that have a sort order.

public staticFilter in(SearchableCollectionMetadataField<T> field, T value)

Returns a filter which checks whethervalueis an element of field.This filter can only be used with fields that contain a collection value.

public staticFilter lessThan(SearchableOrderedMetadataField<T> field, T value)

Returns a filter which checks if the value offieldis less than value.This filter can only be used with fields that have a sort order.

public staticFilter lessThanEquals(SearchableOrderedMetadataField<T> field, T value)

Returns a filter which checks if the value offieldis less than or equal tovalue.This filter can only be used with fields that have a sort order.

public staticFilter not(Filter toNegate)

Returns the negation of an filter.

public staticFilter openedByMe()

Returns a filter that matches only items that the current user has opened in the past.

public staticFilter or(Iterable<Filter> filters)

Returns a filter that matches items which are matched by any element of filters.

public staticFilter or(Filterfilter, Filter... additionalFilters)

Returns a filter that matches items which are matched by any of the provided filter parameters.

public staticFilter ownedByMe()

Returns a filter that matches only items that the current user owns.

public staticFilter sharedWithMe()

Returns a filter that matches only items that are shared with the current user.