org.apache.jdo.impl.jdoql
Class JDOQLQueryFactoryImpl

java.lang.Object
  extended by org.apache.jdo.impl.jdoql.JDOQLQueryFactoryImpl
All Implemented Interfaces:
JDOQLQueryFactory

public class JDOQLQueryFactoryImpl
extends java.lang.Object
implements JDOQLQueryFactory

Implements the @link{QueryFactory} interface in order to implement a component which is capable to run together with JDO runtime.

Author:
Michael Watzek

Constructor Summary
JDOQLQueryFactoryImpl()
           
 
Method Summary
 javax.jdo.Query newQuery(PersistenceManagerInternal pm)
          Creates a new Query with no elements.
 javax.jdo.Query newQuery(PersistenceManagerInternal pm, java.lang.Class cls)
          Creates a new Query specifying the Class of the candidate instances.
 javax.jdo.Query newQuery(PersistenceManagerInternal pm, java.lang.Class cls, java.util.Collection cln)
          Creates a new Query with the candidate Class and Collection.
 javax.jdo.Query newQuery(PersistenceManagerInternal pm, java.lang.Class cls, java.util.Collection cln, java.lang.String filter)
          Creates a new Query with the Class of the candidate instances, candidate Collection, and filter.
 javax.jdo.Query newQuery(PersistenceManagerInternal pm, java.lang.Class cls, java.lang.String filter)
          Creates a new Query with the Class of the candidate instances and filter.
 javax.jdo.Query newQuery(PersistenceManagerInternal pm, javax.jdo.Extent cln)
          Creates a new Query with the Class of the candidate instances and candidate Extent.
 javax.jdo.Query newQuery(PersistenceManagerInternal pm, javax.jdo.Extent cln, java.lang.String filter)
          Creates a new Query with the candidate Extent and filter; the class is taken from the Extent.
 javax.jdo.Query newQuery(PersistenceManagerInternal pm, java.lang.Object compiled)
          Creates a new Query using elements from another Query.
 QueryTree newTree()
          Returns a new QueryTree instance.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDOQLQueryFactoryImpl

public JDOQLQueryFactoryImpl()
Method Detail

newTree

public QueryTree newTree()
Returns a new QueryTree instance. This instance allows to specify a query with an API (see QueryTree and ExpressionFactory) rather than as JDOQL strings. To run you create a query object from the QueryTree (see PersistenceManager.newQuery(Object compiled)) and call the execute method on the Query object.

Specified by:
newTree in interface JDOQLQueryFactory
Returns:
new QueryTree instance.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm)
Description copied from interface: JDOQLQueryFactory
Creates a new Query with no elements.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
Returns:
the new Query.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm,
                                java.lang.Object compiled)
Description copied from interface: JDOQLQueryFactory
Creates a new Query using elements from another Query. The other Query must have been created by the same JDO implementation. It might be active in a different PersistenceManager or might have been serialized and restored.

All of the settings of the other Query are copied to this Query, except for the candidate Collection or Extent.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
compiled - another Query from the same JDO implementation.
Returns:
the new Query.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm,
                                java.lang.Class cls)
Description copied from interface: JDOQLQueryFactory
Creates a new Query specifying the Class of the candidate instances.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
cls - the Class of the candidate instances.
Returns:
the new Query.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm,
                                javax.jdo.Extent cln)
Description copied from interface: JDOQLQueryFactory
Creates a new Query with the Class of the candidate instances and candidate Extent.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
cln - the Extent of candidate instances.
Returns:
the new Query.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm,
                                java.lang.Class cls,
                                java.util.Collection cln)
Description copied from interface: JDOQLQueryFactory
Creates a new Query with the candidate Class and Collection.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
cls - the Class of results.
cln - the Collection of candidate instances.
Returns:
the new Query.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm,
                                java.lang.Class cls,
                                java.lang.String filter)
Description copied from interface: JDOQLQueryFactory
Creates a new Query with the Class of the candidate instances and filter.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
cls - the Class of results.
filter - the filter for candidate instances.
Returns:
the new Query.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm,
                                java.lang.Class cls,
                                java.util.Collection cln,
                                java.lang.String filter)
Description copied from interface: JDOQLQueryFactory
Creates a new Query with the Class of the candidate instances, candidate Collection, and filter.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
cls - the Class of candidate instances.
cln - the Collection of candidate instances.
filter - the filter for candidate instances.
Returns:
the new Query.

newQuery

public javax.jdo.Query newQuery(PersistenceManagerInternal pm,
                                javax.jdo.Extent cln,
                                java.lang.String filter)
Description copied from interface: JDOQLQueryFactory
Creates a new Query with the candidate Extent and filter; the class is taken from the Extent.

Specified by:
newQuery in interface JDOQLQueryFactory
Parameters:
pm - the persistence manager for the new query. It is the responsibility of the caller to check that the persistence manager is valid.
cln - the Extent of candidate instances.
filter - the filter for candidate instances.
Returns:
the new Query.


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