Class EdmNavigationProperty

  extended by org.odata4j.edm.EdmItem
      extended by org.odata4j.edm.EdmPropertyBase
          extended by org.odata4j.edm.EdmNavigationProperty
All Implemented Interfaces:

public class EdmNavigationProperty
extends EdmPropertyBase

A CSDL NavigationProperty element.

A NavigationProperty element defines a navigation property, which provides a reference to the other end of an association. Unlike properties defined with the Property element, navigation properties do not define the shape and characteristics of data. They provide a way to navigate an association between two entity types.

Note that navigation properties are optional on both entity types at the ends of an association. If you define a navigation property on one entity type at the end of an association, you do not have to define a navigation property on the entity type at the other end of the association.

The data type returned by a navigation property is determined by the multiplicity of its remote association end. For example, suppose a navigation property, OrdersNavProp, exists on a Customer entity type and navigates a one-to-many association between Customer and Order. Because the remote association end for the navigation property has multiplicity many (*), its data type is a collection (of Order). Similarly, if a navigation property, CustomerNavProp, exists on the Order entity type, its data type would be Customer since the multiplicity of the remote end is one (1).

See Also:
[msdn] NavigationProperty Element (CSDL)

Nested Class Summary
static class EdmNavigationProperty.Builder
          Mutable builder for EdmNavigationProperty objects.
Method Summary
 EdmAssociationEnd getFromRole()
 EdmAssociation getRelationship()
 EdmAssociationEnd getToRole()
static EdmNavigationProperty.Builder newBuilder(String name)
 String toString()
Methods inherited from class org.odata4j.edm.EdmPropertyBase
Methods inherited from class org.odata4j.edm.EdmItem
findAnnotation, getAnnotations, getDocumentation
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait

Method Detail


public EdmAssociationEnd getFromRole()


public EdmAssociation getRelationship()


public EdmAssociationEnd getToRole()


public static EdmNavigationProperty.Builder newBuilder(String name)


public String toString()
toString in class Object