Annotation Type EdmFunction


@Retention(RUNTIME) @Target({TYPE,METHOD}) public @interface EdmFunction
Metadata of a function, see edm:Function.

Author:
Oliver Grande
  • Nested Class Summary

    Nested Classes
    Modifier and Type
    Class
    Description
    static interface 
    Define if the return type for the function.
  • Required Element Summary

    Required Elements
    Modifier and Type
    Required Element
    Description
    Define the return type of this function
  • Optional Element Summary

    Optional Elements
    Modifier and Type
    Optional Element
    Description
    Defines the name of a User Defined Function on the database
    boolean
    Indicates that a Function Import shall be generated into the Container.
    boolean
    Indicates that the Function is bound.
    Defines the name of the function in the service document.
     
  • Element Details

    • returnType

      Define the return type of this function
      Returns:
      return type of this function
    • name

      String name
      Defines the name of the function in the service document. This is a required attribute for database based functions and can be omitted for java based functions.
      Returns:
      Default:
      ""
    • parameter

      EdmParameter[] parameter
      Default:
      {}
    • functionName

      String functionName
      Defines the name of a User Defined Function on the database
      Returns:
      Default:
      ""
    • isBound

      boolean isBound
      Indicates that the Function is bound.

      If isBound is false a function is treated as unbound, so it can be accessed either via a Function Import or be used in filter or orderby expression. Otherwise the function is treated as bound. For details see: OData Version 4.0 Part 3 - 12.2.2 Attribute IsBound

      If the function is java based isBound is ignored and always set to false

      Returns:
      Default:
      true
    • hasFunctionImport

      boolean hasFunctionImport
      Indicates that a Function Import shall be generated into the Container. For details see: OData Version 4.0 Part 3 - 13.6 Element edm:FunctionImport

      hasFunctionImport is handled as follows:

      1. For bound functions hasFunctionImport is always treated as false
      2. For unbound functions in case hasFunctionImport is true a function import is generated, which allows to be call a function from the container
      If the function is java based hasFunctionImport is ignored and always set to true
      Returns:
      Default:
      false