E
- entity returned by executing the querypublic class HibernateNativeQueryProvider<E> extends AbstractHibernateQueryProvider<E>
This query provider creates Hibernate Query
s from injected native SQL
queries. This is useful if there is a need to utilize database-specific
features such as query hints, the CONNECT keyword in Oracle, etc.
Constructor and Description |
---|
HibernateNativeQueryProvider() |
Modifier and Type | Method and Description |
---|---|
void |
afterPropertiesSet() |
org.hibernate.query.NativeQuery<E> |
createQuery()
Create an
NativeQuery from the session provided (preferring
stateless if both are available). |
void |
setEntityClass(java.lang.Class<E> entityClazz) |
void |
setSqlQuery(java.lang.String sqlQuery) |
getStatefulSession, getStatelessSession, isStatelessSession, setSession, setStatelessSession
public org.hibernate.query.NativeQuery<E> createQuery()
Create an NativeQuery
from the session provided (preferring
stateless if both are available).
public void setSqlQuery(java.lang.String sqlQuery)
public void setEntityClass(java.lang.Class<E> entityClazz)
public void afterPropertiesSet() throws java.lang.Exception
java.lang.Exception