Package org.hibernate.search.annotations
Annotation Type CalendarBridge
@Retention(RUNTIME)
@Target({FIELD,METHOD})
@Documented
@Deprecated
public @interface CalendarBridge
Deprecated.
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
-
Element Details
-
resolution
Resolution resolutionDeprecated.- Returns:
- the resolution for the annotated
Calendarinstance. The date of the calendar will be rounded to the specified resolution.
-
DateBridge/CalendarBridgeare 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 withGenericField.valueBridge(). If you can move your properties to Java 8 date/time types, do so, remove this annotation and replaceFieldwithGenericField. Then, either use a Java type with the appropriate resolution (LocalDate, ...) andmatchpredicates, 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 aLocalDateTimefield).