Class DefaultIdentifierBindingContext<I>

    • Method Detail

      • bridge

        public <I2> void bridge​(Class<I2> expectedValueType,
                                IdentifierBridge<I2> bridge)
        Description copied from interface: IdentifierBindingContext
        Sets the bridge implementing the value/index binding.
        Specified by:
        bridge in interface IdentifierBindingContext<I>
        Type Parameters:
        I2 - The type of identifiers expected by the given bridge.
        Parameters:
        expectedValueType - The type of identifiers 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 identifier and the document identifier.
      • bridge

        public <I2> void bridge​(Class<I2> expectedValueType,
                                BeanHolder<? extends IdentifierBridge<I2>> bridgeHolder)
        Description copied from interface: IdentifierBindingContext
        Sets the bridge implementing the value/index binding.
        Specified by:
        bridge in interface IdentifierBindingContext<I>
        Type Parameters:
        I2 - The type of identifiers expected by the given 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.
        bridgeHolder - A BeanHolder containing the bridge to use at runtime to convert between the POJO property value and the index field value. Use BeanHolder.of(Object) if you don't need any particular closing behavior.
      • 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.