Class ValueBindingContextImpl<V>

    • Method Detail

      • bridge

        public <V2,​F> void bridge​(Class<V2> expectedValueType,
                                        ValueBridge<V2,​F> bridge)
        Description copied from interface: ValueBindingContext
        Sets the bridge implementing the value/index binding.
        Specified by:
        bridge in interface ValueBindingContext<V>
        Type Parameters:
        V2 - The type of values expected by the given bridge.
        F - The type of index field values, on the index side of the bridge.
        Parameters:
        expectedValueType - The type of values expected by the given bridge. Hibernate Search will check that these expectations are met, and throw an exception if they are not.
        bridge - The bridge to use at runtime to convert between the POJO property value and the index field value.
      • bridge

        public <V2,​F> void bridge​(Class<V2> expectedValueType,
                                        ValueBridge<V2,​F> bridge,
                                        IndexFieldTypeOptionsStep<?,​F> fieldTypeOptionsStep)
        Description copied from interface: ValueBindingContext
        Sets the bridge implementing the value/index binding.
        Specified by:
        bridge in interface ValueBindingContext<V>
        Type Parameters:
        V2 - The type of values expected by the given bridge.
        F - The type of index field values, on the index side of the bridge.
        Parameters:
        expectedValueType - The type of values expected by the given bridge. Hibernate Search will check that these expectations are met, and throw an exception if they are not.
        bridge - The bridge to use at runtime to convert between the POJO property value and the index field value.
        fieldTypeOptionsStep - The result of calling context.getTypeFactory() and setting the expectations regarding the index field type (for instance return context.getTypeFactory().asString()). null to let Hibernate Search derive the expectations from the ValueBridge's generic type parameters.

        Note the DSL converter and projection converter will be ignored, since they are already implemented by the value bridge itself through its ValueBridge.toIndexedValue(Object, ValueBridgeToIndexedValueContext) and ValueBridge.fromIndexedValue(Object, ValueBridgeFromIndexedValueContext) methods.

      • beanResolver

        public BeanResolver beanResolver()
        Specified by:
        beanResolver in interface BindingContext
        Returns:
        A bean provider, allowing the retrieval of beans, including CDI/Spring DI beans when in the appropriate environment.
      • param

        public Object param​(String name)
        Specified by:
        param in interface BindingContext
        Parameters:
        name - The name of the param
        Returns:
        Get a param defined for the binder by the given name
      • paramOptional

        public Optional<Object> paramOptional​(String name)
        Specified by:
        paramOptional in interface BindingContext
        Parameters:
        name - The name of the param
        Returns:
        Get an optional param defined for the binder by the given name, a param having such name may either exist or not.