Annotation Interface Function


@Target(METHOD) @Retention(RUNTIME) public @interface Function
Indicates a stored function call.

The annotated method must be a member of a Dao annotated interface.

 @Dao
 public interface EmployeeDao {

     @Function
     BigDecimal getSalary(@In Integer id, @Out Reference<String> name);
 }
 
The method may throw following exceptions:
See Also:
  • Element Details

    • catalog

      String catalog
      Returns:
      the catalog name for the stored function.
      Default:
      ""
    • schema

      String schema
      Returns:
      the schema name for the stored function.
      Default:
      ""
    • name

      String name
      The stored function name.

      If not specified, the annotated method name is used.

      Returns:
      the stored function name
      Default:
      ""
    • quote

      boolean quote
      Returns:
      whether quotation marks should be used for the catalog name, the schema name and the stored function name in SQL statements.
      Default:
      false
    • queryTimeout

      int queryTimeout
      The query timeout in seconds.

      If not specified, Config.getQueryTimeout() is used.

      Returns:
      the query timeout
      See Also:
      Default:
      -1
    • mapKeyNaming

      MapKeyNamingType mapKeyNaming
      The naming convention for keys of Map<Object, String>.

      This value is used only if a result set is fetched as Map<Object, String> or List<Map<Object, String>>.

      Returns:
      the naming convention to be used for map keys when fetching results
      Default:
      NONE
    • ensureResultMapping

      boolean ensureResultMapping
      Whether to ensure that all entity properties are mapped to columns of a result set.

      This value is used only if the result set is fetched as an entity or a entity list.

      If true and there are some unmapped properties、 ResultMappingException is thrown from the annotated method.

      Returns:
      whether to ensure that all entity properties are mapped to columns of a result set
      Default:
      false
    • sqlLog

      SqlLogType sqlLog
      Returns:
      the output format to be used for SQL logs when this function is executed.
      Default:
      FORMATTED