Class CUDRequestFactoryImpl
java.lang.Object
org.apache.olingo.client.core.communication.request.cud.CUDRequestFactoryImpl
- All Implemented Interfaces:
CUDRequestFactory
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptiongetDeleteRequest(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(URI targetURI, UpdateType type, E changes) Gets an update 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>
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.getPropertyCollectionValueUpdateRequest(URI targetURI, ClientProperty property) Gets an update request object instance.getPropertyComplexValueUpdateRequest(URI targetURI, UpdateType type, ClientProperty property) Gets an update request object instance.getPropertyPrimitiveValueUpdateRequest(URI targetURI, ClientProperty property) Gets an update request object instance.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.getReferenceSingleChangeRequest(URI serviceRoot, URI targetURI, URI reference) A successful PUT request to a single-valued navigation property�s reference resource changes the related entity.getSingletonUpdateRequest(URI targetURI, UpdateType type, ClientSingleton changes) getSingletonUpdateRequest(UpdateType type, ClientSingleton entity) getStreamUpdateRequest(URI targetURI, InputStream stream) Gets a stream update request object instance.getValueUpdateRequest(URI targetURI, UpdateType type, ClientPrimitiveValue value) Gets a create request object instance.
-
Field Details
-
client
-
-
Constructor Details
-
CUDRequestFactoryImpl
-
-
Method Details
-
getEntityCreateRequest
public <E extends ClientEntity> ODataEntityCreateRequest<E> getEntityCreateRequest(URI targetURI, E entity) Description copied from interface:CUDRequestFactoryGets a create request object instance.
Use this kind of request to create a new entity.- Specified by:
getEntityCreateRequestin interfaceCUDRequestFactory- Type Parameters:
E- concrete ODataEntity implementation- Parameters:
targetURI- entity set URI.entity- entity to be created.- Returns:
- new ODataEntityCreateRequest instance.
-
getEntityUpdateRequest
public <E extends ClientEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(URI targetURI, UpdateType type, E changes) Description copied from interface:CUDRequestFactoryGets an update request object instance.- Specified by:
getEntityUpdateRequestin interfaceCUDRequestFactory- 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
public <E extends ClientEntity> ODataEntityUpdateRequest<E> getEntityUpdateRequest(UpdateType type, E entity) Description copied from interface:CUDRequestFactoryGets an update request object instance; uses entity's edit link as endpoint.- Specified by:
getEntityUpdateRequestin interfaceCUDRequestFactory- Type Parameters:
E- concrete ODataEntity implementation- Parameters:
type- type of update to be performed.entity- changes to be applied.- Returns:
- new ODataEntityUpdateRequest instance.
-
getValueUpdateRequest
public ODataValueUpdateRequest getValueUpdateRequest(URI targetURI, UpdateType type, ClientPrimitiveValue value) Description copied from interface:CUDRequestFactoryGets a create request object instance.
Use this kind of request to create a new value (e.g. http://Northwind.svc/Customer(1)/Picture/$value).- Specified by:
getValueUpdateRequestin interfaceCUDRequestFactory- 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
public ODataPropertyUpdateRequest getPropertyPrimitiveValueUpdateRequest(URI targetURI, ClientProperty property) Description copied from interface:CUDRequestFactoryGets an update request object instance.
Use this kind of request to update a primitive property value.- Specified by:
getPropertyPrimitiveValueUpdateRequestin interfaceCUDRequestFactory- Parameters:
targetURI- entity set or entity or entity property URI.property- value to be update.- Returns:
- new ODataPropertyUpdateRequest instance.
-
getPropertyComplexValueUpdateRequest
public ODataPropertyUpdateRequest getPropertyComplexValueUpdateRequest(URI targetURI, UpdateType type, ClientProperty property) Description copied from interface:CUDRequestFactoryGets an update request object instance.
Use this kind of request to update a complex property value.- Specified by:
getPropertyComplexValueUpdateRequestin interfaceCUDRequestFactory- 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
public ODataPropertyUpdateRequest getPropertyCollectionValueUpdateRequest(URI targetURI, ClientProperty property) Description copied from interface:CUDRequestFactoryGets an update request object instance.
Use this kind of request to update a collection property value.- Specified by:
getPropertyCollectionValueUpdateRequestin interfaceCUDRequestFactory- Parameters:
targetURI- entity set or entity or entity property URI.property- value to be update.- Returns:
- new ODataPropertyUpdateRequest instance.
-
getDeleteRequest
Description copied from interface:CUDRequestFactoryGets a delete request object instance.
Use this kind of request to delete an entity and media entity as well.- Specified by:
getDeleteRequestin interfaceCUDRequestFactory- Parameters:
targetURI- edit link of the object to be removed.- Returns:
- new ODataDeleteRequest instance.
-
getMediaEntityCreateRequest
public <E extends ClientEntity> ODataMediaEntityCreateRequest<E> getMediaEntityCreateRequest(URI targetURI, InputStream media) Description copied from interface:CUDRequestFactoryGets a media entity create request object instance.
Use this kind of request to create a new media entity.- Specified by:
getMediaEntityCreateRequestin interfaceCUDRequestFactory- Type Parameters:
E- concrete ODataEntity implementation- Parameters:
targetURI- entity set URI.media- entity blob to be created.- Returns:
- new ODataMediaEntityCreateRequest instance.
-
getStreamUpdateRequest
Description copied from interface:CUDRequestFactoryGets a stream update request object instance.
Use this kind of request to update a named stream property.- Specified by:
getStreamUpdateRequestin interfaceCUDRequestFactory- Parameters:
targetURI- target URI.stream- stream to be updated.- Returns:
- new ODataStreamUpdateRequest instance.
-
getMediaEntityUpdateRequest
public <E extends ClientEntity> ODataMediaEntityUpdateRequest<E> getMediaEntityUpdateRequest(URI editURI, InputStream media) Description copied from interface:CUDRequestFactoryGets a media entity update request object instance.
Use this kind of request to update a media entity.- Specified by:
getMediaEntityUpdateRequestin interfaceCUDRequestFactory- Type Parameters:
E- concrete ODataEntity implementation- Parameters:
editURI- media entity edit link URI.media- entity blob to be updated.- Returns:
- new ODataMediaEntityUpdateRequest instance.
-
getSingletonUpdateRequest
public ODataEntityUpdateRequest<ClientSingleton> getSingletonUpdateRequest(UpdateType type, ClientSingleton entity) - Specified by:
getSingletonUpdateRequestin interfaceCUDRequestFactory
-
getSingletonUpdateRequest
public ODataEntityUpdateRequest<ClientSingleton> getSingletonUpdateRequest(URI targetURI, UpdateType type, ClientSingleton changes) - Specified by:
getSingletonUpdateRequestin interfaceCUDRequestFactory
-
getReferenceAddingRequest
public ODataReferenceAddingRequest getReferenceAddingRequest(URI serviceRoot, URI targetURI, URI reference) Description copied from interface:CUDRequestFactoryA 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]- Specified by:
getReferenceAddingRequestin interfaceCUDRequestFactory- Parameters:
serviceRoot- serviceRoot URItargetURI- navigation property reference collection URIreference- entity reference- Returns:
- new ODataReferenceAddingRequest instance.
-
getReferenceSingleChangeRequest
public ODataReferenceAddingRequest getReferenceSingleChangeRequest(URI serviceRoot, URI targetURI, URI reference) Description copied from interface:CUDRequestFactoryA 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]- Specified by:
getReferenceSingleChangeRequestin interfaceCUDRequestFactory- Parameters:
serviceRoot- serviceRoot URItargetURI- single-valued navigation property URIreference- reference- Returns:
- new ODataReferenceAddingRequest instance
-