Annotation Type ContainerExtraction
-
@Documented @Target({}) @Retention(RUNTIME) public @interface ContainerExtraction
A definition of container value extractors to be applied to a property, allowing reference to a specific value of a container property.For instance, on a property of type
Map<EntityA, EntityB>
,@ContainerExtraction(@ContainerExtractor(BuiltinContainerExtractors.MAP_KEY))
would point to the map keys (of typeEntityA
), while@ContainerExtraction(@ContainerExtractor(BuiltinContainerExtractors.MAP_VALUE))
would point to the map values (of typeEntityB
).By default, if no attributes are set on this annotation, Hibernate Search will try to apply a set of extractors for common types (
Iterable
,Collection
,Optional
, ...) and use the first one that works. To prevent Hibernate Search from applying any extractor, use@ContainerExtraction(extract = ContainerExtract.NO)
-
-
Optional Element Summary
Optional Elements Modifier and Type Optional Element Description ContainerExtract
extract
String[]
value
-
-
-
Element Detail
-
extract
ContainerExtract extract
- Returns:
- Whether values are extracted from containers or not.
- See Also:
ContainerExtract
- Default:
- org.hibernate.search.mapper.pojo.extractor.mapping.annotation.ContainerExtract.DEFAULT
-
-
-
value
String[] value
- Returns:
- An array of container value extractor names.
Setting this together with
extract =
ContainerExtract.NO
will trigger an exception. - See Also:
BuiltinContainerExtractors
- Default:
- {}
-
-