Annotation Type TimeZoneStorage


  • @Retention(RUNTIME)
    @Target({FIELD,METHOD})
    public @interface TimeZoneStorage
    Specifies how the time zone information of a persistent property or field should be persisted. The TimeZoneStorage annotation may be used in conjunction with the Basic annotation, or in conjunction with the ElementCollection annotation when the element collection value is of basic type. If the TimeZoneStorage annotation is not used, the TimeZoneStorageType value is assumed to be NORMALIZED.
       Example:
    
       @Entity public class Person {
           public OffsetDateTime getBirthDateTimeNormalized() {...}
    
           @TimeZoneStorage
           @TimeZoneColumn(column = @Column(...))
           public OffsetDateTime getBirthDateTimeNativeOrColumn() {...}
           ...
       }
     
    See Also:
    TimeZoneColumn
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      TimeZoneStorageType value
      The storage strategy for the time zone information.
    • Element Detail

      • value

        TimeZoneStorageType value
        The storage strategy for the time zone information.
        Default:
        org.hibernate.annotations.TimeZoneStorageType.AUTO