Annotation Type NamedStoredProcedureQuery


@Target(TYPE) @Retention(RUNTIME) @Repeatable(NamedStoredProcedureQueries.class) public @interface NamedStoredProcedureQuery
A NamedStoredProcedureQuery annotation allows the definition of queries that call stored procedures as named queries. A NamedStoredProcedureQuery annotation may be defined on an Entity or MappedSuperclass.
See Also:
Author:
Guy Pelletier
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    (Required) Unique name that references this stored procedure query.
    (Required) The name of the stored procedure.
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    boolean
    (Optional) Defines if the stored procedure should be called by index or by name.
    jakarta.persistence.QueryHint[]
    (Optional) Query hints.
    boolean
    (Optional) Defines if the stored procedure returns multiple result sets.
    (Optional) Defines the parameters to the stored procedure.
    Deprecated. 
    (Optional) Refers to the classes of the result.
    Deprecated. 
    (Optional) The names of the SQLResultMappings.
    boolean
    (Optional) Defines if stored procedure returns a result set.
  • Element Details

    • name

      String name
      (Required) Unique name that references this stored procedure query.
    • procedureName

      String procedureName
      (Required) The name of the stored procedure.
    • hints

      jakarta.persistence.QueryHint[] hints
      (Optional) Query hints.
      Default:
      {}
    • resultClass

      Class resultClass
      Deprecated.
      (Optional) Refers to the class of the result.
      See Also:
      Default:
      void.class
    • resultClasses

      Class[] resultClasses
      (Optional) Refers to the classes of the result.
      Default:
      {}
    • resultSetMapping

      String resultSetMapping
      Deprecated.
      (Optional) The name of the SQLResultMapping.
      See Also:
      Default:
      ""
    • resultSetMappings

      String[] resultSetMappings
      (Optional) The names of the SQLResultMappings.
      Default:
      {}
    • returnsResultSet

      boolean returnsResultSet
      (Optional) Defines if stored procedure returns a result set. This is only relevant on databases that support returning result sets from stored procedures.
      Default:
      false
    • multipleResultSets

      boolean multipleResultSets
      (Optional) Defines if the stored procedure returns multiple result sets. This is only relevant on databases that support multiple result sets from stored procedures.
      Default:
      false
    • callByIndex

      boolean callByIndex
      (Optional) Defines if the stored procedure should be called by index or by name. By index requires that the StoredProcedureParameter are defined in the same order as the procedure on the database. By name requires the database platform support naming procedure parameters.
      Default:
      false
    • parameters

      (Optional) Defines the parameters to the stored procedure.
      Default:
      {}