public interface PojoTypeIndexingDependencyConfigurationContext
| Modifier and Type | Method and Description |
|---|---|
PojoOtherEntityIndexingDependencyConfigurationContext |
fromOtherEntity(Class<?> otherEntityType,
PojoModelPathValueNode pathFromOtherEntityTypeToBridgedType)
Start the declaration of dependencies to properties of another entity,
without specifying the path to that other entity.
|
default PojoOtherEntityIndexingDependencyConfigurationContext |
fromOtherEntity(Class<?> otherEntityType,
String pathFromOtherEntityTypeToBridgedType)
Start the declaration of dependencies to properties of another entity,
without specifying the path to that other entity.
|
PojoTypeIndexingDependencyConfigurationContext |
use(PojoModelPathValueNode pathFromBridgedTypeToUsedValue)
Declare that the given path is read by the bridge at index time to populate the indexed document.
|
default PojoTypeIndexingDependencyConfigurationContext |
use(String pathFromBridgedTypeToUsedValue)
Declare that the given path is read by the bridge at index time to populate the indexed document.
|
void |
useRootOnly()
Declare that the bridge will only use the type directly,
and will not access any mutable property.
|
void useRootOnly()
This is unusual, and generally only possible for bridges that are applied to immutable types (String, an enum, ...),
or that do not rely on the bridged element at all (constant bridges, bridges adding the last indexing date, ...).
Note that calling this method prevents from declaring any other dependency, and trying to do so will trigger an exception.
default PojoTypeIndexingDependencyConfigurationContext use(String pathFromBridgedTypeToUsedValue)
pathFromBridgedTypeToUsedValue - The path from the bridged type to the value used by the bridge,
as a String. The string is interpreted with default value extractors: see PojoModelPath.parse(String).this, for method chaining.org.hibernate.search.util.common.SearchException - If the given path cannot be applied to the bridged type.use(PojoModelPathValueNode)PojoTypeIndexingDependencyConfigurationContext use(PojoModelPathValueNode pathFromBridgedTypeToUsedValue)
Every component of this path will be considered as a dependency,
so it is not necessary to call this method for every subpath.
In other words, if the path "myProperty.someOtherPropety" is declared as used,
Hibernate Search will automatically assume that "myProperty" is also used.
pathFromBridgedTypeToUsedValue - The path from the bridged type to the value used by the bridge.this, for method chaining.org.hibernate.search.util.common.SearchException - If the given path cannot be applied to the bridged type.default PojoOtherEntityIndexingDependencyConfigurationContext fromOtherEntity(Class<?> otherEntityType, String pathFromOtherEntityTypeToBridgedType)
Note: this is only useful when the path from the bridged type to that other entity
cannot be easily represented, but the inverse path can.
For almost all use cases, this method won't be useful and calling use(String) will be enough.
otherEntityType - The raw type of the other entity.pathFromOtherEntityTypeToBridgedType - The path from the other entity type to the bridged type,
as a String. The string is interpreted with default value extractors: see PojoModelPath.parse(String).
Used when the other entity changes, to collect the instances that must be reindexed.org.hibernate.search.util.common.SearchException - If the bridged type is not an entity type,
or the given type is not an entity type,
or the given path cannot be applied to the given entity type.PojoOtherEntityIndexingDependencyConfigurationContext fromOtherEntity(Class<?> otherEntityType, PojoModelPathValueNode pathFromOtherEntityTypeToBridgedType)
Note: this is only useful when the path from the bridged type to that other entity
cannot be easily represented, but the inverse path can.
For almost all use cases, this method won't be useful and calling use(PojoModelPathValueNode) will be enough.
otherEntityType - The raw type of the other entity.pathFromOtherEntityTypeToBridgedType - The path from the other entity type to the bridged type.
Used when the other entity changes, to collect the instances that must be reindexed.org.hibernate.search.util.common.SearchException - If the bridged type is not an entity type,
or the given type is not an entity type,
or the given path cannot be applied to the given entity type.Copyright © 2006-2020 Red Hat, Inc. and others. Licensed under the GNU Lesser General Public License (LGPL), version 2.1 or later.