Annotation Type EdmNavigationProperty


  • @Retention(RUNTIME)
    @Target(FIELD)
    public @interface EdmNavigationProperty

    Annotation for definition of an EdmNavigationProperty for an EdmEntityType which contains the navigation property as a field.

    The EdmNavigationProperty annotation has to be used on a field within a EdmEntityType annotated class.
    • Optional Element Summary

      Optional Elements 
      Modifier and Type Optional Element Description
      String association
      Define the name for the related Edm Association Set (of the Navigation Property).
      String name
      Define the name for the Navigation Property.
      EdmNavigationProperty.Multiplicity toMultiplicity
      Define the multiplicity to the target EdmEntity of the Navigation Property.
      String toRole
      Define the name for the related Edm Role (of the Navigation Property).
      Class<?> toType
      Define the target entity in form of a java class for the Navigation Property.
    • Element Detail

      • name

        String name
        Define the name for the Navigation Property. If not set a default value has to be generated by the EDM provider.
        Returns:
        name for the Navigation Property
        Default:
        ""
      • toType

        Class<?> toType
        Define the target entity in form of a java class for the Navigation Property. The referenced java class must be annotated with EdmEntityType. If not set a EDM provider should be able to determine the corresponding type or to handle the default setting.
        Returns:
        referenced java class which must be annotated with EdmEntityType.
        Default:
        java.lang.Object.class
      • association

        String association
        Define the name for the related Edm Association Set (of the Navigation Property). If not set a default value has to be generated by the EDM provider.
        Returns:
        name for the related Edm Association Set (of the Navigation Property).
        Default:
        ""
      • toRole

        String toRole
        Define the name for the related Edm Role (of the Navigation Property). If not set a default value has to be generated by the EDM provider.
        Returns:
        name for the related Edm Role (of the Navigation Property).
        Default:
        ""
      • toMultiplicity

        EdmNavigationProperty.Multiplicity toMultiplicity
        Define the multiplicity to the target EdmEntity of the Navigation Property. If not set a default multiplicity of ONE is assumed. This could be overwritten by the EDM provider if the correct multiplicity can be determined. As example: The default multiplicity of ONE on a field (EdmProperty) with a java type Collection can be overwritten by a multiplicity of MANY.
        Returns:
        multiplicity to the target EdmEntity of the Navigation Property.
        Default:
        org.apache.olingo.odata2.api.annotation.edm.EdmNavigationProperty.Multiplicity.ONE