I have stored procedures that need to be called to perform the operation. However, for each operation, I have saved the stored procedure name into the database. So, at runtime, based on the operation name I will call the assign stored procedure.
Question: 1. How can I set the name of the NamedStoredProcedureQuery at runtime?
I am using Spring JPA with Spring boot.
@NamedStoredProcedureQueries({
@NamedStoredProcedureQuery(
name = "sptest",
procedureName = "usp_helper_test",
resultClasses = {Config.class},
parameters = {
@StoredProcedureParameter(
name = "data",
type = String.class,
mode = ParameterMode.IN)
})
})
In this above example, I want to set procedureName at runtime.