Class ContainerExtractorPath
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.extractor.mapping.programmatic.ContainerExtractorPath
-
public class ContainerExtractorPath extends Object
A chain ofcontainer 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 eitherbuilt-in
orregistered 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
- explicitly by their name, e.g.
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static ContainerExtractorPath
defaultExtractors()
boolean
equals(Object obj)
static ContainerExtractorPath
explicitExtractor(String extractorName)
List<String>
explicitExtractorNames()
static ContainerExtractorPath
explicitExtractors(List<String> extractorNames)
int
hashCode()
boolean
isDefault()
boolean
isEmpty()
static ContainerExtractorPath
noExtractors()
String
toString()
-
-
-
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.
-
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.
-
-