class HibernateNativeQueryProvider<E> extends AbstractHibernateQueryProvider<E> {

	private String sqlQuery;

	private Class<E> entityClass;

	/**
	 * <p>
	 * Create an {@link NativeQuery} from the session provided (preferring stateless if
	 * both are available).
	 * </p>
	 */
	@Override
	@SuppressWarnings("unchecked")
	public NativeQuery<E> createQuery() {

		if (isStatelessSession()) {
			return getStatelessSession().createNativeQuery(sqlQuery).addEntity(entityClass);
		}
		else {
			return getStatefulSession().createNativeQuery(sqlQuery).addEntity(entityClass);
		}
	}

	public void setSqlQuery(String sqlQuery) {
		this.sqlQuery = sqlQuery;
	}

	public void setEntityClass(Class<E> entityClazz) {
		this.entityClass = entityClazz;
	}

	public void afterPropertiesSet() throws Exception {<FILL_FUNCTION_BODY>}

}

		Assert.state(StringUtils.hasText(sqlQuery), "Native SQL query cannot be empty");
		Assert.state(entityClass != null, "Entity class cannot be NULL");
	
<methods>public non-sealed void <init>() ,public boolean isStatelessSession() ,public void setSession(org.hibernate.Session) ,public void setStatelessSession(org.hibernate.StatelessSession) <variables>private org.hibernate.Session statefulSession,private org.hibernate.StatelessSession statelessSession