org.apache.olingo.client.api.communication.request.cud

## Interface CUDRequestFactory

-     public interface CUDRequestFactory

- - ### Method Summary

    All Methods Instance Methods Abstract Methods
    Modifier and Type | Method and Description
    --- | ---
    `ODataDeleteRequest` | `getDeleteRequest(URI targetURI)` Gets a delete request object instance.
    `<E extends ClientEntity> ODataEntityCreateRequest<E>` | `getEntityCreateRequest(URI targetURI, E entity)` Gets a create request object instance.
    `<E extends ClientEntity> ODataEntityUpdateRequest<E>` | `getEntityUpdateRequest(UpdateType type, E entity)` Gets an update request object instance; uses entity's edit link as endpoint.
    `<E extends ClientEntity> ODataEntityUpdateRequest<E>` | `getEntityUpdateRequest(URI targetURI, UpdateType type, E changes)` Gets an update request object instance.
    `<E extends ClientEntity> ODataMediaEntityCreateRequest<E>` | `getMediaEntityCreateRequest(URI targetURI, InputStream media)` Gets a media entity create request object instance.
    `<E extends ClientEntity> ODataMediaEntityUpdateRequest<E>` | `getMediaEntityUpdateRequest(URI editURI, InputStream media)` Gets a media entity update request object instance.
    `ODataPropertyUpdateRequest` | `getPropertyCollectionValueUpdateRequest(URI targetURI, ClientProperty property)` Gets an update request object instance.
    `ODataPropertyUpdateRequest` | `getPropertyComplexValueUpdateRequest(URI targetURI, UpdateType type, ClientProperty property)` Gets an update request object instance.
    `ODataPropertyUpdateRequest` | `getPropertyPrimitiveValueUpdateRequest(URI targetURI, ClientProperty property)` Gets an update request object instance.
    `ODataReferenceAddingRequest` | `getReferenceAddingRequest(URI serviceRoot, URI targetURI, URI reference)` A successful POST request to a navigation property's references collection adds a relationship to an existing entity.
    `ODataReferenceAddingRequest` | `getReferenceSingleChangeRequest(URI serviceRoot, URI targetURI, URI reference)` A successful PUT request to a single-valued navigation property�s reference resource changes the related entity.
    `ODataEntityUpdateRequest<ClientSingleton>` | `getSingletonUpdateRequest(UpdateType type, ClientSingleton entity)`
    `ODataEntityUpdateRequest<ClientSingleton>` | `getSingletonUpdateRequest(URI targetURI, UpdateType type, ClientSingleton changes)`
    `ODataStreamUpdateRequest` | `getStreamUpdateRequest(URI targetURI, InputStream stream)` Gets a stream update request object instance.
    `ODataValueUpdateRequest` | `getValueUpdateRequest(URI targetURI, UpdateType type, ClientPrimitiveValue value)` Gets a create request object instance.

- - ### Method Detail

    - #### getEntityCreateRequest

          <E extends ClientEntity> ODataEntityCreateRequest<E> getEntityCreateRequest(URI targetURI,
                                                                                      E entity)

      Gets a create request object instance.
      Use this kind of request to create a new entity.
      Type Parameters:
        `E` - concrete ODataEntity implementation
      Parameters:
        `targetURI` - entity set URI.
        `entity` - entity to be created.
      Returns:
        new ODataEntityCreateRequest instance.

    - #### getEntityUpdateRequest

          <E extends ClientEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(URI targetURI,
                                                                                      UpdateType type,
                                                                                      E changes)

      Gets an update request object instance.
      Type Parameters:
        `E` - concrete ODataEntity implementation
      Parameters:
        `targetURI` - edit link of the object to be updated.
        `type` - type of update to be performed.
        `changes` - changes to be applied.
      Returns:
        new ODataEntityUpdateRequest instance.

    - #### getEntityUpdateRequest

          <E extends ClientEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(UpdateType type,
                                                                                      E entity)

      Gets an update request object instance; uses entity's edit link as endpoint.
      Type Parameters:
        `E` - concrete ODataEntity implementation
      Parameters:
        `type` - type of update to be performed.
        `entity` - changes to be applied.
      Returns:
        new ODataEntityUpdateRequest instance.

    - #### getValueUpdateRequest

          ODataValueUpdateRequest getValueUpdateRequest(URI targetURI,
                                                        UpdateType type,
                                                        ClientPrimitiveValue value)

      Gets a create request object instance.
      Use this kind of request to create a new value (e.g. http://Northwind.svc/Customer(1)/Picture/$value).
      Parameters:
        `targetURI` - entity set or entity or entity property URI.
        `type` - type of update to be performed.
        `value` - value to be created.
      Returns:
        new ODataValueUpdateRequest instance.

    - #### getPropertyPrimitiveValueUpdateRequest

          ODataPropertyUpdateRequest getPropertyPrimitiveValueUpdateRequest(URI targetURI,
                                                                            ClientProperty property)

      Gets an update request object instance.
      Use this kind of request to update a primitive property value.
      Parameters:
        `targetURI` - entity set or entity or entity property URI.
        `property` - value to be update.
      Returns:
        new ODataPropertyUpdateRequest instance.

    - #### getPropertyComplexValueUpdateRequest

          ODataPropertyUpdateRequest getPropertyComplexValueUpdateRequest(URI targetURI,
                                                                          UpdateType type,
                                                                          ClientProperty property)

      Gets an update request object instance.
      Use this kind of request to update a complex property value.
      Parameters:
        `targetURI` - entity set or entity or entity property URI.
        `type` - type of update to be performed.
        `property` - value to be update.
      Returns:
        new ODataPropertyUpdateRequest instance.

    - #### getPropertyCollectionValueUpdateRequest

          ODataPropertyUpdateRequest getPropertyCollectionValueUpdateRequest(URI targetURI,
                                                                             ClientProperty property)

      Gets an update request object instance.
      Use this kind of request to update a collection property value.
      Parameters:
        `targetURI` - entity set or entity or entity property URI.
        `property` - value to be update.
      Returns:
        new ODataPropertyUpdateRequest instance.

    - #### getDeleteRequest

          ODataDeleteRequest getDeleteRequest(URI targetURI)

      Gets a delete request object instance.
      Use this kind of request to delete an entity and media entity as well.
      Parameters:
        `targetURI` - edit link of the object to be removed.
      Returns:
        new ODataDeleteRequest instance.

    - #### getMediaEntityCreateRequest

          <E extends ClientEntity> ODataMediaEntityCreateRequest<E> getMediaEntityCreateRequest(URI targetURI,
                                                                                                InputStream media)

      Gets a media entity create request object instance.
      Use this kind of request to create a new media entity.
      Type Parameters:
        `E` - concrete ODataEntity implementation
      Parameters:
        `targetURI` - entity set URI.
        `media` - entity blob to be created.
      Returns:
        new ODataMediaEntityCreateRequest instance.

    - #### getStreamUpdateRequest

          ODataStreamUpdateRequest getStreamUpdateRequest(URI targetURI,
                                                          InputStream stream)

      Gets a stream update request object instance.
      Use this kind of request to update a named stream property.
      Parameters:
        `targetURI` - target URI.
        `stream` - stream to be updated.
      Returns:
        new ODataStreamUpdateRequest instance.

    - #### getMediaEntityUpdateRequest

          <E extends ClientEntity> ODataMediaEntityUpdateRequest<E> getMediaEntityUpdateRequest(URI editURI,
                                                                                                InputStream media)

      Gets a media entity update request object instance.
      Use this kind of request to update a media entity.
      Type Parameters:
        `E` - concrete ODataEntity implementation
      Parameters:
        `editURI` - media entity edit link URI.
        `media` - entity blob to be updated.
      Returns:
        new ODataMediaEntityUpdateRequest instance.

    - #### getSingletonUpdateRequest

          ODataEntityUpdateRequest<ClientSingleton> getSingletonUpdateRequest(URI targetURI,
                                                                              UpdateType type,
                                                                              ClientSingleton changes)

    - #### getSingletonUpdateRequest

          ODataEntityUpdateRequest<ClientSingleton> getSingletonUpdateRequest(UpdateType type,
                                                                              ClientSingleton entity)

    - #### getReferenceAddingRequest

          ODataReferenceAddingRequest getReferenceAddingRequest(URI serviceRoot,
                                                                URI targetURI,
                                                                URI reference)

      A successful POST request to a navigation property's references collection adds a relationship to an existing entity. The request body MUST contain a single entity reference that identifies the entity to be added. [OData-Protocol 4.0 - 11.4.6.1]
      Parameters:
        `serviceRoot` - serviceRoot URI
        `targetURI` - navigation property reference collection URI
        `reference` - entity reference
      Returns:
        new ODataReferenceAddingRequest instance.

    - #### getReferenceSingleChangeRequest

          ODataReferenceAddingRequest getReferenceSingleChangeRequest(URI serviceRoot,
                                                                      URI targetURI,
                                                                      URI reference)

      A successful PUT request to a single-valued navigation property�s reference resource changes the related entity. The request body MUST contain a single entity reference that identifies the existing entity to be related. [OData-Protocol 4.0 - 11.4.6.3]
      Parameters:
        `serviceRoot` - serviceRoot URI
        `targetURI` - single-valued navigation property URI
        `reference` - reference
      Returns:
        new ODataReferenceAddingRequest instance

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