org.odata4j.edm
Class EdmEntityType

java.lang.Object
  extended by org.odata4j.edm.EdmItem
      extended by org.odata4j.edm.EdmType
          extended by org.odata4j.edm.EdmNonSimpleType
              extended by org.odata4j.edm.EdmStructuralType
                  extended by org.odata4j.edm.EdmEntityType
All Implemented Interfaces:
Named

public class EdmEntityType
extends EdmStructuralType

A CSDL EntityType element.

The EntityType element represents the structure of a top-level concept, such as a customer or order, in a conceptual model. An entity type is a template for instances of entity types in an application. Each template contains the following information:

  • A unique name. (Required.)
  • An entity key that is defined by one or more properties. (Required.)
  • Properties for containing data. (Optional.)
  • Navigation properties that allow for navigation from one end of an association to the other end. (Optional.)

    In an application, an instance of an entity type represents a specific object (such as a specific customer or order). Each instance of an entity type must have a unique entity key within an entity set.

    Two entity type instances are considered equal only if they are of the same type and the values of their entity keys are the same.

    See Also:
    [msdn] EntityType Element (CSDL)

    Nested Class Summary
    static class EdmEntityType.Builder
              Mutable builder for EdmEntityType objects.
     
    Nested classes/interfaces inherited from class org.odata4j.edm.EdmType
    EdmType.DeferredBuilder<T,TBuilder>
     
    Method Summary
     EdmNavigationProperty findDeclaredNavigationProperty(String name)
              Finds a navigation property by name on this entity type not including inherited properties.
     EdmNavigationProperty findNavigationProperty(String name)
              Finds a navigation property by name, searching up the type hierarchy if necessary.
     String getAlias()
               
     Enumerable<EdmNavigationProperty> getDeclaredNavigationProperties()
              Gets the navigation properties defined for this entity type not including inherited properties.
     String getFQAliasName()
               
     Boolean getHasStream()
               
     List<String> getKeys()
              Gets the keys for this EdmEntityType.
     Enumerable<EdmNavigationProperty> getNavigationProperties()
              Gets the navigation properties defined for this entity type including inherited properties.
    static EdmEntityType.Builder newBuilder()
               
    static EdmEntityType.Builder newBuilder(EdmEntityType entityType, org.odata4j.edm.EdmItem.BuilderContext context)
               
     String toString()
               
     
    Methods inherited from class org.odata4j.edm.EdmStructuralType
    findDeclaredProperty, findProperty, getBaseType, getDeclaredProperties, getIsAbstract, getName, getNamespace, getProperties, isRootType
     
    Methods inherited from class org.odata4j.edm.EdmNonSimpleType
    isSimple
     
    Methods inherited from class org.odata4j.edm.EdmType
    equals, getFullyQualifiedTypeName, getInstanceType, getSimple, hashCode, newDeferredBuilder
     
    Methods inherited from class org.odata4j.edm.EdmItem
    findAnnotation, getAnnotations, getDocumentation
     
    Methods inherited from class java.lang.Object
    clone, finalize, getClass, notify, notifyAll, wait, wait, wait
     

    Method Detail

    findDeclaredNavigationProperty

    public EdmNavigationProperty findDeclaredNavigationProperty(String name)
    Finds a navigation property by name on this entity type not including inherited properties.


    findNavigationProperty

    public EdmNavigationProperty findNavigationProperty(String name)
    Finds a navigation property by name, searching up the type hierarchy if necessary.


    getAlias

    public String getAlias()

    getDeclaredNavigationProperties

    public Enumerable<EdmNavigationProperty> getDeclaredNavigationProperties()
    Gets the navigation properties defined for this entity type not including inherited properties.


    getFQAliasName

    public String getFQAliasName()

    getHasStream

    public Boolean getHasStream()

    getKeys

    public List<String> getKeys()
    Gets the keys for this EdmEntityType. Keys are defined only in a root types.


    getNavigationProperties

    public Enumerable<EdmNavigationProperty> getNavigationProperties()
    Gets the navigation properties defined for this entity type including inherited properties.


    newBuilder

    public static EdmEntityType.Builder newBuilder()

    newBuilder

    public static EdmEntityType.Builder newBuilder(EdmEntityType entityType,
                                                   org.odata4j.edm.EdmItem.BuilderContext context)

    toString

    public String toString()
    Overrides:
    toString in class EdmType


    http://odata4j.org