public class QueryBuilderImpl extends Object implements OpenJPAQueryBuilder
Constructor and Description |
---|
QueryBuilderImpl(OpenJPAEntityManagerFactorySPI emf) |
Modifier and Type | Method and Description |
---|---|
QueryDefinition |
createQueryDefinition()
Creates a QueryDefinition without a domain.
|
DomainObject |
createQueryDefinition(Class root)
Creates a QueryDefinition with given class as domain.
|
QueryDefinition |
createQueryDefinition(Query jpql)
Create a QueryDefinition from the given OpenJPA Query instance.
|
QueryDefinition |
createQueryDefinition(String jpql)
Create a QueryDefinition from the given JPQL String.
|
DomainObject |
createSubqueryDefinition(PathExpression path)
Creates a QueryDefinition that can be used a correlated subquery
with the given path as domain.
|
String |
toJPQL(QueryDefinition query)
Gets equivalent JPQL String for the given QueryDefinition.
|
public QueryBuilderImpl(OpenJPAEntityManagerFactorySPI emf)
public QueryDefinition createQueryDefinition()
createQueryDefinition
in interface QueryBuilder
public DomainObject createQueryDefinition(Class root)
createQueryDefinition
in interface QueryBuilder
public DomainObject createSubqueryDefinition(PathExpression path)
createSubqueryDefinition
in interface QueryBuilder
path
- -
path expression corresponding to the domain object used to
derive the subquery root.public String toJPQL(QueryDefinition query)
OpenJPAQueryBuilder
toJPQL
in interface OpenJPAQueryBuilder
public QueryDefinition createQueryDefinition(String jpql)
OpenJPAQueryBuilder
createQueryDefinition
in interface OpenJPAQueryBuilder
public QueryDefinition createQueryDefinition(Query jpql)
OpenJPAQueryBuilder
createQueryDefinition
in interface OpenJPAQueryBuilder
Copyright © 2006–2017 Apache Software Foundation. All rights reserved.