Class JDOQLInMemoryEvaluator

java.lang.Object
org.datanucleus.store.query.inmemory.JavaQueryInMemoryEvaluator
org.datanucleus.store.query.inmemory.JDOQLInMemoryEvaluator

public class JDOQLInMemoryEvaluator extends JavaQueryInMemoryEvaluator
Class to evaluate a JDOQL query in whole or part.
  • Constructor Details

    • JDOQLInMemoryEvaluator

      public JDOQLInMemoryEvaluator(Query query, Collection candidates, QueryCompilation compilation, 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 Details

    • evaluateSubquery

      protected Collection evaluateSubquery(Query query, QueryCompilation compilation, Collection candidates, 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 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

      Collection mapResultClass(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