Annotation Type 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 type EntityA
),
while @ContainerExtraction(@ContainerExtractor(BuiltinContainerExtractors.MAP_VALUE))
would point to the map values (of type EntityB
).
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
-
Element Details
-
extract
ContainerExtract extract- Returns:
- Whether values are extracted from containers or not.
- See Also:
- Default:
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:
- Default:
{}
-