Interface EvalConfig

  • All Known Implementing Classes:
    DBEvalContext

    public interface EvalConfig
    The EvalConfig allows for customization of the expression evaluation context for a given Database instance.
    Author:
    James Ahlborn
    See Also:
    expression package docs
    • Method Detail

      • getLocale

        Locale getLocale()
        Returns:
        the currently configured Locale
      • setLocale

        void setLocale​(Locale locale)
        Sets the Locale for use when evaluating expressions. The default locale is Locale.US, so this may need to be modified when interacting with Database instances from other locales.
      • getTemporalConfig

        TemporalConfig getTemporalConfig()
        Returns:
        the currently configured TemporalConfig
      • setTemporalConfig

        void setTemporalConfig​(TemporalConfig temporal)
        Sets the TemporalConfig for use when evaluating expressions. The default date/time formatting is US based, so this may need to be modified when interacting with Database instances from other locales.
      • getNumericConfig

        NumericConfig getNumericConfig()
        Returns:
        the currently configured NumericConfig
      • setNumericConfig

        void setNumericConfig​(NumericConfig numeric)
        Sets the NumericConfig for use when evaluating expressions. The default date/time formatting is US based, so this may need to be modified when interacting with Database instances from other locales.
      • getFunctionLookup

        FunctionLookup getFunctionLookup()
        Returns:
        the currently configured FunctionLookup
      • setFunctionLookup

        void setFunctionLookup​(FunctionLookup lookup)
        Sets the Function provider to use during expression evaluation. The Functions supported by the default FunctionLookup are documented in com.healthmarketscience.jackcess.expr. Custom Functions can be implemented and provided to the expression evaluation engine by installing a custom FunctionLookup instance (which would presumably wrap and delegate to the default FunctionLookup instance for any default implementations).
      • getBindings

        Bindings getBindings()
        Returns:
        the currently configured Bindings
      • setBindings

        void setBindings​(Bindings bindings)
        Allows for passing custom information into expression evaluation. Currently, none of the default implementations make use of the Bindings. However, in the future, customization parameters could potentially be supported via custom Bindings. Additionally, custom Function instances could be passed external information via custom Bindings.