org.datanucleus.store.rdbms.query
Class CollectionCandidates

java.lang.Object
  extended by org.datanucleus.store.rdbms.query.CollectionCandidates
All Implemented Interfaces:
org.datanucleus.store.mapped.expression.Queryable

public class CollectionCandidates
extends java.lang.Object
implements org.datanucleus.store.mapped.expression.Queryable

Collection for candidates passed to the query by setCandidates(collection).


Field Summary
protected static org.datanucleus.util.Localiser LOCALISER
           
 
Constructor Summary
CollectionCandidates(org.datanucleus.ObjectManager om, java.lang.Class candidateClass, java.util.Collection candidates)
          Constructor.
 
Method Summary
 org.datanucleus.FetchPlan getFetchPlan()
          Accessor for the fetch plan
 java.util.Collection getUserCandidates()
           
 boolean isEmpty()
          Returns true if this collection contains no elements.
 org.datanucleus.store.mapped.expression.QueryExpression newQueryStatement()
          Accessor for a new Query statement.
 org.datanucleus.store.mapped.expression.QueryExpression newQueryStatement(java.lang.Class candidateClass, org.datanucleus.store.mapped.DatastoreIdentifier candidateAlias)
          Creates a QueryStatement.
 org.datanucleus.store.query.ResultObjectFactory newResultObjectFactory(org.datanucleus.store.mapped.expression.QueryExpression stmt, boolean ignoreCache, java.lang.Class resultClass, boolean useFetchPlan)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

LOCALISER

protected static final org.datanucleus.util.Localiser LOCALISER
Constructor Detail

CollectionCandidates

public CollectionCandidates(org.datanucleus.ObjectManager om,
                            java.lang.Class candidateClass,
                            java.util.Collection candidates)
Constructor.

Parameters:
om - Object Manager
candidateClass - the Class candidate
candidates - The candidates
Method Detail

getUserCandidates

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

getFetchPlan

public org.datanucleus.FetchPlan getFetchPlan()
Accessor for the fetch plan

Returns:
The fetch plan

newQueryStatement

public org.datanucleus.store.mapped.expression.QueryExpression newQueryStatement()
Accessor for a new Query statement.

Specified by:
newQueryStatement in interface org.datanucleus.store.mapped.expression.Queryable
Returns:
The Query Statement

newQueryStatement

public org.datanucleus.store.mapped.expression.QueryExpression newQueryStatement(java.lang.Class candidateClass,
                                                                                 org.datanucleus.store.mapped.DatastoreIdentifier candidateAlias)
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 org.datanucleus.store.mapped.expression.Queryable
Parameters:
candidateClass - Candidate class
candidateAlias - Alias to use for the candidate in the query (if the native query supports it)
Returns:
Query Statement

newResultObjectFactory

public org.datanucleus.store.query.ResultObjectFactory newResultObjectFactory(org.datanucleus.store.mapped.expression.QueryExpression stmt,
                                                                              boolean ignoreCache,
                                                                              java.lang.Class resultClass,
                                                                              boolean useFetchPlan)
Specified by:
newResultObjectFactory in interface org.datanucleus.store.mapped.expression.Queryable

isEmpty

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

Specified by:
isEmpty in interface org.datanucleus.store.mapped.expression.Queryable
Returns:
true if this collection contains no elements.


Copyright © 2009. All Rights Reserved.