StoredProcedureQuery createStoredProcedureQuery(
String procedureName,
Class... resultClasses
)
Create an instance of
StoredProcedureQuery
for executing a stored procedure in the database. Parameters must be registered before the stored procedure can be executed.
The resultClass
arguments must be specified in the order in which the result sets will be returned by the stored procedure invocation.
- Parameters:
procedureName
- name of the stored procedure in the databaseresultClasses
- classes to which the result sets produced by the stored procedure are to be mapped
- Return:
- the new stored procedure query instance
- Throws:
- IllegalArgumentException - if a stored procedure of the given name does not exist (or the query execution will fail)
- Since:
- JPA 2.1