org.apache.olingo.odata2.api.ep.callback
Class ReadResult

java.lang.Object
  extended by org.apache.olingo.odata2.api.ep.callback.ReadResult
Direct Known Subclasses:
ReadEntryResult, ReadFeedResult

public abstract class ReadResult
extends Object

A ReadResult represents an inlined navigation property which points to an entry or feed. The ReadResult contains the EntityProviderReadProperties which were used for read, the navigationPropertyName, the read/de-serialized inlined entity and information whether the inlined content is a feed (multiplicity of 1..m) or a single entry (multiplicity of 0..1 or 1..1). If inlined navigation property is nullable the ReadResult has the navigationPropertyName and a NULL entry set.


Field Summary
protected  EdmNavigationProperty navigationProperty
           
protected  EntityProviderReadProperties readProperties
           
 
Constructor Summary
ReadResult(EntityProviderReadProperties readProperties, EdmNavigationProperty navigationProperty)
          Constructor.
 
Method Summary
 EdmNavigationProperty getNavigationProperty()
           
 EntityProviderReadProperties getReadProperties()
           
abstract  Object getResult()
          Common access method to read result.
abstract  boolean isFeed()
          Return whether this entry is a feed (multiplicity of 1..m) or a single entry (multiplicity of 0..1 or 1..1).
 String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

readProperties

protected final EntityProviderReadProperties readProperties

navigationProperty

protected final EdmNavigationProperty navigationProperty
Constructor Detail

ReadResult

public ReadResult(EntityProviderReadProperties readProperties,
                  EdmNavigationProperty navigationProperty)
Constructor. Parameters MUST NOT BE NULL.

Parameters:
readProperties - read properties which are used to read enclosing parent entity
navigationProperty - emd navigation property information of found inline navigation property
Method Detail

getReadProperties

public EntityProviderReadProperties getReadProperties()
Returns:
read properties which were used to read enclosing parent entity

getNavigationProperty

public EdmNavigationProperty getNavigationProperty()
Returns:
emd navigation property information of found inline navigation property

getResult

public abstract Object getResult()
Common access method to read result.

Returns:
an ODataEntry for the case of an single read entry or a list of ODataEntry in the case of an read feed.

toString

public String toString()
Overrides:
toString in class Object

isFeed

public abstract boolean isFeed()
Return whether this entry is a feed (multiplicity of 1..m) or a single entry (multiplicity of 0..1 or 1..1).

Returns:
true for a feed and false for an entry


Copyright © 2013-2015 The Apache Software Foundation. All Rights Reserved.