@Documented @Target(value={}) @Retention(value=RUNTIME) public @interface ContainerExtraction
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)
| Modifier and Type | Optional Element and Description |
|---|---|
ContainerExtract |
extract |
String[] |
value |
public abstract ContainerExtract extract
ContainerExtractpublic abstract String[] value
extract = ContainerExtract.NO will trigger an exception.BuiltinContainerExtractorsCopyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.