Class ODataSchema
java.lang.Object
de.hybris.platform.odata2services.odata.ODataSchema
A helper class for exploring and evaluating content of an OData
Schema object.-
Method Summary
Modifier and TypeMethodDescriptionbooleancontainsAssociationBetween(String type1, String type2) static ODataSchemafrom(org.apache.olingo.odata2.api.edm.provider.Schema schema) org.apache.olingo.odata2.api.edm.provider.AssociationgetAssociation(String name) Collection<org.apache.olingo.odata2.api.edm.provider.Association>Retrieves default entity container in this schema content.getEntityType(String type) Retrieves an entity type defined in this schema.Retrieves names of all entity types defined in this schema.booleanisEmpty()Checks whether content of this schema is empty.
-
Method Details
-
from
-
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
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
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
-
getAssociation
-
getAssociations
-
getDefaultEntityContainer
Retrieves default entity container in this schema content.- Returns:
- the default entity container or
null, if default entity container is not present.
-