|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface ODataConsumer
ODataConsumer is the client-side interface to an OData service.
Use ODataConsumers.create(String) or ODataConsumers.newBuilder(String) to connect to an existing OData service.
ODataConsumers| Nested Class Summary | |
|---|---|
static interface |
ODataConsumer.Builder
Mutable builder for ODataConsumer instances. |
static class |
ODataConsumer.Dump
Sends http request and/or response information to standard out. |
| Field Summary | |
|---|---|
static ODataConsumer.Dump |
dump
Sends http request and/or response information to standard out. |
| Method Summary | ||
|---|---|---|
OFunctionRequest<OObject> |
callFunction(String functionName)
Call a server-side function (also known as a service operation). |
|
OCreateRequest<OEntity> |
createEntity(String entitySetName)
Creates a new entity in the given entity-set. |
|
OEntityRequest<Void> |
createLink(OEntityId sourceEntity,
String targetNavProp,
OEntityId targetEntity)
Creates a new related entity link between two entities. |
|
OEntityDeleteRequest |
deleteEntity(OEntity entity)
Deletes an existing entity. |
|
OEntityDeleteRequest |
deleteEntity(String entitySetName,
Object keyValue)
Deletes an existing entity. |
|
OEntityDeleteRequest |
deleteEntity(String entitySetName,
OEntityKey key)
Deletes an existing entity. |
|
OEntityRequest<Void> |
deleteLink(OEntityId sourceEntity,
String targetNavProp,
Object... targetKeyValues)
Deletes related entity links between two entities by navigation property. |
|
|
getEntities(Class<T> entityType,
String entitySetHref)
Gets entities from the given entity-set. |
|
OQueryRequest<OEntity> |
getEntities(ORelatedEntitiesLink link)
Gets entities referred to by the given related-entities link. |
|
OQueryRequest<OEntity> |
getEntities(String entitySetHref)
Gets entities from the given entity-set. |
|
OCountRequest |
getEntitiesCount(String entitySetName)
Returns a single value request which can be extended by query options. |
|
|
getEntity(Class<T> entityType,
String entitySetName,
Object keyValue)
Gets the entity by entity-set name and entity-key value. |
|
|
getEntity(Class<T> entityType,
String entitySetName,
OEntityKey key)
Gets the entity by entity-set name and entity-key. |
|
OEntityGetRequest<OEntity> |
getEntity(OEntity entity)
Gets the latest version of an entity using the given entity as a template. |
|
OEntityGetRequest<OEntity> |
getEntity(ORelatedEntityLink link)
Gets the entity referred to by the given related entity link. |
|
OEntityGetRequest<OEntity> |
getEntity(String entitySetName,
Object keyValue)
Gets the entity by entity-set name and entity-key value. |
|
OEntityGetRequest<OEntity> |
getEntity(String entitySetName,
OEntityKey key)
Gets the entity by entity-set name and entity-key. |
|
Enumerable<EntitySetInfo> |
getEntitySets()
Lists all top-level entity-sets for the OData service. |
|
OQueryRequest<OEntityId> |
getLinks(OEntityId sourceEntity,
String targetNavProp)
Gets related entity links for a given source entity by navigation property. |
|
EdmDataServices |
getMetadata()
Gets the OData service metadata. |
|
String |
getServiceRootUri()
Gets the OData service uri. |
|
OModifyRequest<OEntity> |
mergeEntity(OEntity entity)
Modifies an existing entity using merge semantics. |
|
OModifyRequest<OEntity> |
mergeEntity(String entitySetName,
Object keyValue)
Modifies an existing entity using merge semantics. |
|
OModifyRequest<OEntity> |
mergeEntity(String entitySetName,
OEntityKey key)
Modifies an existing entity using merge semantics. |
|
OModifyRequest<OEntity> |
updateEntity(OEntity entity)
Modifies an existing entity using update semantics. |
|
OEntityRequest<Void> |
updateLink(OEntityId sourceEntity,
OEntityId newTargetEntity,
String targetNavProp,
Object... oldTargetKeyValues)
Updates related entity links between two entities by navigation property. |
|
| Field Detail |
|---|
static final ODataConsumer.Dump dump
| Method Detail |
|---|
OFunctionRequest<OObject> callFunction(String functionName)
The functioncall-request builder returned can be used to add parameters. Call OQueryRequest.execute() to issue request.
functionName - the function name
OCreateRequest<OEntity> createEntity(String entitySetName)
The create-request builder returned can be used to construct the new entity. Call OCreateRequest.execute() to issue request.
entitySetName - the name of the entity-set
OEntityRequest<Void> createLink(OEntityId sourceEntity,
String targetNavProp,
OEntityId targetEntity)
Call OEntityRequest.execute() on the returned request builder to issue request.
sourceEntity - the entity to start fromtargetNavProp - the relationship navigation propertytargetEntity - the entity to use as the target of the relationship
OEntityDeleteRequest deleteEntity(OEntity entity)
The delete-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
entity - the entity identity
OEntityDeleteRequest deleteEntity(String entitySetName,
Object keyValue)
The delete-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
entitySetName - the entity identity entity-set namekeyValue - the entity identity key value
OEntityDeleteRequest deleteEntity(String entitySetName,
OEntityKey key)
The delete-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
entitySetName - the entity identity entity-set namekey - the entity identity key
OEntityRequest<Void> deleteLink(OEntityId sourceEntity,
String targetNavProp,
Object... targetKeyValues)
Call OEntityRequest.execute() on the returned request builder to issue request.
sourceEntity - the entity to start fromtargetNavProp - the relationship navigation propertytargetKeyValues - the target entity-key, applicable if the navigation property represents a collection
<T> OQueryRequest<T> getEntities(Class<T> entityType,
String entitySetHref)
The query-request builder returned can be used for further server-side filtering. Call OQueryRequest.execute() to issue request.
T - the entity representation as a java typeentityType - the entity representation as a java typeentitySetHref - the entity-set href
OQueryRequest<OEntity> getEntities(ORelatedEntitiesLink link)
The query-request builder returned can be used for further server-side filtering. Call OQueryRequest.execute() to issue request.
link - the link
OQueryRequest<OEntity> getEntities(String entitySetHref)
The query-request builder returned can be used for further server-side filtering. Call OQueryRequest.execute() to issue request.
entitySetHref - the entity-set href
OCountRequest getEntitiesCount(String entitySetName)
entitySetName - the entity identity entity-set name
<T> OEntityGetRequest<T> getEntity(Class<T> entityType,
String entitySetName,
Object keyValue)
The entity-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
T - the entity representation as a java typeentityType - the entity representation as a java typeentitySetName - the name of the entity-setkeyValue - the entity-key value
<T> OEntityGetRequest<T> getEntity(Class<T> entityType,
String entitySetName,
OEntityKey key)
The entity-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
T - the entity representation as a java typeentityType - the entity representation as a java typeentitySetName - the name of the entity-setkey - the entity-key
OEntityGetRequest<OEntity> getEntity(OEntity entity)
The entity-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
entity - an existing entity to use as a template, using its entity-set and entity-key
OEntityGetRequest<OEntity> getEntity(ORelatedEntityLink link)
The entity-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
link - the link
OEntityGetRequest<OEntity> getEntity(String entitySetName,
Object keyValue)
The entity-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
entitySetName - the name of the entity-setkeyValue - the entity-key value
OEntityGetRequest<OEntity> getEntity(String entitySetName,
OEntityKey key)
The entity-request builder returned can be used for further navigation. Call OEntityRequest.execute() to issue request.
entitySetName - the name of the entity-setkey - the entity-key
Enumerable<EntitySetInfo> getEntitySets()
throws ODataProducerException
ODataProducerException - error from the producer
OQueryRequest<OEntityId> getLinks(OEntityId sourceEntity,
String targetNavProp)
The entityid-request builder returned can be used for further server-side filtering. Call OQueryRequest.execute() to issue request.
sourceEntity - the entity to start fromtargetNavProp - the relationship navigation property
EdmDataServices getMetadata()
String getServiceRootUri()
e.g. http://services.odata.org/Northwind/Northwind.svc/
OModifyRequest<OEntity> mergeEntity(OEntity entity)
The modification-request builder returned can be used to modify the new entity. Call OModifyRequest.execute() to issue request.
entity - the entity identity
OModifyRequest<OEntity> mergeEntity(String entitySetName,
Object keyValue)
The modification-request builder returned can be used to modify the new entity. Call OModifyRequest.execute() to issue request.
entitySetName - the entity identity entity-set namekeyValue - the entity identity key value
OModifyRequest<OEntity> mergeEntity(String entitySetName,
OEntityKey key)
The modification-request builder returned can be used to modify the new entity. Call OModifyRequest.execute() to issue request.
entitySetName - the entity identity entity-set namekey - the entity identity key
OModifyRequest<OEntity> updateEntity(OEntity entity)
The modification-request builder returned can be used to redefine the new entity. Call OModifyRequest.execute() to issue request.
entity - the entity identity
OEntityRequest<Void> updateLink(OEntityId sourceEntity,
OEntityId newTargetEntity,
String targetNavProp,
Object... oldTargetKeyValues)
Call OEntityRequest.execute() on the returned request builder to issue request.
sourceEntity - the entity to start fromnewTargetEntity - the entity to use as the new target of the relationshiptargetNavProp - the relationship navigation propertyoldTargetKeyValues - the target entity-key, applicable if the navigation property represents a collection
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||