Class PojoModelPath.Builder

java.lang.Object
org.hibernate.search.mapper.pojo.model.path.PojoModelPath.Builder
Enclosing class:
PojoModelPath

public static class PojoModelPath.Builder extends Object
  • Method Details

    • property

      public PojoModelPath.Builder property(String propertyName)
      Append to the path an access the property with the given name.
      Parameters:
      propertyName - The name of the property to access.
      Returns:
      this, for method chaining.
      Throws:
      org.hibernate.search.util.common.SearchException - If no property name was previously given.
    • value

      public PojoModelPath.Builder value(ContainerExtractorPath extractorPath)
      Append to the path a value extraction using the given container extractor path.
      Parameters:
      extractorPath - The container extractors to apply, as a ContainerExtractorPath.
      Returns:
      this, for method chaining.
      Throws:
      org.hibernate.search.util.common.SearchException - If no property name was previously given.
    • value

      public PojoModelPath.Builder value(String extractorName)
      Append to the path a value extraction using the given container extractor.

      Multiple value(String) calls can be chained to apply multiple extractors.

      Parameters:
      extractorName - The name of the container extractor to apply.
      Returns:
      this, for method chaining.
      Throws:
      org.hibernate.search.util.common.SearchException - If no property name was previously given.
      See Also:
    • valueWithoutExtractors

      public PojoModelPath.Builder valueWithoutExtractors()
      Append to the path a direct value extraction, not using any container extractors.
      Returns:
      this, for method chaining.
      Throws:
      org.hibernate.search.util.common.SearchException - If no property name was previously given.
    • valueWithDefaultExtractors

      public PojoModelPath.Builder valueWithDefaultExtractors()
      Append to the path a value extraction using the default container extractors.
      Returns:
      this, for method chaining.
      Throws:
      org.hibernate.search.util.common.SearchException - If no property name was previously given.
    • toPropertyPath

      public PojoModelPathPropertyNode toPropertyPath()
      Returns:
      A PojoModelPathPropertyNode built from the given components.
      Throws:
      org.hibernate.search.util.common.SearchException - If no initial property name was given.
    • toPropertyPathOrNull

      public PojoModelPathPropertyNode toPropertyPathOrNull()
      Returns:
      A PojoModelPathPropertyNode built from the given components, or null if no information was added to this builder.
    • toValuePath

      public PojoModelPathValueNode toValuePath()
      Returns:
      A PojoModelPathValueNode built from the given components.
      Throws:
      org.hibernate.search.util.common.SearchException - If no initial property name was given.
    • toValuePathOrNull

      public PojoModelPathValueNode toValuePathOrNull()
      Returns:
      A PojoModelPathValueNode built from the given components, or null if no information was added to this builder.