Interface DateValued

All Superinterfaces:
ScalarTyped, ScalarValued, TokenTyped, TokenValued
All Known Subinterfaces:
DateInputField, DateValuedIterator
All Known Implementing Classes:
DateRegister, DateToken, DateTokenConverter, NullToken

public interface DateValued extends ScalarValued
A TokenValued object containing a date value.
See Also:
  • Method Summary

    Modifier and Type
    Method
    Description
    Gets the contained date value.
    Deprecated.
    since 6.1; use asCalendarDate() instead to obtain an object representation of the contained value.
    asDate(ZoneId zoneId)
    Deprecated.
    since 6.1; use asCalendarDate() instead to obtain an object representation of the contained value.
    long
    Gets the contained date value as the number of days since Java epoch (January 1, 1970).

    Methods inherited from interface com.pervasive.datarush.tokens.scalar.ScalarValued

    getType, isZero

    Methods inherited from interface com.pervasive.datarush.tokens.TokenValued

    isNull
  • Method Details

    • asDate

      @Deprecated Date asDate()
      Deprecated.
      since 6.1; use asCalendarDate() instead to obtain an object representation of the contained value.
      Gets the contained date value as a java.sql.Date relative to the default time zone. The time zone id used by {@link ZoneId.systemDefault()} is used.
      Returns:
      the contained value as a java.sql.Date. If null valued, as indicated by TokenValued.isNull(), null is returned.
    • asDate

      @Deprecated Date asDate(ZoneId zoneId)
      Deprecated.
      since 6.1; use asCalendarDate() instead to obtain an object representation of the contained value.
      Gets the contained date value as a java.sql.Date relative to the given time zone.
      Parameters:
      zoneId - the time zone id in which to interpret the date
      Returns:
      the contained value as a java.sql.Date. If null valued, as indicated by TokenValued.isNull(), null is returned.
    • asEpochDays

      long asEpochDays()
      Gets the contained date value as the number of days since Java epoch (January 1, 1970).
      Returns:
      the contained value as days since Java epoch. If null valued, as indicated by TokenValued.isNull(), 0 is returned.
    • asCalendarDate

      CalendarDate asCalendarDate()
      Gets the contained date value. This value represents the timezone free date portion of a timestamp.
      Returns:
      the contained value as a calendar date. If null valued, as indicated by TokenValued.isNull(), null is returned.