Package org.hibernate.query.spi
Interface QueryProducerImplementor
-
- All Superinterfaces:
QueryProducer
- All Known Subinterfaces:
EventSource,SessionImplementor,SharedSessionContractImplementor
- All Known Implementing Classes:
SessionDelegatorBaseImpl
public interface QueryProducerImplementor extends QueryProducer
The internal contract for QueryProducer implementations. Acts as the value passed to produced queries and provides them with access to needed functionality.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description QuerycreateNamedQuery(java.lang.String name)The JPA-defined named query creation method.<R> QueryImplementor<R>createNamedQuery(java.lang.String name, java.lang.Class<R> resultClass)The JPA-defined named, typed query creation method.NativeQueryImplementorcreateNativeQuery(java.lang.String sqlString)Create a NativeQuery instance for the given native (SQL) queryNativeQueryImplementorcreateNativeQuery(java.lang.String sqlString, java.lang.Class resultClass)Create a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.NativeQueryImplementorcreateNativeQuery(java.lang.String sqlString, java.lang.String resultSetMapping)Create a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.QueryImplementorcreateQuery(java.lang.String queryString)Create aQueryinstance for the given HQL/JPQL query string.<R> QueryImplementor<R>createQuery(java.lang.String queryString, java.lang.Class<R> resultClass)Create a typedQueryinstance for the given HQL/JPQL query string.default NativeQueryImplementorcreateSQLQuery(java.lang.String queryString)Create aNativeQueryinstance for the given SQL query string.CacheModegetCacheMode()SessionFactoryImplementorgetFactory()FlushModegetHibernateFlushMode()NativeQueryImplementorgetNamedNativeQuery(java.lang.String name)Get a NativeQuery instance for a named native SQL queryQueryImplementorgetNamedQuery(java.lang.String queryName)Create aQueryinstance for the named query.default NativeQueryImplementorgetNamedSQLQuery(java.lang.String name)Get a NativeQuery instance for a named native SQL query-
Methods inherited from interface org.hibernate.query.QueryProducer
createQuery, createQuery, createQuery
-
-
-
-
Method Detail
-
getFactory
SessionFactoryImplementor getFactory()
-
getHibernateFlushMode
FlushMode getHibernateFlushMode()
-
getCacheMode
CacheMode getCacheMode()
-
getNamedQuery
QueryImplementor getNamedQuery(java.lang.String queryName)
Description copied from interface:QueryProducerCreate aQueryinstance for the named query.- Specified by:
getNamedQueryin interfaceQueryProducer- Parameters:
queryName- the name of a pre-defined, named query- Returns:
- The Query instance for manipulation and execution
-
createQuery
QueryImplementor createQuery(java.lang.String queryString)
Description copied from interface:QueryProducerCreate aQueryinstance for the given HQL/JPQL query string.- Specified by:
createQueryin interfaceQueryProducer- Parameters:
queryString- The HQL/JPQL query- Returns:
- The Query instance for manipulation and execution
- See Also:
EntityManager.createQuery(String)
-
createQuery
<R> QueryImplementor<R> createQuery(java.lang.String queryString, java.lang.Class<R> resultClass)
Description copied from interface:QueryProducerCreate a typedQueryinstance for the given HQL/JPQL query string.- Specified by:
createQueryin interfaceQueryProducer- Parameters:
queryString- The HQL/JPQL queryresultClass- The type of the query result- Returns:
- The Query instance for manipulation and execution
- See Also:
EntityManager.createQuery(String,Class)
-
createNamedQuery
Query createNamedQuery(java.lang.String name)
Description copied from interface:QueryProducerThe JPA-defined named query creation method. This form can represent an HQL/JPQL query or a native query.- Specified by:
createNamedQueryin interfaceQueryProducer- Parameters:
name- the name of a pre-defined, named query- Returns:
- The Query instance for manipulation and execution
- See Also:
EntityManager.createNamedQuery(String)
-
createNamedQuery
<R> QueryImplementor<R> createNamedQuery(java.lang.String name, java.lang.Class<R> resultClass)
Description copied from interface:QueryProducerThe JPA-defined named, typed query creation method. This form can only represent an HQL/JPQL query (not a native query).- Specified by:
createNamedQueryin interfaceQueryProducer- Parameters:
name- the name of a query defined in metadataresultClass- the type of the query result- Returns:
- The Query instance for manipulation and execution
- See Also:
EntityManager.createNamedQuery(String,Class)
-
createNativeQuery
NativeQueryImplementor createNativeQuery(java.lang.String sqlString)
Description copied from interface:QueryProducerCreate a NativeQuery instance for the given native (SQL) query- Specified by:
createNativeQueryin interfaceQueryProducer- Parameters:
sqlString- a native SQL query string- Returns:
- The NativeQuery instance for manipulation and execution
- See Also:
EntityManager.createNativeQuery(String)
-
createNativeQuery
NativeQueryImplementor createNativeQuery(java.lang.String sqlString, java.lang.Class resultClass)
Description copied from interface:QueryProducerCreate a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.- Specified by:
createNativeQueryin interfaceQueryProducer- Parameters:
sqlString- Native (SQL) query stringresultClass- The Java entity type to map results to- Returns:
- The NativeQuery instance for manipulation and execution
- See Also:
EntityManager.createNativeQuery(String,Class)
-
createNativeQuery
NativeQueryImplementor createNativeQuery(java.lang.String sqlString, java.lang.String resultSetMapping)
Description copied from interface:QueryProducerCreate a NativeQuery instance for the given native (SQL) query using implicit mapping to the specified Java type.- Specified by:
createNativeQueryin interfaceQueryProducer- Parameters:
sqlString- Native (SQL) query stringresultSetMapping- The explicit (named) result mapping- Returns:
- The NativeQuery instance for manipulation and execution
- See Also:
EntityManager.createNativeQuery(String,Class),SqlResultSetMapping
-
getNamedNativeQuery
NativeQueryImplementor getNamedNativeQuery(java.lang.String name)
Description copied from interface:QueryProducerGet a NativeQuery instance for a named native SQL query- Specified by:
getNamedNativeQueryin interfaceQueryProducer- Parameters:
name- The name of the pre-defined query- Returns:
- The NativeQuery instance for manipulation and execution
-
getNamedSQLQuery
default NativeQueryImplementor getNamedSQLQuery(java.lang.String name)
Description copied from interface:QueryProducerGet a NativeQuery instance for a named native SQL query- Specified by:
getNamedSQLQueryin interfaceQueryProducer- Parameters:
name- The name of the pre-defined query- Returns:
- The NativeQuery instance for manipulation and execution
-
createSQLQuery
default NativeQueryImplementor createSQLQuery(java.lang.String queryString)
Description copied from interface:QueryProducerCreate aNativeQueryinstance for the given SQL query string.- Specified by:
createSQLQueryin interfaceQueryProducer- Parameters:
queryString- The SQL query- Returns:
- The query instance for manipulation and execution
-
-