public interface QueryProducer
Modifier and Type | Method and Description |
---|---|
Query |
createNamedQuery(String name)
The JPA-defined named query creation method.
|
<R> Query<R> |
createNamedQuery(String name,
Class<R> resultClass)
The JPA-defined named, typed query creation method.
|
NativeQuery |
createNativeQuery(String sqlString)
Create a NativeQuery instance for the given native (SQL) query
|
<R> NativeQuery<R> |
createNativeQuery(String sqlString,
Class<R> resultClass)
Create a NativeQuery instance for the given native (SQL) query using
implicit mapping to the specified Java type.
|
NativeQuery |
createNativeQuery(String sqlString,
String resultSetMappingName)
Create a NativeQuery instance for the given native (SQL) query using
implicit mapping to the specified Java type.
|
Query |
createQuery(CriteriaDelete deleteQuery) |
<T> Query<T> |
createQuery(CriteriaQuery<T> criteriaQuery) |
Query |
createQuery(CriteriaUpdate updateQuery) |
Query |
createQuery(String queryString)
Create a
Query instance for the given HQL/JPQL query string. |
<R> Query<R> |
createQuery(String queryString,
Class<R> resultClass)
Create a typed
Query instance for the given HQL/JPQL query string. |
NativeQuery |
getNamedNativeQuery(String name)
Get a NativeQuery instance for a named native SQL query
|
NativeQuery |
getNamedNativeQuery(String name,
String resultSetMapping)
Get a NativeQuery instance for a named native SQL query
|
Query |
getNamedQuery(String queryName)
Create a
Query instance for the named query. |
Query getNamedQuery(String queryName)
Query
instance for the named query.queryName
- the name of a pre-defined, named queryIllegalArgumentException
- if a query has not been
defined with the given name or if the query string is
found to be invalidQuery createQuery(String queryString)
Query
instance for the given HQL/JPQL query string.queryString
- The HQL/JPQL queryEntityManager.createQuery(String)
<R> Query<R> createQuery(String queryString, Class<R> resultClass)
Query
instance for the given HQL/JPQL query string.queryString
- The HQL/JPQL queryresultClass
- The type of the query resultEntityManager.createQuery(String,Class)
Query createNamedQuery(String name)
name
- the name of a pre-defined, named queryIllegalArgumentException
- if a query has not been
defined with the given name or if the query string is
found to be invalidEntityManager.createNamedQuery(String)
<R> Query<R> createNamedQuery(String name, Class<R> resultClass)
name
- the name of a query defined in metadataresultClass
- the type of the query resultIllegalArgumentException
- if a query has not been
defined with the given name or if the query string is
found to be invalid or if the query result is found to
not be assignable to the specified typeEntityManager.createNamedQuery(String,Class)
NativeQuery createNativeQuery(String sqlString)
sqlString
- a native SQL query stringEntityManager.createNativeQuery(String)
<R> NativeQuery<R> createNativeQuery(String sqlString, Class<R> resultClass)
sqlString
- Native (SQL) query stringresultClass
- The Java entity type to map results toEntityManager.createNativeQuery(String,Class)
NativeQuery createNativeQuery(String sqlString, String resultSetMappingName)
sqlString
- Native (SQL) query stringresultSetMappingName
- The explicit result mapping nameEntityManager.createNativeQuery(String,Class)
,
SqlResultSetMapping
NativeQuery getNamedNativeQuery(String name)
name
- The name of the pre-defined queryNativeQuery getNamedNativeQuery(String name, String resultSetMapping)
name
- The name of the pre-defined query<T> Query<T> createQuery(CriteriaQuery<T> criteriaQuery)
Query createQuery(CriteriaUpdate updateQuery)
Query createQuery(CriteriaDelete deleteQuery)
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.