ENTITY
- the entity typeV
- the field value typepublic interface HasComparableOperators<ENTITY,V extends Comparable<? super V>> extends Field<ENTITY>
Integer
and not int
) and that implements Comparable
.Modifier and Type | Method and Description |
---|---|
default Predicate<ENTITY> |
between(V start,
V end)
Returns a
Predicate that will evaluate to
true , if and only if this Field is between
the given values (inclusive the start value but exclusive the end value). |
Predicate<ENTITY> |
between(V start,
V end,
Inclusion inclusion)
Returns a
Predicate that will evaluate to
true , if and only if this Field is between
the given values and taking the Inclusion parameter into account when
determining if either of the end points shall be included in the Field
range or not. |
Comparator<ENTITY> |
comparator()
Returns a
Comparator that will compare to this field using this
fields natural order. |
Comparator<ENTITY> |
comparatorNullFieldsFirst()
Returns a
Comparator that will compare to this field using this
fields natural order, null fields are sorted first. |
Comparator<ENTITY> |
comparatorNullFieldsLast()
Returns a
Comparator that will compare to this field using this
fields natural order, null fields are sorted last. |
Predicate<ENTITY> |
equal(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is equal to the given
value. |
Predicate<ENTITY> |
greaterOrEqual(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is greater than or equal
to the given value. |
Predicate<ENTITY> |
greaterThan(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is greater than
the given value. |
Predicate<ENTITY> |
in(Set<V> values)
Returns a
Predicate that will evaluate to
true , if and only if this Field is in the given Set. |
default Predicate<ENTITY> |
in(V... values)
Returns a
Predicate that will evaluate to
true , if and only if this Field is in the set of given
values. |
Predicate<ENTITY> |
lessOrEqual(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is less than or equal
to the given value. |
Predicate<ENTITY> |
lessThan(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is less than the given
value. |
default Predicate<ENTITY> |
notBetween(V start,
V end)
Returns a
Predicate that will evaluate to
true , if and only if this Field is not between
the given values (inclusive the start value but exclusive the end value). |
Predicate<ENTITY> |
notBetween(V start,
V end,
Inclusion inclusion)
Returns a
Predicate that will evaluate to
true , if and only if this Field is not between
the given values and taking the Inclusion parameter into account when
determining if either of the end points shall be included in the Field
range or not. |
Predicate<ENTITY> |
notEqual(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is not equal to the
given value. |
Predicate<ENTITY> |
notIn(Set<V> values)
Returns a
Predicate that will evaluate to
true , if and only if this Field is not in the given Set. |
default Predicate<ENTITY> |
notIn(V... values)
Returns a
Predicate that will evaluate to
true , if and only if this Field is not in the set of
given values. |
findColumn, identifier
typeMapper
Comparator<ENTITY> comparator()
Comparator
that will compare to this field using this
fields natural order.Comparator
that will compare to this field using this
fields natural orderNullPointerException
- if a field is nullComparator<ENTITY> comparatorNullFieldsFirst()
Comparator
that will compare to this field using this
fields natural order, null fields are sorted first.Comparator
that will compare to this field using this
fields natural order, null fields are sorted firstComparator<ENTITY> comparatorNullFieldsLast()
Comparator
that will compare to this field using this
fields natural order, null fields are sorted last.Comparator
that will compare to this field using this
fields natural order, null fields are sorted lastPredicate<ENTITY> equal(V value)
Predicate
that will evaluate to
true
, if and only if this Field is equal to the given
value.value
- to comparetrue
, if and only if
this Field is equal to the given valuePredicate<ENTITY> notEqual(V value)
Predicate
that will evaluate to
true
, if and only if this Field is not equal to the
given value.value
- to comparetrue
, if and only if
this Field is not equal to the given valuePredicate<ENTITY> lessThan(V value)
Predicate
that will evaluate to
true
, if and only if this Field is less than the given
value.
If the specified value is null
, the returned predicate will
always return false
.
value
- to comparetrue
, if and only if
this Field is less than the given valuePredicate<ENTITY> lessOrEqual(V value)
Predicate
that will evaluate to
true
, if and only if this Field is less than or equal
to the given value.
If the specified value is null
, the returned predicate will
only return true
for null
values.
value
- to comparetrue
, if and only if
this Field is less than or equal to the given valuePredicate<ENTITY> greaterThan(V value)
Predicate
that will evaluate to
true
, if and only if this Field is greater than
the given value.
If the specified value is null
, the returned predicate will
always return false
.value
- to comparetrue
, if and only if
this Field is greater than the given valuePredicate<ENTITY> greaterOrEqual(V value)
Predicate
that will evaluate to
true
, if and only if this Field is greater than or equal
to the given value.
If the specified value is null
, the returned predicate will
only return true
for null
values.
value
- to comparetrue
, if and only if
this Field is greater than or equal to the given valuedefault Predicate<ENTITY> between(V start, V end)
Predicate
that will evaluate to
true
, if and only if this Field is between
the given values (inclusive the start value but exclusive the end value).
N.B. if the start value is greater or equal to the end value, then the
returned Predicate will always evaluate to false
.
start
- to compare as a start valueend
- to compare as an end valuetrue
, if and only if
this Field is between the given values (inclusive the
start value but exclusive the end value)Predicate<ENTITY> between(V start, V end, Inclusion inclusion)
Predicate
that will evaluate to
true
, if and only if this Field is between
the given values and taking the Inclusion parameter into account when
determining if either of the end points shall be included in the Field
range or not.
N.B. if the start value is greater than the end value, then the returned
Predicate will always evaluate to false
start
- to compare as a start valueend
- to compare as an end valueinclusion
- determines if the end points is included in the Field
range.true
, if and only if
this Field is between the given values and taking the Inclusion
parameter into account when determining if either of the end points shall
be included in the Field range or notdefault Predicate<ENTITY> notBetween(V start, V end)
Predicate
that will evaluate to
true
, if and only if this Field is not between
the given values (inclusive the start value but exclusive the end value).
N.B. if the start value is greater than the end value, then the returned
Predicate will always evaluate to true
start
- to compare as a start valueend
- to compare as an end valuetrue
, if and only if
this Field is not between the given values (inclusive the start
value but exclusive the end value)Predicate<ENTITY> notBetween(V start, V end, Inclusion inclusion)
Predicate
that will evaluate to
true
, if and only if this Field is not between
the given values and taking the Inclusion parameter into account when
determining if either of the end points shall be included in the Field
range or not.
N.B. if the start value is greater than the end value, then the returned
Predicate will always evaluate to true
start
- to compare as a start valueend
- to compare as an end valueinclusion
- determines if the end points is included in the Field
range.true
, if and only if
this Field is not between the given values and taking the
Inclusion parameter into account when determining if either of the end
points shall be included in the Field range or notdefault Predicate<ENTITY> in(V... values)
Predicate
that will evaluate to
true
, if and only if this Field is in the set of given
values.
N.B. if no values are given, then the returned Predicate will always
evaluate to false
values
- the set of values to match towards this Fieldtrue
, if and only if
this Field is in the set of given valuesPredicate<ENTITY> in(Set<V> values)
Predicate
that will evaluate to
true
, if and only if this Field is in the given Set.
N.B. if the Set is empty, then the returned Predicate will always
evaluate to false
values
- the set of values to match towards this Fieldtrue
, if and only if
this Field is in the given Setdefault Predicate<ENTITY> notIn(V... values)
Predicate
that will evaluate to
true
, if and only if this Field is not in the set of
given values.
N.B. if no values are given, then the returned Predicate will always
evaluate to true
values
- the set of values to match towards this Fieldtrue
, if and only if
this Field is not in the set of given valuesPredicate<ENTITY> notIn(Set<V> values)
Predicate
that will evaluate to
true
, if and only if this Field is not in the given Set.
N.B. if the Set is empty, then the returned Predicate will always
evaluate to true
values
- the set of values to match towards this Fieldtrue
, if and only if
this Field is not in the given SetCopyright © 2016 Speedment, Inc.. All rights reserved.