Hibernate JPA @NamedStoredProcedureQueries Example
@NamedStoredProcedureQueries
The @NamedStoredProcedureQueries annotation is used to group multiple @NamedStoredProcedureQuery annotations. NamedStoredProcedureQueries specifies multiple named stored procedure queries. Query names are scoped to the persistence unit. The NamedStoredProcedureQueries annotation can be applied to an entity or mapped superclass.Oracle REF_CURSOR named query stored procedure
@NamedStoredProcedureQueries(@NamedStoredProcedureQuery(
name = "sp_person_phones",
procedureName = "sp_person_phones",
parameters = {
@StoredProcedureParameter(
name = "personId",
type = Long.class,
mode = ParameterMode.IN
),
@StoredProcedureParameter(
name = "personPhones",
type = Class.class,
mode = ParameterMode.REF_CURSOR
)
}
)
)
Comments
Post a Comment