Interface RoutingKeyBridge
-
- All Superinterfaces:
AutoCloseable
@Deprecated public interface RoutingKeyBridge extends AutoCloseable
Deprecated.ImplementRoutingBridgeinstead. See the reference documentation for how to implement it and use it.A bridge from a POJO entity to a document routing key.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Deprecated Methods Modifier and Type Method Description default voidclose()Deprecated.Close any resource before the bridge is discarded.StringtoRoutingKey(String tenantIdentifier, Object entityIdentifier, Object bridgedElement, RoutingKeyBridgeToRoutingKeyContext context)Deprecated.Generate a routing key using the giventenantIdentifier,entityIdentifierandbridgedElementas input and transforming them as necessary.
-
-
-
Method Detail
-
toRoutingKey
String toRoutingKey(String tenantIdentifier, Object entityIdentifier, Object bridgedElement, RoutingKeyBridgeToRoutingKeyContext context)
Deprecated.Generate a routing key using the giventenantIdentifier,entityIdentifierandbridgedElementas input and transforming them as necessary.Warning: Reading from
bridgedElementshould be done with care. Any read that was not declared duringbinding(by declaring dependencies usingRoutingKeyBindingContext.dependencies()or (advanced use) creating an accessor usingRoutingKeyBindingContext.bridgedElement()) may lead to out-of-sync indexes, because Hibernate Search will consider the read property irrelevant to indexing and will not reindex entities when that property changes.- Parameters:
tenantIdentifier- The tenant identifier currently in use (nullif none).entityIdentifier- The value of the POJO property used to generate the document identifier, i.e. the same value that was passed toIdentifierBridge.toDocumentIdentifier(Object, org.hibernate.search.mapper.pojo.bridge.runtime.IdentifierBridgeToDocumentIdentifierContext).bridgedElement- The element this bridge is applied to, from which data should be read.context- A context that can beextendedto a more useful type, giving access to such things as a Hibernate ORM Session (if using the Hibernate ORM mapper).- Returns:
- The resulting routing key. Never null.
-
close
default void close()
Deprecated.Close any resource before the bridge is discarded.- Specified by:
closein interfaceAutoCloseable
-
-