Class ODataSchema

java.lang.Object
de.hybris.platform.odata2services.odata.ODataSchema

public class ODataSchema extends Object
A helper class for exploring and evaluating content of an OData Schema object.
  • Method Details

    • from

      public static ODataSchema from(org.apache.olingo.odata2.api.edm.provider.Schema schema)
    • isEmpty

      public boolean isEmpty()
      Checks whether content of this schema is empty.
      Returns:
      true, if this schema has empty content; false, if at least one element (XML element) is found in the schema content.
    • getEntityTypeNames

      public Collection<String> getEntityTypeNames()
      Retrieves names of all entity types defined in this schema.
      Returns:
      a collection of all entity type names present in this schema or an empty collection, if this schema does not contain a single entity type.
    • getEntityType

      public ODataEntityType getEntityType(String type)
      Retrieves an entity type defined in this schema.
      Parameters:
      type - name of the type to retrieve
      Returns:
      entity type matching the type name.
      Throws:
      IllegalArgumentException - if the specified type does not exist in this schema.
    • containsAssociationBetween

      public boolean containsAssociationBetween(String type1, String type2)
    • getAssociation

      public org.apache.olingo.odata2.api.edm.provider.Association getAssociation(String name)
    • getAssociations

      public Collection<org.apache.olingo.odata2.api.edm.provider.Association> getAssociations()
    • getDefaultEntityContainer

      public ODataEntityContainer getDefaultEntityContainer()
      Retrieves default entity container in this schema content.
      Returns:
      the default entity container or null, if default entity container is not present.