Notice: this Wiki will be going read only early in 2024 and edits will no longer be possible. Please see: https://gitlab.eclipse.org/eclipsefdn/helpdesk/-/wikis/Wiki-shutdown-plan for the plan.
EclipseLink/Examples/JPA/StoredProcedures
< EclipseLink | Examples | JPA
Revision as of 10:50, 1 February 2011 by James.sutherland.oracle.com (Talk | contribs)
In addition to JPQL, EclipseLink defines a rich DatabaseQuery and Expression criteria API.
See:
Oracle stored procedure using OUT CURSOR
Using JpaEntityManager createQuery() API to execute a stored procedure
import javax.persistence.Query; import org.eclipse.persistence.queries.StoredProcedureCall; import org.eclipse.persistence.queries.ReadAllQuery; ReadAllQuery databaseQuery = new ReadAllQuery(Employee.class); StoredProcedureCall call = new StoredProcedureCall(); Query query = ((JpaEntityManager)entityManager.getDelegate()).createQuery(databaseQuery); List result = query.getResultList();