Class PojoModelPath
java.lang.Object
org.hibernate.search.mapper.pojo.model.path.PojoModelPath
- Direct Known Subclasses:
PojoModelPathPropertyNode,PojoModelPathValueNode
Represents an arbitrarily long access path when walking the POJO model.
For instance the path could be:
property "propertyOfA" => extractor "MapValueExtractor" => property "propertyOfB"
Meaning: extract property "propertyOfA", then extract values using "MapValueExtractor",
then for each value extract property "propertyOfB".
-
Nested Class Summary
Nested Classes -
Field Summary
Fields -
Method Summary
Modifier and TypeMethodDescriptionstatic PojoModelPath.Builderbuilder()static PojoModelPathPropertyNodeofProperty(String propertyName) static PojoModelPathValueNodestatic PojoModelPathValueNodeofValue(String propertyName, ContainerExtractorPath extractorPath) abstract PojoModelPathparent()static PojoModelPathValueNodefinal StringtoString()
-
Field Details
-
DOT_PATTERN
-
-
Method Details
-
builder
- Returns:
- A builder allowing to create a
PojoModelPathby specifying its components (property, container extractors) one by one.
-
ofProperty
- Parameters:
propertyName- The name of a POJO property.- Returns:
- A path from a POJO to the property with the given name.
-
ofValue
- Parameters:
propertyName- The name of a POJO property.- Returns:
- A
PojoModelPathfrom a POJO to the value(s) of the property with the given name. Default container extractors are applied to the property, so that for example a path to a List property will in fact point to the elements of that list.
-
ofValue
public static PojoModelPathValueNode ofValue(String propertyName, ContainerExtractorPath extractorPath) - Parameters:
propertyName- The name of a POJO property.extractorPath- A container extractor path.- Returns:
- A
PojoModelPathfrom a POJO to the value(s) of the property with the given name. The extractors represented by the given extractor path are applied to the property, so that for example a path to a List property may in fact point to the elements of that list.
-
parse
- Parameters:
dotSeparatedPath- A dot-separated path, such as"myProperty.someNestedProperty".- Returns:
- A
PojoModelPathrepresenting the same path, which the default container extractors applied to each property, so that for example a path to a List property will in fact point to the elements of that list.
-
toString
-
toPathString
- Returns:
- A representation of this path in the form
propertyA<containerExtractorPathA>.propertyB<containerExtractorPathB>.propertyC<containerExtractorPathB>.
-
parent
- Returns:
- The model path to the element from which the value represented by this node is extracted.
May be
null.
-