Interface EvaluationContext


  • public interface EvaluationContext
    EvaluationContext is a helper class that provides access to various elements required for PredicateEvaluators during the query evaluation process.
    Since:
    5.2
    • Method Detail

      • getSession

        Session getSession()
        Returns the session under which the Query runs.
      • getResourceResolver

        ResourceResolver getResourceResolver()
        Returns a (jcr) resource resolver based on the current session.
      • getNode

        Node getNode​(Row row)
        Helper method for implementations that returns the Node behind a Row. This method will be obsolete with JCR 2.0, where the new Row.getNode() method will be available.
        See Also:
        getPath(Row), getResource(Row)
      • getPath

        java.lang.String getPath​(Row row)
        Helper method for returning the path behind a row. If an error occurs, null will be returned.
        See Also:
        getNode(Row), getResource(Row)
      • put

        void put​(java.lang.String key,
                 java.lang.Object value)
        Allows to store any object temporarily for the current evaluation. This is useful as the predicate evaluators can be used by multiple executions (in different threads) at the same time and thus need a safe storage - object fields are not usable.
        Parameters:
        key - unique key for the value
        value - any object or null to remove the entry under key
        Since:
        5.3
        See Also:
        get(String)
      • get

        java.lang.Object get​(java.lang.String key)
        Retrieves an object that is temporarily stored during the current evaluation.
        Parameters:
        key - unique key for the value
        Returns:
        the value object or null if there is no value stored under the given key
        Since:
        5.3
        See Also:
        put(String, Object)