ENTITY
- the entity typeV
- the field value typepublic interface HasComparableOperators<ENTITY,V extends Comparable<? super V>> extends Field<ENTITY>, HasCompare<ENTITY>
Integer
and not int
) and that implements Comparable
.Modifier and Type | Method and Description |
---|---|
default SpeedmentPredicate<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). |
SpeedmentPredicate<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. |
FieldComparator<ENTITY> |
comparator()
Returns a
Comparator that will compare to this field using this
fields natural order, null fields are sorted last. |
FieldComparator<ENTITY> |
comparatorNullFieldsFirst()
Returns a
Comparator that will compare to this field using this
fields natural order, null fields are sorted first. |
SpeedmentPredicate<ENTITY> |
equal(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is equal to the given
value. |
SpeedmentPredicate<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. |
SpeedmentPredicate<ENTITY> |
greaterThan(V value)
Returns a
Predicate that will evaluate to
true , if and only if this Field is greater than
the given value. |
SpeedmentPredicate<ENTITY> |
in(Collection<V> values)
Returns a
Predicate that will evaluate to
true , if and only if this Field is in the given set. |
default SpeedmentPredicate<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. |
SpeedmentPredicate<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. |
SpeedmentPredicate<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 SpeedmentPredicate<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). |
SpeedmentPredicate<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. |
SpeedmentPredicate<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. |
SpeedmentPredicate<ENTITY> |
notIn(Collection<V> values)
Returns a
Predicate that will evaluate to
true , if and only if this Field is not in the given Set. |
default SpeedmentPredicate<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. |
default Comparator<ENTITY> |
reversed() |
default Comparator<ENTITY> |
thenComparing(Comparator<? super ENTITY> other) |
default <U extends Comparable<? super U>> |
thenComparing(Function<? super ENTITY,? extends U> keyExtractor) |
default <U> Comparator<ENTITY> |
thenComparing(Function<? super ENTITY,? extends U> keyExtractor,
Comparator<? super U> keyComparator) |
default Comparator<ENTITY> |
thenComparingDouble(ToDoubleFunction<? super ENTITY> keyExtractor) |
default Comparator<ENTITY> |
thenComparingInt(ToIntFunction<? super ENTITY> keyExtractor) |
default Comparator<ENTITY> |
thenComparingLong(ToLongFunction<? super ENTITY> keyExtractor) |
isUnique, tableAlias, tableAlias
findColumn, identifier
typeMapper
compare
comparing, comparing, comparingDouble, comparingInt, comparingLong, equals, naturalOrder, nullsFirst, nullsLast, reverseOrder
FieldComparator<ENTITY> comparator()
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 last.FieldComparator<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 firstSpeedmentPredicate<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 valueSpeedmentPredicate<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 valueSpeedmentPredicate<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 valueSpeedmentPredicate<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 valueSpeedmentPredicate<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 valueSpeedmentPredicate<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 SpeedmentPredicate<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)SpeedmentPredicate<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 SpeedmentPredicate<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)SpeedmentPredicate<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 SpeedmentPredicate<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 valuesSpeedmentPredicate<ENTITY> in(Collection<V> values)
Predicate
that will evaluate to
true
, if and only if this Field is in the given set. (If
the collection is not a set, then a set will be created temporarily from
the values of the collection).
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 SpeedmentPredicate<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 valuesSpeedmentPredicate<ENTITY> notIn(Collection<V> values)
Predicate
that will evaluate to
true
, if and only if this Field is not in the given Set.
(If the collection is not a set, then a set will be created temporarily
from the values of the collection).
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 Setdefault Comparator<ENTITY> reversed()
reversed
in interface Comparator<ENTITY>
default Comparator<ENTITY> thenComparing(Comparator<? super ENTITY> other)
thenComparing
in interface Comparator<ENTITY>
default <U> Comparator<ENTITY> thenComparing(Function<? super ENTITY,? extends U> keyExtractor, Comparator<? super U> keyComparator)
thenComparing
in interface Comparator<ENTITY>
default <U extends Comparable<? super U>> Comparator<ENTITY> thenComparing(Function<? super ENTITY,? extends U> keyExtractor)
thenComparing
in interface Comparator<ENTITY>
default Comparator<ENTITY> thenComparingInt(ToIntFunction<? super ENTITY> keyExtractor)
thenComparingInt
in interface Comparator<ENTITY>
default Comparator<ENTITY> thenComparingLong(ToLongFunction<? super ENTITY> keyExtractor)
thenComparingLong
in interface Comparator<ENTITY>
default Comparator<ENTITY> thenComparingDouble(ToDoubleFunction<? super ENTITY> keyExtractor)
thenComparingDouble
in interface Comparator<ENTITY>
Copyright © 2019 Speedment, Inc.. All rights reserved.