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 Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description PojoModelPath.Builder
property(String propertyName)
Append to the path an access the property with the given name.PojoModelPathPropertyNode
toPropertyPath()
PojoModelPathPropertyNode
toPropertyPathOrNull()
PojoModelPathValueNode
toValuePath()
PojoModelPathValueNode
toValuePathOrNull()
PojoModelPath.Builder
value(String extractorName)
Append to the path a value extraction using the given container extractor.PojoModelPath.Builder
value(ContainerExtractorPath extractorPath)
Append to the path a value extraction using the given container extractor path.PojoModelPath.Builder
valueWithDefaultExtractors()
Append to the path a value extraction using the default container extractors.PojoModelPath.Builder
valueWithoutExtractors()
Append to the path a direct value extraction, not using any container extractors.
-
-
-
Method Detail
-
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:
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 aContainerExtractorPath
.- Returns:
this
, for method chaining.- Throws:
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:
SearchException
- If no property name was previously given.- See Also:
BuiltinContainerExtractors
-
valueWithoutExtractors
public PojoModelPath.Builder valueWithoutExtractors()
Append to the path a direct value extraction, not using any container extractors.- Returns:
this
, for method chaining.- Throws:
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:
SearchException
- If no property name was previously given.
-
toPropertyPath
public PojoModelPathPropertyNode toPropertyPath()
- Returns:
- A
PojoModelPathPropertyNode
built from the given components. - Throws:
SearchException
- If no initial property name was given.
-
toPropertyPathOrNull
public PojoModelPathPropertyNode toPropertyPathOrNull()
- Returns:
- A
PojoModelPathPropertyNode
built from the given components, ornull
if no information was added to this builder.
-
toValuePath
public PojoModelPathValueNode toValuePath()
- Returns:
- A
PojoModelPathValueNode
built from the given components. - Throws:
SearchException
- If no initial property name was given.
-
toValuePathOrNull
public PojoModelPathValueNode toValuePathOrNull()
- Returns:
- A
PojoModelPathValueNode
built from the given components, ornull
if no information was added to this builder.
-
-