|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.odata4j.producer.ODataProducerDelegate
public abstract class ODataProducerDelegate
Abstract base Delegate
for ODataProducer
.
Constructor Summary | |
---|---|
ODataProducerDelegate()
|
Method Summary | ||
---|---|---|
BaseResponse |
callFunction(EdmFunctionImport name,
Map<String,OFunctionParameter> params,
QueryInfo queryInfo)
Calls a function (aka Service Operation). |
|
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 |
createLink(OEntityId sourceEntity,
String targetNavProp,
OEntityId targetEntity)
Creates a link between two entities. |
|
void |
deleteEntity(String entitySetName,
OEntityKey entityKey)
Deletes an existing entity. |
|
void |
deleteLink(OEntityId sourceEntity,
String targetNavProp,
OEntityKey targetEntityKey)
Deletes an existing link between two entities. |
|
|
findExtension(Class<TExtension> clazz)
Finds an extension instance given an interface, if one exists. |
|
EntitiesResponse |
getEntities(String entitySetName,
QueryInfo queryInfo)
Gets all the entities for a given set matching the query information. |
|
CountResponse |
getEntitiesCount(String entitySetName,
QueryInfo queryInfo)
Gets the count of all the entities for a given set matching the query information. |
|
EntityResponse |
getEntity(String entitySetName,
OEntityKey entityKey,
EntityQueryInfo queryInfo)
Obtains a single entity based on its type and key. |
|
EntityIdResponse |
getLinks(OEntityId sourceEntity,
String targetNavProp)
Returns the value of an entity's navigation property as a collection of entity links (or a single link if the association cardinality is 1). |
|
EdmDataServices |
getMetadata()
Obtains the service metadata for this producer. |
|
MetadataProducer |
getMetadataProducer()
Obtains the ODataProducer implementation that serves the metadata as OData EDM constructs. |
|
BaseResponse |
getNavProperty(String entitySetName,
OEntityKey entityKey,
String navProp,
QueryInfo queryInfo)
Given a specific entity, follow one of its navigation properties, applying constraints as appropriate. |
|
CountResponse |
getNavPropertyCount(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. |
|
void |
updateLink(OEntityId sourceEntity,
String targetNavProp,
OEntityKey oldTargetEntityKey,
OEntityId newTargetEntity)
Replaces an existing link between two entities. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.odata4j.core.Delegate |
---|
getDelegate |
Constructor Detail |
---|
public ODataProducerDelegate()
Method Detail |
---|
public BaseResponse callFunction(EdmFunctionImport name, Map<String,OFunctionParameter> params, QueryInfo queryInfo)
ODataProducer
callFunction
in interface ODataProducer
name
- the name of the functionparams
- the parameters to the functionqueryInfo
- additional query parameters to apply to collection-valued results
The return type of <Function> MUST be one of the following: An EDMSimpleType or collection of EDMSimpleTypes. An entity type or collection of entity types. A complex type or collection of complex types. A row type or collection of row types. <ReturnType> can contain a maximum of one <CollectionType> element. <ReturnType> can contain a maximum of one <ReferenceType> element. <ReturnType> can contain a maximum of one <RowType> element. A ref type or collection of ref types.
public void close()
ODataProducer
close
in interface ODataProducer
public EntityResponse createEntity(String entitySetName, OEntity entity)
ODataProducer
createEntity
in interface ODataProducer
entitySetName
- the entity-set nameentity
- the request entity sent from the client
public EntityResponse createEntity(String entitySetName, OEntityKey entityKey, String navProp, OEntity entity)
ODataProducer
createEntity
in interface ODataProducer
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
public void createLink(OEntityId sourceEntity, String targetNavProp, OEntityId targetEntity)
ODataProducer
createLink
in interface ODataProducer
sourceEntity
- an entity with at least one navigation propertytargetNavProp
- the navigation propertytargetEntity
- the link target entitypublic void deleteEntity(String entitySetName, OEntityKey entityKey)
ODataProducer
deleteEntity
in interface ODataProducer
entitySetName
- the entity-set name of the entityentityKey
- the entity-key of the entitypublic void deleteLink(OEntityId sourceEntity, String targetNavProp, OEntityKey targetEntityKey)
ODataProducer
deleteLink
in interface ODataProducer
sourceEntity
- an entity with at least one navigation propertytargetNavProp
- the navigation propertytargetEntityKey
- if the navigation property represents a set, the key identifying the target entity within the set, else n/apublic <TExtension extends OExtension<ODataProducer>> TExtension findExtension(Class<TExtension> clazz)
OExtensible
findExtension
in interface OExtensible<ODataProducer>
TExtension
- type of extensionclazz
- the extension interface
public EntitiesResponse getEntities(String entitySetName, QueryInfo queryInfo)
ODataProducer
getEntities
in interface ODataProducer
entitySetName
- the entity-set name for entities to returnqueryInfo
- the additional constraints to apply to the entities
public CountResponse getEntitiesCount(String entitySetName, QueryInfo queryInfo)
ODataProducer
getEntitiesCount
in interface ODataProducer
entitySetName
- the entity-set name for entities whose count is returnedqueryInfo
- the additional constraints to apply to the entities
public EntityResponse getEntity(String entitySetName, OEntityKey entityKey, EntityQueryInfo queryInfo)
ODataProducer
getEntity
in interface ODataProducer
entitySetName
- the entity-set name for entities to returnentityKey
- the unique entity-key of the entity to start withqueryInfo
- the additional constraints applicable to single-entity queries
public EntityIdResponse getLinks(OEntityId sourceEntity, String targetNavProp)
ODataProducer
getLinks
in interface ODataProducer
sourceEntity
- an entity with at least one navigation propertytargetNavProp
- the navigation property
public EdmDataServices getMetadata()
ODataProducer
getMetadata
in interface ODataProducer
public MetadataProducer getMetadataProducer()
ODataProducer
getMetadataProducer
in interface ODataProducer
public BaseResponse getNavProperty(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo)
ODataProducer
getNavProperty
in interface ODataProducer
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
public CountResponse getNavPropertyCount(String entitySetName, OEntityKey entityKey, String navProp, QueryInfo queryInfo)
ODataProducer
getNavPropertyCount
in interface ODataProducer
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
public void mergeEntity(String entitySetName, OEntity entity)
ODataProducer
mergeEntity
in interface ODataProducer
entitySetName
- the entity-set nameentity
- the entity modifications sent from the clientpublic void updateEntity(String entitySetName, OEntity entity)
ODataProducer
updateEntity
in interface ODataProducer
entitySetName
- the entity-set nameentity
- the entity modifications sent from the clientpublic void updateLink(OEntityId sourceEntity, String targetNavProp, OEntityKey oldTargetEntityKey, OEntityId newTargetEntity)
ODataProducer
updateLink
in interface ODataProducer
sourceEntity
- an entity with at least one navigation propertytargetNavProp
- the navigation propertyoldTargetEntityKey
- if the navigation property represents a set, the key identifying the old target entity within the set, else n/anewTargetEntity
- the new link target entity
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |