class JpaNamedQueryProvider<E> extends AbstractJpaQueryProvider {

	private Class<E> entityClass;

	private String namedQuery;

	@Override
	public Query createQuery() {
		return getEntityManager().createNamedQuery(this.namedQuery, this.entityClass);
	}

	/**
	 * @param namedQuery name of a jpa named query
	 */
	public void setNamedQuery(String namedQuery) {
		this.namedQuery = namedQuery;
	}

	/**
	 * @param entityClazz name of a jpa entity class
	 */
	public void setEntityClass(Class<E> entityClazz) {
		this.entityClass = entityClazz;
	}

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

}

		Assert.state(StringUtils.hasText(this.namedQuery), "Named query cannot be empty");
		Assert.state(this.entityClass != null, "Entity class cannot be NULL");
	
<methods>public non-sealed void <init>() ,public void setEntityManager(jakarta.persistence.EntityManager) <variables>private jakarta.persistence.EntityManager entityManager