org.apache.jdo.jdoql
Interface JDOQLQueryFactory

All Known Implementing Classes:
JDOQLQueryFactoryImpl

public interface JDOQLQueryFactory

This interface allows for choosing between different JDO query implementations. Query implementations implementing this interface are capable to run together with other components. The interface declares methods creating JDO query instances and JDO query tree instances. All methods creating query instances take persistence manager instances as parameters.

Author:
Michael Watzek

Method Summary
 javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm)
          Creates a new Query with no elements.
 javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm, java.lang.Class cls)
          Creates a new Query specifying the Class of the candidate instances.
 javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm, java.lang.Class cls, java.util.Collection cln)
          Creates a new Query with the candidate Class and Collection.
 javax.jdo.Query newQuery(org.apache.jdo.pm.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(org.apache.jdo.pm.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(org.apache.jdo.pm.PersistenceManagerInternal pm, javax.jdo.Extent cln)
          Creates a new Query with the Class of the candidate instances and candidate Extent.
 javax.jdo.Query newQuery(org.apache.jdo.pm.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(org.apache.jdo.pm.PersistenceManagerInternal pm, java.lang.Object compiled)
          Creates a new Query using elements from another Query.
 QueryTree newTree()
          Returns a new QueryTree instance.
 

Method Detail

newTree

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.

Returns:
new QueryTree instance.

newQuery

javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm)
Creates a new Query with no elements.

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

javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm,
                         java.lang.Object compiled)
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.

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

javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm,
                         java.lang.Class cls)
Creates a new Query specifying the Class of the candidate instances.

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

javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm,
                         javax.jdo.Extent cln)
Creates a new Query with the Class of the candidate instances and candidate Extent.

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

javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm,
                         java.lang.Class cls,
                         java.util.Collection cln)
Creates a new Query with the candidate Class and Collection.

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

javax.jdo.Query newQuery(org.apache.jdo.pm.PersistenceManagerInternal pm,
                         java.lang.Class cls,
                         java.lang.String filter)
Creates a new Query with the Class of the candidate instances and filter.

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

javax.jdo.Query newQuery(org.apache.jdo.pm.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.

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

javax.jdo.Query newQuery(org.apache.jdo.pm.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.

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-2009 Apache Software Foundation. All Rights Reserved.