Annotation Interface DateString


@Retention(RUNTIME) @Target(FIELD) @Inherited public @interface DateString
Indicates OGM to store dates as String in ISO_8601 format in the database. Applicable to `java.util.Date` and `java.time.Instant`
Author:
Vince Bickers, Gerrit Meier
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    Toggle lenient conversion mode by setting this flag to true (defaults to false).
     
    Some temporals like Instant, representing an instantaneous point in time cannot be formatted with a given ZoneId.
  • Field Summary

    Fields
    Modifier and Type
    Field
    Description
    static final String
     
    static final String
     
    static final String
     
  • Field Details

  • Element Details

    • value

      String value
      Default:
      "yyyy-MM-dd\'T\'HH:mm:ss.SSSXXX"
    • zoneId

      String zoneId
      Some temporals like Instant, representing an instantaneous point in time cannot be formatted with a given ZoneId. In case you want to format an instant or similar with a default pattern, we assume a zone with the given id and default to UTC which is the same assumption that the predefined patterns in DateTimeFormatter take.
      Returns:
      The zone id to use when applying a custom pattern to an instant temporal.
      Default:
      "UTC"
    • lenient

      boolean lenient
      Toggle lenient conversion mode by setting this flag to true (defaults to false). Has to be supported by the corresponding converter.
      Returns:
      flag that represents the desired conversion mode.
      Default:
      false