Annotation Type NamedStoredFunctionQuery


@Target(TYPE) @Retention(RUNTIME) @Repeatable(NamedStoredFunctionQueries.class) public @interface NamedStoredFunctionQuery
A NamedStoredFunctionQuery annotation allows the definition of queries that call stored functions as named queries. A NamedStoredFunctionQuery annotation may be defined on an Entity or MappedSuperclass.
Author:
James
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    (Required) The name of the stored function.
    (Required) Unique name that references this stored function query.
    (Required) Defines the return value of the stored function.
  • 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.
    (Optional) Defines the parameters to the stored function.
    (Optional) The name of the SQLResultMapping.
  • Element Details

    • name

      String name
      (Required) Unique name that references this stored function query.
    • functionName

      String functionName
      (Required) The name of the stored function.
    • returnParameter

      StoredProcedureParameter returnParameter
      (Required) Defines the return value of the stored function.
    • hints

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

      String resultSetMapping
      (Optional) The name of the SQLResultMapping.
      Default:
      ""
    • 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 function.
      Default:
      {}