Class DefaultedZonedDateTimeTemporalQuery

java.lang.Object
de.xima.fc.utils.DefaultedZonedDateTimeTemporalQuery
All Implemented Interfaces:
TemporalQuery<ZonedDateTime>

public abstract class DefaultedZonedDateTimeTemporalQuery extends Object implements TemporalQuery<ZonedDateTime>
Enumeration of TemporalQuerys for a ZonedDateTime that defaults to a certain value when a TemporalField is missing in the TemporalAccessor.
Since:
7.0.0
Author:
XIMA MEDIA GmbH
  • Field Details

    • SYSTEM_ZONE_CURRENT_DATE_MIDNIGHT

      public static final DefaultedZonedDateTimeTemporalQuery SYSTEM_ZONE_CURRENT_DATE_MIDNIGHT
      Defaults to the system time zone, the current date (now), and midnight (00:00 o'clock) when a temporal field is missing.
  • Method Details

    • queryFrom

      public ZonedDateTime queryFrom(TemporalAccessor temporal)
      Specified by:
      queryFrom in interface TemporalQuery<ZonedDateTime>
    • withClock

      public DefaultedZonedDateTimeTemporalQuery withClock(Clock clockOverride)
      Returns a new instance with the same behavior defaults as this, but with the given clock used when querying for the current time.
      Parameters:
      clockOverride - Clock to use.
      Returns:
      A new instance with the same behavior defaults as this, but with the given clock used when querying for the current time.
    • getDefaultLocalDate

      protected abstract LocalDate getDefaultLocalDate(Clock clock, ZoneId zone)
    • getDefaultLocalTime

      protected abstract LocalTime getDefaultLocalTime(Clock clock, ZoneId zone)
    • getDefaultZoneId

      protected abstract ZoneId getDefaultZoneId(Clock clock)