Interface ODataWriter
public interface ODataWriter
OData writer.
Use this interface to serialize an OData request body.
This interface provides method helpers to serialize a set of entities and a single entity as well.
Use this interface to serialize an OData request body.
This interface provides method helpers to serialize a set of entities and a single entity as well.
-
Method Summary
Modifier and TypeMethodDescriptionwriteEntities(Collection<ClientEntity> entities, ContentType contentType) Writes a collection of OData entities.writeEntity(ClientEntity entity, ContentType format) Serializes a single OData entity.writeLink(ClientLink link, ContentType format) Writes an OData link.writeProperty(ClientProperty property, ContentType format) Writes a single OData entity property.writeReference(ResWrap<URI> reference, ContentType format) Writes a entity reference
-
Method Details
-
writeEntities
InputStream writeEntities(Collection<ClientEntity> entities, ContentType contentType) throws ODataSerializerException Writes a collection of OData entities.- Parameters:
entities- entities to be serialized.contentType- serialization format.- Returns:
- stream of serialized objects.
- Throws:
ODataSerializerException
-
writeEntity
Serializes a single OData entity.- Parameters:
entity- entity to be serialized.contentType- serialization format.- Returns:
- stream of serialized object.
- Throws:
ODataSerializerException
-
writeProperty
InputStream writeProperty(ClientProperty property, ContentType format) throws ODataSerializerException Writes a single OData entity property.- Parameters:
property- entity property to be serialized.contentType- serialization format.- Returns:
- stream of serialized object.
- Throws:
ODataSerializerException
-
writeLink
Writes an OData link.- Parameters:
link- link to be serialized.contentType- serialization format.- Returns:
- stream of serialized object.
- Throws:
ODataSerializerException
-
writeReference
InputStream writeReference(ResWrap<URI> reference, ContentType format) throws ODataSerializerException Writes a entity reference- Parameters:
reference- reference to be serializedcontentType- serialization format- Returns:
- stream of serialized objects
- Throws:
ODataSerializerException
-