public class

Responses

extends Object
java.lang.Object
   ↳ org.odata4j.producer.Responses

Class Overview

A static factory to create immutable EntitiesResponse, EntityResponse, PropertyResponse, EntityIdResponse, ComplexObjectResponse, or CollectionResponse instances.

Summary

Public Methods
static <T extends OObject> CollectionResponse<?> collection(OCollection<T> collection)
Creates a new CollectionResponse instance.
static ComplexObjectResponse complexObject(OComplexObject complexObject)
Creates a new ComplexObjectResponse instance.
static CountResponse count(long count)
static EntitiesResponse entities(List<OEntity> entities, EdmEntitySet entitySet, Integer inlineCount, String skipToken)
Creates a new EntitiesResponse instance.
static EntityResponse entity(OEntity entity)
Creates a new EntityResponse instance.
static <T extends OEntityId> EntityIdResponse multipleIds(Iterable<T> entityIds)
Creates a new EntityIdResponse instance for payloads with a cardinality of MANY.
static PropertyResponse property(OProperty<?> property)
Creates a new PropertyResponse instance.
static <T extends OEntityId> EntityIdResponse singleId(T entityId)
Creates a new EntityIdResponse instance for payloads with a cardinality of ONE.
[Expand]
Inherited Methods
From class java.lang.Object

Public Methods

public static CollectionResponse<?> collection (OCollection<T> collection)

Creates a new CollectionResponse instance.

Parameters
collection The collection
Returns
  • a new ComplexObjectResponse instance

public static ComplexObjectResponse complexObject (OComplexObject complexObject)

Creates a new ComplexObjectResponse instance.

Parameters
complexObject The complex object
Returns
  • a new ComplexObjectResponse instance

public static CountResponse count (long count)

Parameters
count

public static EntitiesResponse entities (List<OEntity> entities, EdmEntitySet entitySet, Integer inlineCount, String skipToken)

Creates a new EntitiesResponse instance.

Parameters
entities The OData entities, if any
entitySet The entity-set
inlineCount The inline-count value, if necessary
skipToken The continuation-token, if necessary
Returns
  • a new EntitiesResponse instance

public static EntityResponse entity (OEntity entity)

Creates a new EntityResponse instance.

Parameters
entity The OData entity
Returns
  • a new EntityResponse instance

public static EntityIdResponse multipleIds (Iterable<T> entityIds)

Creates a new EntityIdResponse instance for payloads with a cardinality of MANY.

Parameters
entityIds The payload entities
Returns
  • a new EntityIdResponse instance

public static PropertyResponse property (OProperty<?> property)

Creates a new PropertyResponse instance.

Parameters
property The property value
Returns
  • a new PropertyResponse instance

public static EntityIdResponse singleId (T entityId)

Creates a new EntityIdResponse instance for payloads with a cardinality of ONE.

Parameters
entityId The payload entity
Returns
  • a new EntityIdResponse instance