com.mysema.query.jpa.sql
Class JPASQLQuery
java.lang.Object
com.mysema.query.support.QueryBase<Q>
com.mysema.query.support.ProjectableQuery<T>
com.mysema.query.jpa.AbstractSQLQuery<JPASQLQuery>
com.mysema.query.jpa.sql.JPASQLQuery
- All Implemented Interfaces:
- FilteredClause<JPASQLQuery>, Projectable, Query<JPASQLQuery>, SQLCommonQuery<JPASQLQuery>
public final class JPASQLQuery
- extends AbstractSQLQuery<JPASQLQuery>
- implements SQLCommonQuery<JPASQLQuery>
JPASQLQuery is an SQLQuery implementation that uses Hibernate's Native SQL functionality
to execute queries
- Author:
- tiwe
Methods inherited from class com.mysema.query.jpa.AbstractSQLQuery |
count, exists, from, from, fullJoin, fullJoin, fullJoin, getMetadata, innerJoin, innerJoin, innerJoin, join, join, join, leftJoin, leftJoin, leftJoin, on, rightJoin, rightJoin, rightJoin |
Methods inherited from class com.mysema.query.support.ProjectableQuery |
countDistinct, iterate, iterateDistinct, iterateDistinct, iterateDistinct, list, listDistinct, listDistinct, listDistinct, listDistinctResults, map, notExists, uniqueResult, uniqueResult |
Methods inherited from interface com.mysema.query.sql.SQLCommonQuery |
from, from, fullJoin, fullJoin, fullJoin, innerJoin, innerJoin, innerJoin, join, join, join, leftJoin, leftJoin, leftJoin, on, rightJoin, rightJoin, rightJoin |
JPASQLQuery
public JPASQLQuery(javax.persistence.EntityManager entityManager,
SQLTemplates sqlTemplates)
JPASQLQuery
protected JPASQLQuery(JPASessionHolder session,
SQLTemplates sqlTemplates,
QueryMetadata metadata)
clone
public JPASQLQuery clone(javax.persistence.EntityManager entityManager)
createQuery
public javax.persistence.Query createQuery(Expression<?>... args)
list
public List<Object[]> list(Expression<?>[] args)
- Description copied from interface:
Projectable
- list the results for the given projection
- Specified by:
list
in interface Projectable
- Overrides:
list
in class ProjectableQuery<JPASQLQuery>
- Returns:
list
public <RT> List<RT> list(Expression<RT> projection)
- Description copied from interface:
Projectable
- list the results for the given projection
- Specified by:
list
in interface Projectable
- Overrides:
list
in class ProjectableQuery<JPASQLQuery>
- Type Parameters:
RT
- generic type of the List
- Returns:
- a List over the projection
iterate
public com.mysema.commons.lang.CloseableIterator<Object[]> iterate(Expression<?>[] args)
- Description copied from interface:
Projectable
- iterate over the results for the given projection
- Specified by:
iterate
in interface Projectable
- Returns:
iterate
public <RT> com.mysema.commons.lang.CloseableIterator<RT> iterate(Expression<RT> projection)
- Description copied from interface:
Projectable
- iterate over the results for the given projection
- Specified by:
iterate
in interface Projectable
- Type Parameters:
RT
- generic type of the Iterator
- Returns:
- an Iterator over the projection
listResults
public <RT> SearchResults<RT> listResults(Expression<RT> projection)
- Description copied from interface:
Projectable
- list the results for the given projection
- Specified by:
listResults
in interface Projectable
- Returns:
logQuery
protected void logQuery(String queryString)
reset
protected void reset()
toCountRowsString
protected String toCountRowsString()
toQueryString
protected String toQueryString()
uniqueResult
public <RT> RT uniqueResult(Expression<RT> expr)
- Description copied from interface:
Projectable
- return a unique result for the given projection or null if not result is found
- Specified by:
uniqueResult
in interface Projectable
- Overrides:
uniqueResult
in class ProjectableQuery<JPASQLQuery>
- Type Parameters:
RT
- return type
- Returns:
- the result or null for an empty result
Copyright © 2007-2011 Mysema Ltd. All Rights Reserved.