org.apache.jdo.query
Interface QueryResultHelper


public interface QueryResultHelper

This interface is a helper for the query execution strategy of the StoreManager. When a query is executed, the filter is parsed. The parsed query, candidate collection or extent, and actual parameters of the execute are stored in the QueryResultHelper. This interface also provides methods useful for ordering the candidate objects and for filtering objects.

Version:
1.0
Author:
Craig Russell

Method Summary
 boolean applyFilter(java.lang.Object obj)
          This method determines whether the specified object is assignment compatible to the candidate Class specified by the user and satisfies the query filter.
 java.lang.Object getCandidates()
          Return the candidate Collection or Extent specified by the user.
 java.util.List orderCandidates(java.util.Collection candidates)
          This method filters the specified collection, removing all elements that are not assignment compatible to the candidate Class specified by the user, and then orders the results according to the ordering expression specified by the user.
 

Method Detail

getCandidates

java.lang.Object getCandidates()
Return the candidate Collection or Extent specified by the user.

Returns:
the candidate Collection or Extent.

orderCandidates

java.util.List orderCandidates(java.util.Collection candidates)
This method filters the specified collection, removing all elements that are not assignment compatible to the candidate Class specified by the user, and then orders the results according to the ordering expression specified by the user. A new List is returned.

Parameters:
candidates - the collection of instances to be filtered and ordered
Returns:
the filtered parameter collection ordered by the ordering expression.

applyFilter

boolean applyFilter(java.lang.Object obj)
This method determines whether the specified object is assignment compatible to the candidate Class specified by the user and satisfies the query filter.

Parameters:
obj - the candidate object.
Returns:
true if the specified object is of the candidate class and satisfies the query filter; false otherwise


Copyright © 2005-2008 Apache Software Foundation. All Rights Reserved.