Class BeanDelegatingBinder

java.lang.Object
org.hibernate.search.mapper.pojo.bridge.mapping.impl.BeanDelegatingBinder
All Implemented Interfaces:
IdentifierBinder, MarkerBinder, PropertyBinder, RoutingBinder, TypeBinder, ValueBinder

public final class BeanDelegatingBinder extends Object implements TypeBinder, PropertyBinder, RoutingBinder, MarkerBinder, IdentifierBinder, ValueBinder
A binder that upon building retrieves a delegate binder from the bean provider, then delegates to that binder.
  • Constructor Details

    • BeanDelegatingBinder

      public BeanDelegatingBinder(BeanReference<?> delegateReference)
  • Method Details

    • toString

      public String toString()
      Overrides:
      toString in class Object
    • bind

      public void bind(TypeBindingContext context)
      Description copied from interface: TypeBinder
      Binds a type to index fields.

      The context passed in parameter provides various information about the type being bound. Implementations are expected to take advantage of that information and to call one of the bridge(...) methods on the context to set the bridge.

      Implementations are also expected to declare dependencies, i.e. the properties that will later be used in the TypeBridge.write(DocumentElement, Object, TypeBridgeWriteContext) method, using TypeBindingContext.dependencies(). Failing that, Hibernate Search will not reindex entities properly when an indexed property is modified.

      Specified by:
      bind in interface TypeBinder
      Parameters:
      context - A context object providing information about the type being bound, and expecting a call to one of its bridge(...) methods.
    • bind

      public void bind(PropertyBindingContext context)
      Description copied from interface: PropertyBinder
      Binds a property to index fields.

      The context passed in parameter provides various information about the property being bound. Implementations are expected to take advantage of that information and to call one of the bridge(...) methods on the context to set the bridge.

      Implementations are also expected to declare dependencies, i.e. the properties that will later be used in the PropertyBridge.write(DocumentElement, Object, PropertyBridgeWriteContext) method, using PropertyBindingContext.dependencies(). Failing that, Hibernate Search will not reindex entities properly when an indexed property is modified.

      Specified by:
      bind in interface PropertyBinder
      Parameters:
      context - A context object providing information about the property being bound, and expecting a call to one of its bridge(...) methods.
    • bind

      public void bind(RoutingBindingContext context)
      Description copied from interface: RoutingBinder
      Configure the mapping of an indexed entity to an index as necessary using the given context.
      Specified by:
      bind in interface RoutingBinder
      Parameters:
      context - A context exposing methods to configure the mapping.
    • bind

      public void bind(MarkerBindingContext context)
      Description copied from interface: MarkerBinder
      Binds a marker to a POJO property.

      Implementations are to call one of the marker(...) methods on the context to set the marker.

      Specified by:
      bind in interface MarkerBinder
      Parameters:
      context - A context object expecting a call to one of its marker(...) methods.
    • bind

      public void bind(IdentifierBindingContext<?> context)
      Description copied from interface: IdentifierBinder
      Binds a POJO property to a document identifier.

      The context passed in parameter provides various information about the identifier being bound. Implementations are expected to take advantage of that information and to call one of the bridge(...) methods on the context to set the bridge.

      Specified by:
      bind in interface IdentifierBinder
      Parameters:
      context - A context object providing information about the identifier being bound, and expecting a call to one of its bridge(...) methods.
    • bind

      public void bind(ValueBindingContext<?> context)
      Description copied from interface: ValueBinder
      Binds a value to an index field.

      The context passed in parameter provides various information about the value being bound. Implementations are expected to take advantage of that information and to call one of the bridge(...) methods on the context to set the bridge.

      Specified by:
      bind in interface ValueBinder
      Parameters:
      context - A context object providing information about the value being bound, and expecting a call to one of its bridge(...) methods.