org.odata4j.core
Interface OModifyRequest<T>

Type Parameters:
T - the entity representation as a java type
All Known Implementing Classes:
ConsumerEntityModificationRequest

public interface OModifyRequest<T>

A consumer-side modification-request builder, used for operations such as MERGE and UPDATE. Call execute() to issue the request.


Method Summary
 void execute()
          Sends the modification request to the OData service.
 OModifyRequest<T> ifMatch(String precondition)
          Overrides the If-Match precondition.
 OModifyRequest<T> link(String navProperty, OEntity target)
          Defines an explicit link to another related entity.
 OModifyRequest<T> link(String navProperty, OEntityKey targetKey)
          Defines an explicit link to another related entity.
 OModifyRequest<T> nav(String navProperty, OEntityKey key)
          Selects a new modification entity by navigating to a referenced entity in a child collection.
 OModifyRequest<T> properties(Iterable<OProperty<?>> props)
          Sets properties on the new entity.
 OModifyRequest<T> properties(OProperty<?>... props)
          Sets properties on the new entity.
 

Method Detail

execute

void execute()
             throws ODataProducerException
Sends the modification request to the OData service.

Throws:
ODataProducerException - error from the producer

ifMatch

OModifyRequest<T> ifMatch(String precondition)
Overrides the If-Match precondition.

The If-Match header will default to the entity-tag of the entity used to start the builder sequence.

Parameters:
precondition - null, an entity-tag, or *
Returns:
the modification-request builder

link

OModifyRequest<T> link(String navProperty,
                       OEntity target)
Defines an explicit link to another related entity.

Parameters:
navProperty - the entity's relationship navigation property
target - the link target entity
Returns:
the modification-request builder

link

OModifyRequest<T> link(String navProperty,
                       OEntityKey targetKey)
Defines an explicit link to another related entity.

Parameters:
navProperty - the entity's relationship navigation property
targetKey - the key of the link target entity
Returns:
the modification-request builder

nav

OModifyRequest<T> nav(String navProperty,
                      OEntityKey key)
Selects a new modification entity by navigating to a referenced entity in a child collection.

Parameters:
navProperty - the child collection
key - the referenced entity's key
Returns:
the modification-request builder

properties

OModifyRequest<T> properties(Iterable<OProperty<?>> props)
Sets properties on the new entity.

Parameters:
props - the properties
Returns:
the modification-request builder

properties

OModifyRequest<T> properties(OProperty<?>... props)
Sets properties on the new entity.

Parameters:
props - the properties
Returns:
the modification-request builder


http://odata4j.org