Annotation Type DateBridge


@Retention(RUNTIME) @Target({FIELD,METHOD}) @Documented @Deprecated public @interface DateBridge
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 java.util.Date field.

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

Author:
Emmanuel Bernard
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Deprecated.
     
  • Element Details

    • resolution

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