Class JDOQLInMemoryEvaluator

    • Constructor Detail

      • JDOQLInMemoryEvaluator

        public JDOQLInMemoryEvaluator​(Query query,
                                      java.util.Collection candidates,
                                      QueryCompilation compilation,
                                      java.util.Map parameterValues,
                                      ClassLoaderResolver clr)
        Constructor.
        Parameters:
        query - The underlying JDOQL query
        candidates - List of objects as input to the evaluation process
        compilation - Query compilation
        parameterValues - Input parameter values keyed by the param name
        clr - ClassLoader resolver
    • Method Detail

      • evaluateSubquery

        protected java.util.Collection evaluateSubquery​(Query query,
                                                        QueryCompilation compilation,
                                                        java.util.Collection candidates,
                                                        java.lang.Object outerCandidate)
        Method to evaluate a subquery of the query being evaluated.
        Specified by:
        evaluateSubquery in class JavaQueryInMemoryEvaluator
        Parameters:
        query - The subquery
        compilation - The subquery compilation
        candidates - The candidates for the subquery
        outerCandidate - Current candidate in the outer query (for use when linking back)
        Returns:
        The result
      • execute

        public java.util.Collection execute​(boolean applyFilter,
                                            boolean applyOrdering,
                                            boolean applyResult,
                                            boolean applyResultClass,
                                            boolean applyRange)
        Description copied from class: JavaQueryInMemoryEvaluator
        Method to perform the evaluation, applying the query restrictions that are required.
        Overrides:
        execute in class JavaQueryInMemoryEvaluator
        Parameters:
        applyFilter - Whether to apply any filter constraints on the results
        applyOrdering - Whether to apply any order constraints on the results
        applyResult - Whether to apply any result/grouping/having on the results
        applyResultClass - Whether to apply any resultClass constraint on the results
        applyRange - Whether to apply any range constraint on the results
        Returns:
        The results after evaluation.
      • mapResultClass

        java.util.Collection mapResultClass​(java.util.Collection resultSet)
        Constructs ResultClassMapper and calls its map function
        Specified by:
        mapResultClass in class JavaQueryInMemoryEvaluator
        Parameters:
        resultSet - The resultSet containing the instances handled by setResult
        Returns:
        The resultSet containing instances of the Class defined by setResultClass