Class SessionBasedBridgeOperationContext
- java.lang.Object
-
- org.hibernate.search.mapper.pojo.bridge.runtime.impl.SessionBasedBridgeOperationContext
-
- All Implemented Interfaces:
IdentifierBridgeFromDocumentIdentifierContext,PropertyBridgeWriteContext,RoutingBridgeRouteContext,TypeBridgeWriteContext,ValueBridgeFromIndexedValueContext
public final class SessionBasedBridgeOperationContext extends Object implements IdentifierBridgeFromDocumentIdentifierContext, RoutingBridgeRouteContext, TypeBridgeWriteContext, PropertyBridgeWriteContext, ValueBridgeFromIndexedValueContext
A single implementation for all the bridge context interfaces that rely on the session context.We could split it into one class per interfaces, but currently we simply do not need to, since the only feature provided by each interface is an access to the extension. This might change in the future, though, which is why the interfaces themselves are split.
-
-
Constructor Summary
Constructors Constructor Description SessionBasedBridgeOperationContext(BridgeSessionContext sessionContext)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description <T> Textension(IdentifierBridgeFromDocumentIdentifierContextExtension<T> extension)Extend the current context with the given extension, resulting in an extended context offering more options.<T> Textension(PropertyBridgeWriteContextExtension<T> extension)Extend the current context with the given extension, resulting in an extended context offering more options.<T> Textension(RoutingBridgeRouteContextExtension<T> extension)Extend the current context with the given extension, resulting in an extended context offering more options.<T> Textension(TypeBridgeWriteContextExtension<T> extension)Extend the current context with the given extension, resulting in an extended context offering more options.<T> Textension(ValueBridgeFromIndexedValueContextExtension<T> extension)Extend the current context with the given extension, resulting in an extended context offering more options.StringtenantIdentifier()
-
-
-
Constructor Detail
-
SessionBasedBridgeOperationContext
public SessionBasedBridgeOperationContext(BridgeSessionContext sessionContext)
-
-
Method Detail
-
extension
public <T> T extension(IdentifierBridgeFromDocumentIdentifierContextExtension<T> extension)
Description copied from interface:IdentifierBridgeFromDocumentIdentifierContextExtend the current context with the given extension, resulting in an extended context offering more options.- Specified by:
extensionin interfaceIdentifierBridgeFromDocumentIdentifierContext- Type Parameters:
T- The type of context provided by the extension.- Parameters:
extension- The extension to apply.- Returns:
- The extended context.
-
tenantIdentifier
public String tenantIdentifier()
- Specified by:
tenantIdentifierin interfaceRoutingBridgeRouteContext- Returns:
- The tenant identifier currently in use (
nullif none).
-
extension
public <T> T extension(RoutingBridgeRouteContextExtension<T> extension)
Description copied from interface:RoutingBridgeRouteContextExtend the current context with the given extension, resulting in an extended context offering more options.- Specified by:
extensionin interfaceRoutingBridgeRouteContext- Type Parameters:
T- The type of context provided by the extension.- Parameters:
extension- The extension to apply.- Returns:
- The extended context.
-
extension
public <T> T extension(TypeBridgeWriteContextExtension<T> extension)
Description copied from interface:TypeBridgeWriteContextExtend the current context with the given extension, resulting in an extended context offering more options.- Specified by:
extensionin interfaceTypeBridgeWriteContext- Type Parameters:
T- The type of context provided by the extension.- Parameters:
extension- The extension to apply.- Returns:
- The extended context.
-
extension
public <T> T extension(PropertyBridgeWriteContextExtension<T> extension)
Description copied from interface:PropertyBridgeWriteContextExtend the current context with the given extension, resulting in an extended context offering more options.- Specified by:
extensionin interfacePropertyBridgeWriteContext- Type Parameters:
T- The type of context provided by the extension.- Parameters:
extension- The extension to apply.- Returns:
- The extended context.
-
extension
public <T> T extension(ValueBridgeFromIndexedValueContextExtension<T> extension)
Description copied from interface:ValueBridgeFromIndexedValueContextExtend the current context with the given extension, resulting in an extended context offering more options.- Specified by:
extensionin interfaceValueBridgeFromIndexedValueContext- Type Parameters:
T- The type of context provided by the extension.- Parameters:
extension- The extension to apply.- Returns:
- The extended context.
-
-