org.odata4j.core
Interface OEntity


public interface OEntity

An immutable OData entity instance, consisting of an identity (an entity-set and a unique entity-key within that set), properties (typed, named values), and links (references to other entities).

The OEntities static factory class can be used to create OEntity instances.

See Also:
OEntities

Method Summary
 OEntityKey getEntityKey()
          Gets the entity-key for this instance.
 EdmEntitySet getEntitySet()
          Gets the entity-set for this instance.
<T extends OLink>
T
getLink(String title, Class<T> linkClass)
          Get a link with a given name and link-type.
 List<OLink> getLinks()
          Get all links of this instance.
 List<OProperty<?>> getProperties()
          Get all properties of this instance.
 OProperty<?> getProperty(String propName)
          Get a property by name.
<T> OProperty<T>
getProperty(String propName, Class<T> propClass)
          Get a property by name as a strongly-typed OProperty.
 

Method Detail

getEntityKey

OEntityKey getEntityKey()
Gets the entity-key for this instance.

Returns:
the entity-key

getEntitySet

EdmEntitySet getEntitySet()
Gets the entity-set for this instance.

Returns:
the entity-set

getLink

<T extends OLink> T getLink(String title,
                            Class<T> linkClass)
Get a link with a given name and link-type.

Type Parameters:
T - the link-type as a java-type
Parameters:
title - the link title
linkClass - the link-type as a java-type
Returns:
the link strongly-typed as the java-type

getLinks

List<OLink> getLinks()
Get all links of this instance.

Returns:
the links

getProperties

List<OProperty<?>> getProperties()
Get all properties of this instance.

Returns:
the properties

getProperty

OProperty<?> getProperty(String propName)
Get a property by name.

Parameters:
propName - the property name
Returns:
the property

getProperty

<T> OProperty<T> getProperty(String propName,
                             Class<T> propClass)
Get a property by name as a strongly-typed OProperty.

Type Parameters:
T - the java-type of the property
Parameters:
propName - the property name
propClass - the java-type of the property
Returns:
the property


http://odata4j.org