org.jpox.store.query
Class CollectionCandidates

java.lang.Object
  extended byorg.jpox.store.query.CollectionCandidates
All Implemented Interfaces:
Queryable

public class CollectionCandidates
extends java.lang.Object
implements Queryable

Collection for candidates passed to the query by setCandidates(collection user), and the user collection is not queryable

Version:
$Revision: 1.8 $

Field Summary
protected static Localiser LOCALISER
           
 
Constructor Summary
CollectionCandidates(PersistenceManager pm, java.lang.Class candidateClass, java.util.Collection candidates)
          Constructor.
 
Method Summary
 javax.jdo.FetchPlan getFetchPlan()
          Accessor for the fetch plan
 java.util.Collection getUserCandidates()
           
 boolean isEmpty()
          Returns true if this collection contains no elements.
 QueryExpression newQueryStatement()
          Accessor for a new Query statement.
 QueryExpression newQueryStatement(java.lang.Class candidateClass)
          Creates a QueryStatement The elements that are ALLOWED to be returned after quering the database are the set of elements contained in the candidate collection.
 Query.ResultObjectFactory newResultObjectFactory(QueryExpression stmt, boolean ignoreCache, java.lang.Class resultClass, boolean useFetchPlan)
          Returns a suitable query result factory for results produced by the specified query.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final Localiser LOCALISER
Constructor Detail

CollectionCandidates

public CollectionCandidates(PersistenceManager pm,
                            java.lang.Class candidateClass,
                            java.util.Collection candidates)
Constructor.

Parameters:
pm - Persistence Manager
candidateClass - the Class candidate
candidates - The candidates
Method Detail

getUserCandidates

public java.util.Collection getUserCandidates()
Returns:
Returns the userCandidates.

getFetchPlan

public javax.jdo.FetchPlan getFetchPlan()
Accessor for the fetch plan

Returns:
The fetch plan

newQueryStatement

public QueryExpression newQueryStatement()
Accessor for a new Query statement.

Specified by:
newQueryStatement in interface Queryable
Returns:
The Query Statement

newQueryStatement

public QueryExpression newQueryStatement(java.lang.Class candidateClass)
Creates a QueryStatement The elements that are ALLOWED to be returned after quering the database are the set of elements contained in the candidate collection.

Specified by:
newQueryStatement in interface Queryable
Parameters:
candidateClass -
Returns:
The new prototypical query statement.
See Also:
Queryable.newQueryStatement(java.lang.Class)

newResultObjectFactory

public Query.ResultObjectFactory newResultObjectFactory(QueryExpression stmt,
                                                        boolean ignoreCache,
                                                        java.lang.Class resultClass,
                                                        boolean useFetchPlan)
Description copied from interface: Queryable
Returns a suitable query result factory for results produced by the specified query.

The stmt argument must have been obtained by a previous call to newQueryStatement() on the same Queryable.

Specified by:
newResultObjectFactory in interface Queryable
Parameters:
stmt - The query statement
ignoreCache - Whether to ignore the cache
resultClass - Create objects of a particular type
useFetchPlan - whether to use the fetch plan to retrieve fields in the same query
Returns:
A factory for creating PersistenceCapable objects from query results.

isEmpty

public boolean isEmpty()
Returns true if this collection contains no elements.

Specified by:
isEmpty in interface Queryable
Returns:
true if this collection contains no elements.


Copyright © -2007 . All Rights Reserved.