Created on 9/07/2005
Base class for properties with a DATE or DATE-TIME value. Note that some sub-classes may only allow either a DATE or
a DATE-TIME value, for which additional rules/validation should be specified.
Note that generics have been introduced as part of the migration to the new Java Date/Time API.
Date properties should now indicate the applicable Temporal type for the property.
For example:
java.time.Instant to represent UTC timejava.time.LocalDate to represent a date valuejava.time.ZonedDateTime to represent a date-time value influenced by timezone rules| Modifier and Type | Field and Description |
|---|---|
| private TemporalAdapter | |
| private ZoneId | |
| private final Value | |
| private final CalendarDateFormat | |
| private static final long | |
| private transient TimeZoneRegistry |
| Access | Constructor and Description |
|---|---|
| public | DateProperty(final String
the property name name, final ParameterList a list of initial parameters parameters)
|
| public | DateProperty(final String name, final ParameterList parameters, CalendarDateFormat parseFormat, Value defaultValueParam)
|
| public | DateProperty(final Enum<?> name, final ParameterList parameters, CalendarDateFormat parseFormat, Value defaultValueParam)
|
| public | |
| public | |
| public | DateProperty(final Enum<?>
an enum representing a property name name, CalendarDateFormat parseFormat, Value defaultValueParam)
|
| Modifier and Type | Method and Description |
|---|---|
| public int | compareTo(@NotNull Property
the object to be compared. o)Implements java. Compares this object with the specified object for order. |
| public T | |
| public String | |
| public int | hashCode()
Overrides net. Returns a hash code value for this object. |
| public final boolean | Returns: true if the property is in UTC time, otherwise falseIndicates whether the current date value is specified in UTC time. |
| public void | refreshParameters()
Sometimes following a value update the |
| public void | |
| public void | setDefaultTimeZone(ZoneId
a timezone identifier defaultTimeZone)A default timezone may be specified for interpreting floating DATE-TIME values. |
| public void | |
| public void | setValue(final String
a string representation of a DATE or DATE-TIME value value)Implements abstract net. Default setValue() implementation. |
| private boolean | |
| public ValidationResult | validate()
Implements abstract net. Perform validation on a property. |
| date | back to summary |
|---|---|
| private TemporalAdapter<T> date | |
| defaultTimeZone | back to summary |
|---|---|
| private ZoneId defaultTimeZone | |
| defaultValueParam | back to summary |
|---|---|
| private final Value defaultValueParam | |
| parseFormat | back to summary |
|---|---|
| private final CalendarDateFormat parseFormat | |
| serialVersionUID | back to summary |
|---|---|
| private static final long serialVersionUID | |
| timeZoneRegistry | back to summary |
|---|---|
| private transient TimeZoneRegistry timeZoneRegistry | |
| DateProperty | back to summary |
|---|---|
public DateProperty(final String name, final ParameterList parameters)
| |
| DateProperty | back to summary |
|---|---|
| public DateProperty(final String name, final ParameterList parameters, CalendarDateFormat parseFormat, Value defaultValueParam) | |
| DateProperty | back to summary |
|---|---|
| public DateProperty(final Enum<?> name, final ParameterList parameters, CalendarDateFormat parseFormat, Value defaultValueParam) | |
| DateProperty | back to summary |
|---|---|
public DateProperty(final String name)
| |
| DateProperty | back to summary |
|---|---|
| public DateProperty(final String name, CalendarDateFormat parseFormat, Value defaultValueParam) | |
| DateProperty | back to summary |
|---|---|
public DateProperty(final Enum<?> name, CalendarDateFormat parseFormat, Value defaultValueParam)
| |
| compareTo | back to summary |
|---|---|
| public int compareTo(@NotNull Property o) Implements java. Doc from java. Compares this object with the specified object for order. Returns a negative integer, zero, or a positive integer as this object is less than, equal to, or greater than the specified object. The implementor must ensure The implementor must also ensure that the relation is transitive:
Finally, the implementor must ensure that | |
| getDate | back to summary |
|---|---|
| public T getDate() This method will attempt to dynamically cast the internal
| |
| getValue | back to summary |
|---|---|
| public String getValue() Implements abstract net.
| |
| hashCode | back to summary |
|---|---|
| public int hashCode() Overrides net. Doc from net. Returns a hash code value for this object. This method is
supported for the benefit of hash tables such as those provided by
The general contract of
| |
| isUtc | back to summary |
|---|---|
| public final boolean isUtc() Indicates whether the current date value is specified in UTC time.
| |
| refreshParameters | back to summary |
|---|---|
| public void refreshParameters() Sometimes following a value update the | |
| setDate | back to summary |
|---|---|
| public void setDate(T date) Sets the date value of this property. The timezone and value of this instance will also be updated accordingly.
| |
| setDefaultTimeZone | back to summary |
|---|---|
| public void setDefaultTimeZone(ZoneId defaultTimeZone) A default timezone may be specified for interpreting floating DATE-TIME values. In the absence of a default timezone the system default timezone will be used.
| |
| setTimeZoneRegistry | back to summary |
|---|---|
| public void setTimeZoneRegistry(TimeZoneRegistry timeZoneRegistry) | |
| setValue | back to summary |
|---|---|
| public void setValue(final String value) throws DateTimeParseException Implements abstract net. Default setValue() implementation. Allows for either DATE or DATE-TIME values.
Note that this method will use the system default zone rules to parse the string value. For parsing string
values in a different timezone use
| |
| shouldApplyTimezone | back to summary |
|---|---|
| private boolean shouldApplyTimezone() | |
| validate | back to summary |
|---|---|
| public ValidationResult validate() throws ValidationException Implements abstract net. Doc from net. Perform validation on a property.
| |