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 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)

    • 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