N - the type of the field valuepublic abstract class TemporalCondition<N extends java.time.temporal.Temporal> extends DefaultCondition<N>
It contains a DslField to get the value from the model, a PredicateMetadata to describe this node,
and a BiFunction to take the value from the model and return an optional value.
| Modifier and Type | Field and Description |
|---|---|
protected DslField |
field |
protected java.util.function.BiFunction<DslModel,Context,java.util.Optional<N>> |
function |
protected PredicateMetadata |
metadata |
protected java.util.function.BiFunction<DslModel,DslField,java.util.Optional<N>> |
value |
| Constructor and Description |
|---|
TemporalCondition(DslField field) |
TemporalCondition(DslField field,
PredicateMetadata metadata,
java.util.function.BiFunction<DslModel,Context,java.util.Optional<N>> value) |
| Modifier and Type | Method and Description |
|---|---|
StepCondition |
after(N value)
Returns a condition checking if the node value is after the value.
|
StepCondition |
after(java.util.function.Supplier<N> value)
Returns a condition checking if the node value is after the supplier value.
|
StepCondition |
after(TemporalCondition<N> value)
Returns a condition checking if the node value is after the condition value.
|
StepCondition |
after(TemporalFieldInfo<N> value)
Returns a condition checking if the node value is after the field value.
|
StepCondition |
afterOrEq(N value)
Returns a condition checking if the node value is after or equals the value.
|
StepCondition |
afterOrEq(java.util.function.Supplier<N> value)
Returns a condition checking if the node value is after or equals the supplier value.
|
StepCondition |
afterOrEq(TemporalCondition<N> value)
Returns a condition checking if the node value is after or equals the condition value.
|
NumericCondition<java.lang.Integer> |
ageAt(N value)
Returns a numeric condition that returns the age at the given value.
|
NumericCondition<java.lang.Integer> |
ageAt(java.util.function.Supplier<N> value)
Returns a numeric condition that returns the age of this node value at the given supplier value.
|
NumericCondition<java.lang.Integer> |
ageAt(TemporalCondition<N> value)
Returns a numeric condition that returns the age of this node value at the given condition value.
|
NumericCondition<java.lang.Integer> |
ageAt(TemporalFieldInfo<N> value)
Returns a numeric condition that returns the age of this node value at the given field value.
|
StepCondition |
before(N value)
Returns a condition checking if the node value is before the given value.
|
StepCondition |
before(java.util.function.Supplier<N> value)
Returns a condition checking if the node value is before the supplier value.
|
StepCondition |
before(TemporalCondition<N> value)
Returns a condition checking if the node value is before the condition value.
|
StepCondition |
before(TemporalFieldInfo<N> value)
Returns a condition checking if the node value is before the given field value.
|
StepCondition |
beforeOrEq(N value)
Returns a condition checking if the node value is before or equals the value.
|
StepCondition |
beforeOrEq(java.util.function.Supplier<N> value)
Returns a condition checking if the node value is before or equals the supplier value.
|
StepCondition |
beforeOrEq(TemporalCondition<N> value)
Returns a condition checking if the node value is before or equals the condition value.
|
StepCondition |
between(N minIncluded,
N maxExcluded)
Returns a condition checking if the node value is between the given min inclusive and max exclusive values.
|
StepCondition |
between(java.util.function.Supplier<N> minIncluded,
java.util.function.Supplier<N> maxExcluded)
Returns a condition checking if the node value is between the given min inclusive and max exclusive supplier
values.
|
StepCondition |
between(TemporalCondition<N> minIncluded,
TemporalCondition<N> maxExcluded)
Returns a condition checking if the node value is between the given min inclusive and max exclusive condition
values.
|
NumericCondition<java.lang.Integer> |
daysBetween(N value)
Returns a numeric condition that returns the days between this node value and the given value.
|
NumericCondition<java.lang.Integer> |
daysBetween(java.util.function.Supplier<N> value)
Returns a numeric condition that returns the days between this node value and the given supplier value.
|
NumericCondition<java.lang.Integer> |
daysBetween(TemporalCondition<N> value)
Returns a numeric condition that returns the days between this node value and the given condition value.
|
NumericCondition<java.lang.Integer> |
daysBetween(TemporalFieldInfo<N> value)
Returns a numeric condition that returns the days between this node value and the given field value.
|
StepCondition |
eq(TemporalCondition<N> value)
Returns a condition checking if the node value is equal to the given condition value.
|
PredicateMetadata |
getMetadata() |
TemporalCondition<N> |
minus(int value,
java.time.temporal.TemporalUnit unit)
Returns a temporal condition that returns the node value minus given temporal value and unit.
|
TemporalCondition<N> |
minus(NumericFieldInfo<java.lang.Integer> value,
java.time.temporal.TemporalUnit unit)
Returns a temporal condition that returns the node value minus given temporal field value and unit.
|
NumericCondition<java.lang.Integer> |
monthsBetween(N value)
Returns a numeric condition that returns the months between this node value and the given value.
|
NumericCondition<java.lang.Integer> |
monthsBetween(java.util.function.Supplier<N> value)
Returns a numeric condition that returns the months between this node value and the given supplier value.
|
NumericCondition<java.lang.Integer> |
monthsBetween(TemporalCondition<N> value)
Returns a numeric condition that returns the months between this node value and the given condition value.
|
NumericCondition<java.lang.Integer> |
monthsBetween(TemporalFieldInfo<N> value)
Returns a numeric condition that returns the months between this node value and the given field value.
|
StepCondition |
notBetween(N minIncluded,
N maxExcluded)
Returns a condition checking if the node value is not between the given min inclusive and max exclusive values.
|
StepCondition |
notBetween(java.util.function.Supplier<N> minIncluded,
java.util.function.Supplier<N> maxExcluded)
Returns a condition checking if the node value is not between the given min inclusive and max exclusive supplier
values.
|
StepCondition |
notBetween(TemporalCondition<N> minIncluded,
TemporalCondition<N> maxExcluded)
Returns a condition checking if the node value is not between the given min inclusive and max exclusive condition
values.
|
TemporalCondition<N> |
plus(int value,
java.time.temporal.TemporalUnit unit)
Returns a temporal condition that returns the node value plus given temporal value and unit.
|
TemporalCondition<N> |
plus(NumericFieldInfo<java.lang.Integer> value,
java.time.temporal.TemporalUnit unit)
Returns a temporal condition that returns the node value plus given temporal field value and unit.
|
protected StepCondition |
predicate(LeafMetadata metadata,
java.util.function.BiFunction<DslModel,Context,java.util.Optional<N>> value,
java.util.function.BiFunction<N,N,java.lang.Boolean> predicate) |
protected StepCondition |
predicate(LeafMetadata metadata,
java.util.function.Function<N,java.lang.Boolean> predicate) |
java.lang.String |
readable()
Returns the human readable version of this object.
|
protected java.util.Optional<N> |
value(DslModel model,
DslField field) |
protected java.util.Optional<N> |
valueModel(DslModel model,
DslField field) |
TemporalCondition<N> |
with(TemporalAdjuster adjuster)
Returns a temporal condition that returns the node value with given temporal adjuster applied.
|
NumericCondition<java.lang.Integer> |
yearsBetween(N value)
Returns a numeric condition that returns the years between this node value and the given value.
|
NumericCondition<java.lang.Integer> |
yearsBetween(java.util.function.Supplier<N> value)
Returns a numeric condition that returns the years between this node value and the given supplier value.
|
NumericCondition<java.lang.Integer> |
yearsBetween(TemporalCondition<N> value)
Returns a numeric condition that returns the years between this node value and the given condition value.
|
NumericCondition<java.lang.Integer> |
yearsBetween(TemporalFieldInfo<N> value)
Returns a numeric condition that returns the years between this node value and the given field value.
|
protected final DslField field
protected final PredicateMetadata metadata
public TemporalCondition(DslField field)
public TemporalCondition(DslField field, PredicateMetadata metadata, java.util.function.BiFunction<DslModel,Context,java.util.Optional<N>> value)
public final TemporalCondition<N> with(TemporalAdjuster adjuster)
adjuster - the adjusterpublic final TemporalCondition<N> minus(int value, java.time.temporal.TemporalUnit unit)
value - the minus valueunit - the minus unitpublic final TemporalCondition<N> minus(NumericFieldInfo<java.lang.Integer> value, java.time.temporal.TemporalUnit unit)
value - the minus field valueunit - the minus unitpublic final TemporalCondition<N> plus(int value, java.time.temporal.TemporalUnit unit)
value - the plus valueunit - the plus unitpublic final TemporalCondition<N> plus(NumericFieldInfo<java.lang.Integer> value, java.time.temporal.TemporalUnit unit)
value - the plus field valueunit - the plus unitpublic final StepCondition eq(TemporalCondition<N> value)
value - the right side valuepublic final StepCondition before(N value)
value - the right side valuepublic final StepCondition before(TemporalFieldInfo<N> value)
value - the right side valuepublic final StepCondition before(java.util.function.Supplier<N> value)
value - the right side valuepublic final StepCondition before(TemporalCondition<N> value)
value - the right side valuepublic final StepCondition beforeOrEq(N value)
value - the right side valuepublic final StepCondition beforeOrEq(java.util.function.Supplier<N> value)
value - the right side valuepublic final StepCondition beforeOrEq(TemporalCondition<N> value)
value - the right side valuepublic final StepCondition after(N value)
value - the right side valuepublic final StepCondition after(TemporalFieldInfo<N> value)
value - the right side valuepublic final StepCondition after(java.util.function.Supplier<N> value)
value - the right side valuepublic final StepCondition after(TemporalCondition<N> value)
value - the right side valuepublic final StepCondition afterOrEq(N value)
value - the right side valuepublic final StepCondition afterOrEq(java.util.function.Supplier<N> value)
value - the right side valuepublic final StepCondition afterOrEq(TemporalCondition<N> value)
value - the right side valuepublic final StepCondition between(N minIncluded, N maxExcluded)
minIncluded - the min value includedmaxExcluded - the max value excludedpublic final StepCondition between(java.util.function.Supplier<N> minIncluded, java.util.function.Supplier<N> maxExcluded)
minIncluded - the min value includedmaxExcluded - the max value excludedpublic final StepCondition between(TemporalCondition<N> minIncluded, TemporalCondition<N> maxExcluded)
minIncluded - the min value includedmaxExcluded - the max value excludedpublic final StepCondition notBetween(N minIncluded, N maxExcluded)
minIncluded - the min value includedmaxExcluded - the max value excludedpublic final StepCondition notBetween(java.util.function.Supplier<N> minIncluded, java.util.function.Supplier<N> maxExcluded)
minIncluded - the min value includedmaxExcluded - the max value excludedpublic final StepCondition notBetween(TemporalCondition<N> minIncluded, TemporalCondition<N> maxExcluded)
minIncluded - the min value includedmaxExcluded - the max value excludedpublic final NumericCondition<java.lang.Integer> ageAt(N value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> ageAt(TemporalFieldInfo<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> ageAt(TemporalCondition<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> ageAt(java.util.function.Supplier<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> daysBetween(N value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> daysBetween(TemporalFieldInfo<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> daysBetween(TemporalCondition<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> daysBetween(java.util.function.Supplier<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> monthsBetween(N value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> monthsBetween(TemporalFieldInfo<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> monthsBetween(TemporalCondition<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> monthsBetween(java.util.function.Supplier<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> yearsBetween(N value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> yearsBetween(TemporalFieldInfo<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> yearsBetween(TemporalCondition<N> value)
value - the right side valuepublic final NumericCondition<java.lang.Integer> yearsBetween(java.util.function.Supplier<N> value)
value - the right side valueprotected final StepCondition predicate(LeafMetadata metadata, java.util.function.Function<N,java.lang.Boolean> predicate)
protected final StepCondition predicate(LeafMetadata metadata, java.util.function.BiFunction<DslModel,Context,java.util.Optional<N>> value, java.util.function.BiFunction<N,N,java.lang.Boolean> predicate)
public PredicateMetadata getMetadata()