Annotation Type CalendarBridge


  • @Retention(RUNTIME)
    @Target({FIELD,METHOD})
    @Documented
    @Deprecated
    public @interface CalendarBridge
    Deprecated.
    DateBridge/CalendarBridge are no longer available in Hibernate Search 6. If you cannot move your properties to Java 8 date/time types, implement your own bridge and apply it with GenericField.valueBridge(). If you can move your properties to Java 8 date/time types, do so, remove this annotation and replace Field with GenericField. Then, either use a Java type with the appropriate resolution (LocalDate, ...) and match predicates, or use a type with more resolution than necessary but rely on range predicates (e.g. f.range().field("myField").between(LocalDate.now().atStartOfDay(), LocalDate.now().plusDays(1).atStartOfDay()) for a "day" resolution on a LocalDateTime field).
    Defines the temporal resolution and encoding type of a Calendar field.

    Note: Dates are encoded in the GMT/UTC time zone.

    Author:
    Amin Mohammed-Coleman
    • Required Element Summary

      Required Elements 
      Modifier and Type Required Element Description
      Resolution resolution
      Deprecated.
       
    • Element Detail

      • resolution

        Resolution resolution
        Deprecated.
        Returns:
        the resolution for the annotated Calendar instance. The date of the calendar will be rounded to the specified resolution.