org.apache.olingo.client.api.serialization

## 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.

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `InputStream` | `writeEntities(Collection<ClientEntity> entities, ContentType contentType)` Writes a collection of OData entities.
    `InputStream` | `writeEntity(ClientEntity entity, ContentType format)` Serializes a single OData entity.
    `InputStream` | `writeLink(ClientLink link, ContentType format)` Writes an OData link.
    `InputStream` | `writeProperty(ClientProperty property, ContentType format)` Writes a single OData entity property.
    `InputStream` | `writeReference(ResWrap<URI> reference, ContentType format)` Writes a entity reference

- - ### Method Detail

    - #### 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

          InputStream writeEntity(ClientEntity entity,
                                  ContentType format)
                           throws ODataSerializerException

      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

          InputStream writeLink(ClientLink link,
                                ContentType format)
                         throws ODataSerializerException

      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 serialized
        `contentType` - serialization format
      Returns:
        stream of serialized objects
      Throws:
        `ODataSerializerException`

Copyright © 2013–2020 The Apache Software Foundation. All rights reserved.