org.odata4j.producer.resources
Class EntityRequestResource

java.lang.Object
  extended by org.odata4j.producer.resources.BaseResource
      extended by org.odata4j.producer.resources.EntityRequestResource

public class EntityRequestResource
extends BaseResource


Constructor Summary
EntityRequestResource()
           
 
Method Summary
 Response deleteEntity(HttpHeaders httpHeaders, UriInfo uriInfo, ContextResolver<ODataProducer> producerResolver, String format, String callback, String entitySetName, String id)
           
 Response getEntity(HttpHeaders httpHeaders, UriInfo uriInfo, ContextResolver<ODataProducer> producerResolver, String entitySetName, String id, String format, String callback, String expand, String select)
           
protected  Response getEntityImpl(HttpHeaders httpHeaders, UriInfo uriInfo, ODataProducer producer, String entitySetName, String id, String format, String callback, String expand, String select)
           
 LinksRequestResource getLinks(String entitySetName, String id, String targetNavProp, String targetId)
           
 PropertyRequestResource getNavProperty()
           
 PropertyRequestResource getSimpleNavProperty()
           
 ValueRequestResource getValue()
           
 Response mergeEntity(HttpHeaders httpHeaders, UriInfo uriInfo, ContextResolver<ODataProducer> producerResolver, String entitySetName, String id, String payload)
           
 Response updateEntity(HttpHeaders httpHeaders, UriInfo uriInfo, ContextResolver<ODataProducer> producerResolver, String entitySetName, String id, InputStream payload)
           
protected  Response updateEntity(HttpHeaders httpHeaders, UriInfo uriInfo, ContextResolver<ODataProducer> producerResolver, String entitySetName, String id, String payload)
          Updates an entity given a String payload.
protected  Response updateMediaLinkEntry(HttpHeaders httpHeaders, UriInfo uriInfo, ODataProducer producer, EdmEntitySet entitySet, InputStream payload, OEntityKey key)
          Updates the media resource found in the payload for the media link entry (mle) identified by the given key.
 
Methods inherited from class org.odata4j.producer.resources.BaseResource
createOrUpdateMediaLinkEntry, getMediaLinkExtension, getRequestEntity, getRequestEntity
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EntityRequestResource

public EntityRequestResource()
Method Detail

deleteEntity

public Response deleteEntity(@Context
                             HttpHeaders httpHeaders,
                             @Context
                             UriInfo uriInfo,
                             @Context
                             ContextResolver<ODataProducer> producerResolver,
                             String format,
                             String callback,
                             String entitySetName,
                             String id)
                      throws Exception
Throws:
Exception

getEntity

public Response getEntity(@Context
                          HttpHeaders httpHeaders,
                          @Context
                          UriInfo uriInfo,
                          @Context
                          ContextResolver<ODataProducer> producerResolver,
                          String entitySetName,
                          String id,
                          String format,
                          String callback,
                          String expand,
                          String select)

getEntityImpl

protected Response getEntityImpl(HttpHeaders httpHeaders,
                                 UriInfo uriInfo,
                                 ODataProducer producer,
                                 String entitySetName,
                                 String id,
                                 String format,
                                 String callback,
                                 String expand,
                                 String select)

getLinks

public LinksRequestResource getLinks(String entitySetName,
                                     String id,
                                     String targetNavProp,
                                     String targetId)

getNavProperty

public PropertyRequestResource getNavProperty()

getSimpleNavProperty

public PropertyRequestResource getSimpleNavProperty()

getValue

public ValueRequestResource getValue()

mergeEntity

public Response mergeEntity(@Context
                            HttpHeaders httpHeaders,
                            @Context
                            UriInfo uriInfo,
                            @Context
                            ContextResolver<ODataProducer> producerResolver,
                            String entitySetName,
                            String id,
                            String payload)

updateEntity

public Response updateEntity(@Context
                             HttpHeaders httpHeaders,
                             @Context
                             UriInfo uriInfo,
                             @Context
                             ContextResolver<ODataProducer> producerResolver,
                             String entitySetName,
                             String id,
                             InputStream payload)
                      throws Exception
Throws:
Exception

updateEntity

protected Response updateEntity(HttpHeaders httpHeaders,
                                UriInfo uriInfo,
                                ContextResolver<ODataProducer> producerResolver,
                                String entitySetName,
                                String id,
                                String payload)
                         throws Exception
Updates an entity given a String payload. Note: currently this exists because EntitiesRequestResource processBatch needs a version with a String payload. It may be possible (desirable?) to re-write batch handling completely such that it streamed individual batch items instead of loading the entire batch payload into memory and then processing the batch items.

Throws:
Exception

updateMediaLinkEntry

protected Response updateMediaLinkEntry(HttpHeaders httpHeaders,
                                        UriInfo uriInfo,
                                        ODataProducer producer,
                                        EdmEntitySet entitySet,
                                        InputStream payload,
                                        OEntityKey key)
                                 throws IOException
Updates the media resource found in the payload for the media link entry (mle) identified by the given key.

Returns:
HTTP 204 No Content response if successful.
Throws:
IOException


http://odata4j.org