org.apache.olingo.odata2.api.annotation.edm
Annotation Type EdmNavigationProperty


@Retention(value=RUNTIME)
@Target(value=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
 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.
 

name

public abstract 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

public abstract 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

public abstract 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

public abstract 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

public abstract 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


Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.