Package overit.geocall.model.date
Class DateTimeRange
java.lang.Object
overit.geocall.model.DynO
overit.geocall.model.date.DateTimeRange
- All Implemented Interfaces:
ConstraintValidator<DynO.Valid,,DynO> Serializable,JacksonMapConvertible,overit.geocall.timezone.model.TimeZoned
This object allows to specify a range between two
Date.- See Also:
-
Nested Class Summary
Nested classes/interfaces inherited from class overit.geocall.model.DynO
DynO.SpanFields, DynO.SpanTable, DynO.Valid -
Constructor Summary
ConstructorsConstructorDescriptionCreate a new empty range instanceDateTimeRange(Date from, Date to) Create a new range instance. -
Method Summary
Modifier and TypeMethodDescriptionExtract the current instance values into aMapgetFrom()getTo()voidtransferValues(@NotNull BeanPropertyDefinition field, @NotNull Map<String, Object> values, boolean nullValues) Move values from the passed Map into the current instance.Methods inherited from class overit.geocall.model.DynO
addExtension, extract, extract, fields, from, from, getCriteria, getCriteriaNotExploded, getExtension, getFakeFilter, getUnknownAttributes, getUnknownCriteria, getVariant, getZone, insert, insert, isValid, make, removeCriteria, removeExtensionAttribute, setCriteria, setCriteriaNotExploded, setExtension, setFakeFilter, setUnknownAttributes, setUnknownCriteria, setVariant, setZone, toFlatMap, toFlatMap, toMap, toMap, toString, update, validateMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, waitMethods inherited from interface jakarta.validation.ConstraintValidator
initializeMethods inherited from interface overit.geocall.timezone.model.TimeZoned
hasZone
-
Constructor Details
-
DateTimeRange
public DateTimeRange()Create a new empty range instance -
DateTimeRange
Create a new range instance.- Parameters:
from- range startto- range end- Throws:
IllegalArgumentException- if both arguments are valued but from is later than to
-
-
Method Details
-
getFrom
- Returns:
- the range start or
nullif not specified
-
getTo
- Returns:
- the range end or
nullif not specified
-
extractValues
Description copied from interface:JacksonMapConvertibleExtract the current instance values into aMap- Specified by:
extractValuesin interfaceJacksonMapConvertible- Parameters:
field- field reference from which the values should be extracted- Returns:
- a
Mapcontaining all the instance values
-
transferValues
public void transferValues(@NotNull @NotNull BeanPropertyDefinition field, @NotNull @NotNull Map<String, Object> values, boolean nullValues) Description copied from interface:JacksonMapConvertibleMove values from the passed Map into the current instance.Implementations should remove the moved values from the passed map to avoid any re-usage of that value
- Specified by:
transferValuesin interfaceJacksonMapConvertible- Parameters:
field- field reference to which the values should be addedvalues-Mapcontaining all the values that should be added to the current instancenullValues- specify if the null values should be filtered or not
-