Class ContainerExtractorPath


  • public class ContainerExtractorPath
    extends Object
    A chain of container extractors to be applied one after the other to a property value, in order to extract other values.

    The extractors are either represented:

    • explicitly by their name, e.g. ["map-values", "collection"], meaning "apply the 'map-values' extractor to the property value, then apply the 'collection' extractor to the map values". Names are either built-in or registered at bootstrap.
    • or simply by the "default" path (defaultExtractors()), which means "whatever default Hibernate Search manages to apply using its internal extractor resolution algorithm". This second form may result in different "resolved" paths depending on the type of the property it is applied to.
    See Also:
    ContainerExtractor, BuiltinContainerExtractors
    • Method Detail

      • defaultExtractors

        public static ContainerExtractorPath defaultExtractors()
        Returns:
        A path that will apply the default extractor(s) based on the property type.
      • noExtractors

        public static ContainerExtractorPath noExtractors()
        Returns:
        A path that will not apply any container extractor.
      • explicitExtractor

        public static ContainerExtractorPath explicitExtractor​(String extractorName)
        Parameters:
        extractorName - A container extractor referenced by its name.
        Returns:
        A path that will apply the referenced container extractor.
        See Also:
        BuiltinContainerExtractors
      • explicitExtractors

        public static ContainerExtractorPath explicitExtractors​(List<String> extractorNames)
        Parameters:
        extractorNames - A list of container extractors referenced by their name.
        Returns:
        A path that will apply the referenced container extractors in order.
      • hashCode

        public int hashCode()
        Overrides:
        hashCode in class Object
      • isDefault

        public boolean isDefault()
        Returns:
        true if this path represents the default extractor(s), which will be determined automatically based on the property type. false otherwise.
      • isEmpty

        public boolean isEmpty()
        Returns:
        true if this path is empty, i.e. it represents direct access to the property value. false otherwise.
      • explicitExtractorNames

        public List<String> explicitExtractorNames()
        Returns:
        The list of extractor names explicitly referenced by this path. Empty if this path represents the default extractor(s).