org.apache.openjpa.persistence.query
Interface QueryBuilder

All Known Subinterfaces:
OpenJPAQueryBuilder
All Known Implementing Classes:
QueryBuilderImpl

public interface QueryBuilder

Factory interface for query definition objects


Method Summary
 QueryDefinition createQueryDefinition()
          Create an uninitialized query definition object.
 DomainObject createQueryDefinition(Class root)
          Create a query definition object with the given root.
 DomainObject createSubqueryDefinition(PathExpression path)
          Create a query definition object whose root is derived from a domain object of the containing query.
 

Method Detail

createQueryDefinition

QueryDefinition createQueryDefinition()
Create an uninitialized query definition object.

Returns:
query definition instance

createQueryDefinition

DomainObject createQueryDefinition(Class root)
Create a query definition object with the given root. The root must be an entity class.

Parameters:
cls - - an entity class
Returns:
root domain object

createSubqueryDefinition

DomainObject createSubqueryDefinition(PathExpression path)
Create a query definition object whose root is derived from a domain object of the containing query. Provides support for correlated subqueries. Joins against the resulting domain object do not affect the query domain of the containing query. The path expression must correspond to an entity class. The path expression must not be a domain object of the containing query.

Parameters:
path - - path expression corresponding to the domain object used to derive the subquery root.
Returns:
the subquery DomainObject


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