org.odata4j.edm
Class EdmNavigationProperty
java.lang.Object
org.odata4j.edm.EdmItem
org.odata4j.edm.EdmPropertyBase
org.odata4j.edm.EdmNavigationProperty
- All Implemented Interfaces:
- Named
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)
getFromRole
public EdmAssociationEnd getFromRole()
getRelationship
public EdmAssociation getRelationship()
getToRole
public EdmAssociationEnd getToRole()
newBuilder
public static EdmNavigationProperty.Builder newBuilder(String name)
toString
public String toString()
- Overrides:
toString
in class Object
http://odata4j.org