Class JPAQuery<T>

Type Parameters:
T - result type
All Implemented Interfaces:
Fetchable<T>, FetchableQuery<T,JPQLQuery<T>>, FilteredClause<JPQLQuery<T>>, Query<JPQLQuery<T>>, SimpleQuery<JPQLQuery<T>>, ExtendedSubQuery<T>, Expression<T>, SubQueryExpression<T>, JPQLQuery<T>, Serializable

public class JPAQuery<T> extends AbstractJPAQuery<T,JPAQuery<T>>
JPAQuery is the default implementation of the JPQLQuery interface for JPA
Author:
tiwe
See Also:
  • Constructor Details

    • JPAQuery

      public JPAQuery()
      Creates a new detached query The query can be attached via the clone method
    • JPAQuery

      public JPAQuery(javax.persistence.EntityManager em)
      Creates a new EntityManager bound query
      Parameters:
      em - entity manager
    • JPAQuery

      public JPAQuery(javax.persistence.EntityManager em, QueryMetadata metadata)
      Creates a new EntityManager bound query
      Parameters:
      em - entity manager
      metadata - query metadata
    • JPAQuery

      public JPAQuery(javax.persistence.EntityManager em, JPQLTemplates templates)
      Creates a new query
      Parameters:
      em - entity manager
      templates - templates
    • JPAQuery

      public JPAQuery(javax.persistence.EntityManager em, JPQLTemplates templates, QueryMetadata metadata)
      Creates a new query
      Parameters:
      em - entity manager
      templates - templates
      metadata - query metadata
  • Method Details

    • clone

      public JPAQuery<T> clone(javax.persistence.EntityManager entityManager, JPQLTemplates templates)
      Description copied from class: AbstractJPAQuery
      Clone the state of this query to a new instance with the given EntityManager and the specified templates
      Specified by:
      clone in class AbstractJPAQuery<T,JPAQuery<T>>
      Parameters:
      entityManager - entity manager
      templates - templates
      Returns:
      cloned query
    • clone

      public JPAQuery<T> clone(javax.persistence.EntityManager entityManager)
      Description copied from class: AbstractJPAQuery
      Clone the state of this query to a new instance with the given EntityManager
      Specified by:
      clone in class AbstractJPAQuery<T,JPAQuery<T>>
      Parameters:
      entityManager - entity manager
      Returns:
      cloned query
    • select

      public <U> JPAQuery<U> select(Expression<U> expr)
    • select

      public JPAQuery<Tuple> select(Expression<?>... exprs)