org.odata4j.consumer
Class AbstractODataClient
java.lang.Object
org.odata4j.consumer.AbstractODataClient
- All Implemented Interfaces:
- ODataClient
- Direct Known Subclasses:
- ODataCxfClient
public abstract class AbstractODataClient
- extends Object
- implements ODataClient
Useful base class for ODataClient implementations with common functionality.
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
AbstractODataClient
protected AbstractODataClient(FormatType formatType)
callFunction
public ODataClientResponse callFunction(ODataClientRequest request)
throws ODataProducerException
- Specified by:
callFunction in interface ODataClient
- Throws:
ODataProducerException
createEntity
public ODataClientResponse createEntity(ODataClientRequest request)
throws ODataProducerException
- Specified by:
createEntity in interface ODataClient
- Throws:
ODataProducerException
createLink
public void createLink(ODataClientRequest request)
throws ODataProducerException
- Specified by:
createLink in interface ODataClient
- Throws:
ODataProducerException
createRequestEntry
public Entry createRequestEntry(EdmEntitySet entitySet,
OEntityKey entityKey,
List<OProperty<?>> props,
List<OLink> links)
- Specified by:
createRequestEntry in interface ODataClient
deleteEntity
public void deleteEntity(ODataClientRequest request)
throws ODataProducerException
- Specified by:
deleteEntity in interface ODataClient
- Throws:
ODataProducerException
deleteLink
public void deleteLink(ODataClientRequest request)
throws ODataProducerException
- Specified by:
deleteLink in interface ODataClient
- Throws:
ODataProducerException
doRequest
protected abstract ODataClientResponse doRequest(FormatType reqType,
ODataClientRequest request,
Response.StatusType... expectedResponseStatus)
throws ODataProducerException
- Throws:
ODataProducerException
getCollections
public Iterable<AtomCollectionInfo> getCollections(ODataClientRequest request)
throws ODataProducerException
- Specified by:
getCollections in interface ODataClient
- Throws:
ODataProducerException
getEntities
public ODataClientResponse getEntities(ODataClientRequest request)
throws ODataProducerException
- Specified by:
getEntities in interface ODataClient
- Throws:
ODataProducerException
getEntity
public ODataClientResponse getEntity(ODataClientRequest request)
throws ODataProducerException
- Specified by:
getEntity in interface ODataClient
- Throws:
ODataProducerException
getFormatType
public FormatType getFormatType()
- Specified by:
getFormatType in interface ODataClient
getLinks
public Iterable<SingleLink> getLinks(ODataClientRequest request)
throws ODataProducerException
- Specified by:
getLinks in interface ODataClient
- Throws:
ODataProducerException
getMetadata
public EdmDataServices getMetadata(ODataClientRequest request)
throws ODataProducerException
- Specified by:
getMetadata in interface ODataClient
- Throws:
ODataProducerException
toXml
protected abstract XMLEventReader2 toXml(ODataClientResponse response)
updateEntity
public void updateEntity(ODataClientRequest request)
throws ODataProducerException
- Specified by:
updateEntity in interface ODataClient
- Throws:
ODataProducerException
updateLink
public void updateLink(ODataClientRequest request)
throws ODataProducerException
- Specified by:
updateLink in interface ODataClient
- Throws:
ODataProducerException
http://odata4j.org