|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
public interface ODataProducer
Implement ODataProducer
on the server-side to create a new java-based OData producer.
The interface contains methods for clients to retrieve/query entities and to introspect service metadata (for read-only services); as well as methods to create/modify/delete entities (for read-write services).
Note that all client requests/responses are normalized - all details involving the OData http protocol, query expression model, EDM structure are handled by odata4j at a higher level.
Method Summary | |
---|---|
void |
close()
Releases any resources managed by this producer. |
EntityResponse |
createEntity(String entitySetName,
OEntity entity)
Creates a new OData entity. |
EntityResponse |
createEntity(String entitySetName,
OEntityKey entityKey,
String navProp,
OEntity entity)
Creates a new OData entity as a reference of an existing entity, implicitly linked to the existing entity by a navigation property. |
void |
deleteEntity(String entitySetName,
OEntityKey entityKey)
Deletes an existing entity. |
EntitiesResponse |
getEntities(String entitySetName,
QueryInfo queryInfo)
Gets all the entities for a given set matching the query information. |
EntityResponse |
getEntity(String entitySetName,
OEntityKey entityKey)
Obtains a single entity based on its type and key. |
EdmDataServices |
getMetadata()
Obtains the service metadata for this producer. |
BaseResponse |
getNavProperty(String entitySetName,
OEntityKey entityKey,
String navProp,
QueryInfo queryInfo)
Given a specific entity, follow one of its navigation properties, applying constraints as appropriate. |
void |
mergeEntity(String entitySetName,
OEntity entity)
Modifies an existing entity using merge semantics. |
void |
updateEntity(String entitySetName,
OEntity entity)
Modifies an existing entity using update semantics. |
Method Detail |
---|
void close()
EntityResponse createEntity(String entitySetName, OEntity entity)
entitySetName
- the entity-set nameentity
- the request entity sent from the client
EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity)
entitySetName
- the entity-set name of the existing entityentityKey
- the entity-key of the existing entitynavProp
- the navigation property off of the existing entityentity
- the request entity sent from the client
void deleteEntity(String entitySetName, OEntityKey entityKey)
entitySetName
- the entity-set name of the entityentityKey
- the entity-key of the entityEntitiesResponse getEntities(String entitySetName, QueryInfo queryInfo)
entitySetName
- the entity-set name for entities to returnqueryInfo
- the additional constraints to apply to the entities
EntityResponse getEntity(String entitySetName, OEntityKey entityKey)
entitySetName
- the entity-set name for the entity to returnentityKey
- the unique entity-key within the set
EdmDataServices getMetadata()
BaseResponse getNavProperty(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo)
entitySetName
- the entity-set of the entity to start withentityKey
- the unique entity-key of the entity to start withnavProp
- the navigation property to followqueryInfo
- additional constraints to apply to the result
void mergeEntity(String entitySetName, OEntity entity)
entitySetName
- the entity-set nameentity
- the entity modifications sent from the clientvoid updateEntity(String entitySetName, OEntity entity)
entitySetName
- the entity-set nameentity
- the entity modifications sent from the client
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |