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 resultSetMapping)
Create a NativeQuery instance for the given native (SQL) query using
implicit mapping to the specified Java type.
|
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. |
default SQLQuery |
createSQLQuery(String queryString)
Deprecated.
(since 5.2) use
createNativeQuery(String) instead |
NativeQuery |
getNamedNativeQuery(String name)
Get a NativeQuery instance for a named native SQL query
|
Query |
getNamedQuery(String queryName)
Create a
Query instance for the named query. |
default Query |
getNamedSQLQuery(String name)
Deprecated.
(since 5.2) use
getNamedNativeQuery(String) instead |
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 queryEntityManager.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)
@Deprecated default SQLQuery createSQLQuery(String queryString)
createNativeQuery(String)
insteadNativeQuery
instance for the given SQL query string.queryString
- The SQL queryNativeQuery 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 type to map results toEntityManager.createNativeQuery(String,Class)
NativeQuery createNativeQuery(String sqlString, String resultSetMapping)
sqlString
- Native (SQL) query stringresultSetMapping
- The explicit (named) result mappingEntityManager.createNativeQuery(String,Class)
,
SqlResultSetMapping
@Deprecated default Query getNamedSQLQuery(String name)
getNamedNativeQuery(String)
insteadname
- The name of the pre-defined queryNativeQuery getNamedNativeQuery(String name)
name
- The name of the pre-defined queryCopyright © 2019 JBoss by Red Hat. All rights reserved.