public interface QueryFilter extends Expression, Serializable
Query expression representing a filter (query restriction) condition.| Modifier and Type | Interface and Description |
|---|---|
static interface |
QueryFilter.CompositeQueryFilter
A
QueryFilter which represents a query filters composition. |
static class |
QueryFilter.FilterOperator
Filter operators.
|
static interface |
QueryFilter.OperationQueryFilter<T>
A
QueryFilter which represents an operation with operator and arguments. |
static interface |
QueryFilter.QueryFilterResolver<T extends QueryFilter>
Convenience interface to create an
ExpressionResolver to resolve a custom QueryFilter class into
a standard QueryFilter. |
static interface |
QueryFilter.QueryFilterSupport<C extends QueryFilter.QueryFilterSupport<C>>
Interface implemented by classes which support
QueryFilters addition. |
Expression.ExpressionResolverFunction<E extends Expression,R extends Expression>, Expression.InvalidExpressionException| Modifier and Type | Method and Description |
|---|---|
static <Q extends QueryFilter> |
allOf(Iterable<Q> filters)
Build a QueryFilter with the conjunction (AND) of all given
filters |
static Optional<QueryFilter> |
allOf(QueryFilter... filters)
Build a QueryFilter with the conjunction (AND) of all given not null
filters |
default QueryFilter |
and(QueryFilter filter)
Join another
filter in AND mode. |
static <Q extends QueryFilter> |
anyOf(Iterable<Q> filters)
Build a QueryFilter with the disjunction (OR) of all given
filters |
static Optional<QueryFilter> |
anyOf(QueryFilter... filters)
Build a QueryFilter with the disjunction (OR) of all given not null
filters |
static <T> QueryFilter |
between(QueryExpression<T> expression,
T from,
T to)
Build a
QueryFilter.FilterOperator.BETWEEN filter using given expression, which checks if expression
value is between given from and to values. |
static QueryFilter |
contains(QueryExpression<String> expression,
String value,
boolean ignoreCase)
Build a contains filter on given
String expression, checking if the
expression value contains given value. |
static QueryFilter |
endsWith(QueryExpression<String> expression,
String value,
boolean ignoreCase)
Build a ends with filter on given
String expression, checking if the
expression value ends with given value. |
static <T> QueryFilter |
eq(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.EQUAL filter using given left and right operands, which
checks if left expression value is equal to right expression value. |
static <T> QueryFilter |
eq(QueryExpression<T> expression,
T value)
Build a
QueryFilter.FilterOperator.EQUAL filter using given expression, which checks if expression value
is equal to given constant value. |
static <T> QueryFilter |
goe(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given left and right
operands, which checks if left expression value is greater than or equal to right expression value. |
static <T> QueryFilter |
goe(QueryExpression<T> expression,
T value)
Build a
QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given expression, which checks if
expression value is greater than or equal to given constant value. |
static <T> QueryFilter |
greaterThan(QueryExpression<T> left,
QueryExpression<? super T> right,
boolean includeEquals)
Build a
QueryFilter.FilterOperator.GREATER_THAN or a QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given
left and right operands, which checks if left expression value is greater than or
greater than or equal to right expression value. |
static <T> QueryFilter |
greaterThan(QueryExpression<T> expression,
T value,
boolean includeEquals)
Build a
QueryFilter.FilterOperator.GREATER_THAN or a QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given
expression, which checks if expression value is greater than or greater than or equal to given
constant value. |
static <T> QueryFilter |
gt(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.GREATER_THAN filter using given left and right operands,
which checks if left expression value is greater than right expression value. |
static <T> QueryFilter |
gt(QueryExpression<T> expression,
T value)
Build a
QueryFilter.FilterOperator.GREATER_THAN filter using given expression, which checks if
expression value is greater than given constant value. |
static <T> QueryFilter |
in(QueryExpression<T> expression,
Collection<T> values)
Build a
QueryFilter.FilterOperator.IN filter using given expression, which checks if expression value is
equal to any of the given constant values. |
static <T> QueryFilter |
in(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.IN filter using given left and right operands, which
checks if left expression value is equal to any of the right expression values. |
static <T> QueryFilter |
in(QueryExpression<T> expression,
T... values)
Build a
QueryFilter.FilterOperator.IN filter using given expression, which checks if expression value is
equal to any of the given constant values. |
static <T> QueryFilter |
isNotNull(QueryExpression<T> expression)
Build a
QueryFilter.FilterOperator.NOT_NULL filter on given expression, which checks if given expression
value is not null. |
static <T> QueryFilter |
isNull(QueryExpression<T> expression)
Build a
QueryFilter.FilterOperator.NULL filter on given expression, which checks if given expression
value is null. |
static <T> QueryFilter |
lessThan(QueryExpression<T> left,
QueryExpression<? super T> right,
boolean includeEquals)
Build a
QueryFilter.FilterOperator.LESS_THAN or a QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given
left and right operands, which checks if left expression value is less than or less
than or equal to right expression value. |
static <T> QueryFilter |
lessThan(QueryExpression<T> expression,
T value,
boolean includeEquals)
Build a
QueryFilter.FilterOperator.LESS_THAN or a QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given
expression, which checks if expression value is less than or less than or equal to given constant
value. |
static <T> QueryFilter |
loe(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given left and right
operands, which checks if left expression value is less than or equal to right expression value. |
static <T> QueryFilter |
loe(QueryExpression<T> expression,
T value)
Build a
QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given expression, which checks if
expression value is less than or equal to given constant value. |
static <T> QueryFilter |
lt(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.LESS_THAN filter using given left and right operands,
which checks if left expression value is less than right expression value. |
static <T> QueryFilter |
lt(QueryExpression<T> expression,
T value)
Build a
QueryFilter.FilterOperator.LESS_THAN filter using given expression, which checks if expression
value is less than given constant value. |
static <T> QueryFilter |
neq(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.NOT_EQUAL filter using given left and right operands,
which checks if left expression value is not equal to right expression value. |
static <T> QueryFilter |
neq(QueryExpression<T> expression,
T value)
Build a
QueryFilter.FilterOperator.NOT_EQUAL filter using given expression, which checks if expression
value is not equal to given constant value. |
static <T> QueryFilter |
nin(QueryExpression<T> expression,
Collection<T> values)
Build a
QueryFilter.FilterOperator.NOT_IN filter using given expression, which checks if expression
value is not included in given constant values. |
static <T> QueryFilter |
nin(QueryExpression<T> left,
QueryExpression<? super T> right)
Build a
QueryFilter.FilterOperator.NOT_IN filter using given left and right operands, which
checks if left expression value is not included in the right expression values. |
static <T> QueryFilter |
nin(QueryExpression<T> expression,
T... values)
Build a
QueryFilter.FilterOperator.NOT_IN filter using given expression, which checks if expression
value is not included in given constant values. |
default QueryFilter |
not()
Negate this filter.
|
static QueryFilter |
not(QueryFilter filter)
Build a QueryFilter as ne negation of given
filter. |
default QueryFilter |
or(QueryFilter filter)
Join another
filter in OR mode. |
static QueryFilter |
startsWith(QueryExpression<String> expression,
String value,
boolean ignoreCase)
Build a starts with filter on given
String expression, checking if the
expression value starts with given value. |
validatedefault QueryFilter not()
default QueryFilter and(QueryFilter filter)
filter in AND mode.filter - QueryFilter to join (not null)filterdefault QueryFilter or(QueryFilter filter)
filter in OR mode.filter - QueryFilter to join (not null)filterstatic <T> QueryFilter isNull(QueryExpression<T> expression)
QueryFilter.FilterOperator.NULL filter on given expression, which checks if given expression
value is null.T - Expression typeexpression - Filter expression (not null)static <T> QueryFilter isNotNull(QueryExpression<T> expression)
QueryFilter.FilterOperator.NOT_NULL filter on given expression, which checks if given expression
value is not null.T - Expression typeexpression - Filter expression (not null)static <T> QueryFilter eq(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.EQUAL filter using given left and right operands, which
checks if left expression value is equal to right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter eq(QueryExpression<T> expression, T value)
QueryFilter.FilterOperator.EQUAL filter using given expression, which checks if expression value
is equal to given constant value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)static <T> QueryFilter neq(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.NOT_EQUAL filter using given left and right operands,
which checks if left expression value is not equal to right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter neq(QueryExpression<T> expression, T value)
QueryFilter.FilterOperator.NOT_EQUAL filter using given expression, which checks if expression
value is not equal to given constant value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)static <T> QueryFilter lessThan(QueryExpression<T> left, QueryExpression<? super T> right, boolean includeEquals)
QueryFilter.FilterOperator.LESS_THAN or a QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given
left and right operands, which checks if left expression value is less than or less
than or equal to right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)includeEquals - true to use the QueryFilter.FilterOperator.LESS_OR_EQUAL operator (which includes
value equality), false to use the QueryFilter.FilterOperator.LESS_THAN operatorstatic <T> QueryFilter lessThan(QueryExpression<T> expression, T value, boolean includeEquals)
QueryFilter.FilterOperator.LESS_THAN or a QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given
expression, which checks if expression value is less than or less than or equal to given constant
value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)includeEquals - true to use the QueryFilter.FilterOperator.LESS_OR_EQUAL operator (which includes
value equality), false to use the QueryFilter.FilterOperator.LESS_THAN operatorstatic <T> QueryFilter lt(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.LESS_THAN filter using given left and right operands,
which checks if left expression value is less than right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter lt(QueryExpression<T> expression, T value)
QueryFilter.FilterOperator.LESS_THAN filter using given expression, which checks if expression
value is less than given constant value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)static <T> QueryFilter loe(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given left and right
operands, which checks if left expression value is less than or equal to right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter loe(QueryExpression<T> expression, T value)
QueryFilter.FilterOperator.LESS_OR_EQUAL filter using given expression, which checks if
expression value is less than or equal to given constant value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)static <T> QueryFilter greaterThan(QueryExpression<T> left, QueryExpression<? super T> right, boolean includeEquals)
QueryFilter.FilterOperator.GREATER_THAN or a QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given
left and right operands, which checks if left expression value is greater than or
greater than or equal to right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)includeEquals - true to use the QueryFilter.FilterOperator.GREATER_OR_EQUAL operator (which
includes value equality), false to use the QueryFilter.FilterOperator.GREATER_THAN operatorstatic <T> QueryFilter greaterThan(QueryExpression<T> expression, T value, boolean includeEquals)
QueryFilter.FilterOperator.GREATER_THAN or a QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given
expression, which checks if expression value is greater than or greater than or equal to given
constant value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)includeEquals - true to use the QueryFilter.FilterOperator.GREATER_OR_EQUAL operator (which
includes value equality), false to use the QueryFilter.FilterOperator.GREATER_THAN operatorstatic <T> QueryFilter gt(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.GREATER_THAN filter using given left and right operands,
which checks if left expression value is greater than right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter gt(QueryExpression<T> expression, T value)
QueryFilter.FilterOperator.GREATER_THAN filter using given expression, which checks if
expression value is greater than given constant value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)static <T> QueryFilter goe(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given left and right
operands, which checks if left expression value is greater than or equal to right expression value.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter goe(QueryExpression<T> expression, T value)
QueryFilter.FilterOperator.GREATER_OR_EQUAL filter using given expression, which checks if
expression value is greater than or equal to given constant value.T - Expression typeexpression - Filter expression (not null)value - Constant value (not null)static <T> QueryFilter between(QueryExpression<T> expression, T from, T to)
QueryFilter.FilterOperator.BETWEEN filter using given expression, which checks if expression
value is between given from and to values.T - Expression typeexpression - Filter expression (not null)from - From value (not null)to - To value (not null)static <T> QueryFilter in(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.IN filter using given left and right operands, which
checks if left expression value is equal to any of the right expression values.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter in(QueryExpression<T> expression, T... values)
QueryFilter.FilterOperator.IN filter using given expression, which checks if expression value is
equal to any of the given constant values.T - Expression typeexpression - Filter expression (not null)values - Filter values (not null)static <T> QueryFilter in(QueryExpression<T> expression, Collection<T> values)
QueryFilter.FilterOperator.IN filter using given expression, which checks if expression value is
equal to any of the given constant values.T - Expression typeexpression - Filter expression (not null)values - Filter values (not null)static <T> QueryFilter nin(QueryExpression<T> left, QueryExpression<? super T> right)
QueryFilter.FilterOperator.NOT_IN filter using given left and right operands, which
checks if left expression value is not included in the right expression values.T - Expression typeleft - Left operand expression (not null)right - Right operand expression (not null)static <T> QueryFilter nin(QueryExpression<T> expression, T... values)
QueryFilter.FilterOperator.NOT_IN filter using given expression, which checks if expression
value is not included in given constant values.T - Expression typeexpression - Filter expression (not null)values - Filter values (not null)static <T> QueryFilter nin(QueryExpression<T> expression, Collection<T> values)
QueryFilter.FilterOperator.NOT_IN filter using given expression, which checks if expression
value is not included in given constant values.T - Expression typeexpression - Filter expression (not null)values - Filter values (not null)static QueryFilter contains(QueryExpression<String> expression, String value, boolean ignoreCase)
String expression, checking if the
expression value contains given value.expression - Filter expression (not null)value - Value which must be contained in expression valueignoreCase - Whether to ignore casestatic QueryFilter startsWith(QueryExpression<String> expression, String value, boolean ignoreCase)
String expression, checking if the
expression value starts with given value.expression - Filter expression (not null)value - Value with which the expression value must start withignoreCase - Whether to ignore casestatic QueryFilter endsWith(QueryExpression<String> expression, String value, boolean ignoreCase)
String expression, checking if the
expression value ends with given value.expression - Filter expression (not null)value - Value with which the expression value must end withignoreCase - Whether to ignore casestatic QueryFilter not(QueryFilter filter)
filter.filter - Filter to negatestatic Optional<QueryFilter> allOf(QueryFilter... filters)
filtersfilters - Filtersstatic <Q extends QueryFilter> Optional<QueryFilter> allOf(Iterable<Q> filters)
filtersQ - Actual filter typefilters - Filtersstatic Optional<QueryFilter> anyOf(QueryFilter... filters)
filtersfilters - Filtersstatic <Q extends QueryFilter> Optional<QueryFilter> anyOf(Iterable<Q> filters)
filtersQ - Actual filter typefilters - FiltersCopyright © 2017 The Holon Platform. All rights reserved.