Jakarta Persistence (JPA) Method
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 is returned by the stored procedure invocation.
- Parameters:
resultClasses- classes to which the result sets produced by the stored procedure are to be mappedprocedureName- name of the stored procedure in the database
- Returns:
- the new stored procedure query instance.
- Throws:
- if a stored procedure of the given name does not exist (or if query execution will fail).IllegalArgumentException
- Since:
- Jakarta Persistence (JPA) 2.1