|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.odata4j.consumer.AbstractConsumerEntityPayloadRequest org.odata4j.consumer.ConsumerCreateEntityRequest<T>
public class ConsumerCreateEntityRequest<T>
Create-request implementation.
Field Summary |
---|
Fields inherited from class org.odata4j.consumer.AbstractConsumerEntityPayloadRequest |
---|
entitySetName, links, metadata, props, serviceRootUri |
Constructor Summary | |
---|---|
ConsumerCreateEntityRequest(ODataClient client,
String serviceRootUri,
EdmDataServices metadata,
String entitySetName,
FeedCustomizationMapping fcMapping)
|
Method Summary | |
---|---|
OCreateRequest<T> |
addToRelation(OEntity parent,
String navProperty)
Use a related parent entity's relationship collection to define an implicit link. |
T |
execute()
Sends the create-request to the OData service and returns the newly created entity. |
T |
get()
Returns a locally-built entity and does not send the create-request to the service. |
OCreateRequest<T> |
inline(String navProperty,
Iterable<OEntity> entities)
Create related entities inline as part of a single request. |
OCreateRequest<T> |
inline(String navProperty,
OEntity... entities)
Create related entities inline as part of a single request. |
OCreateRequest<T> |
link(String navProperty,
OEntity target)
Define an explicit link to another related entity. |
OCreateRequest<T> |
link(String navProperty,
OEntityKey targetKey)
Define an explicit link to another related entity. |
OCreateRequest<T> |
properties(Iterable<OProperty<?>> props)
Set properties on the new entity. |
OCreateRequest<T> |
properties(OProperty<?>... props)
Set properties on the new entity. |
Methods inherited from class org.odata4j.consumer.AbstractConsumerEntityPayloadRequest |
---|
inline, link, link, properties, properties |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public ConsumerCreateEntityRequest(ODataClient client, String serviceRootUri, EdmDataServices metadata, String entitySetName, FeedCustomizationMapping fcMapping)
Method Detail |
---|
public OCreateRequest<T> addToRelation(OEntity parent, String navProperty)
OCreateRequest
e.g. create a new Product entity using /Categories(10)/Products instead of /Products
addToRelation
in interface OCreateRequest<T>
parent
- the parent entitynavProperty
- the parent entity's relationship collection navigation property
OCreateRequest.link(String, OEntity)
,
http://www.odata.org/developers/protocols/operations#CreatingnewEntriespublic T execute() throws ODataProducerException
OCreateRequest
execute
in interface OCreateRequest<T>
ODataProducerException
- error from the producerpublic T get()
OCreateRequest
get
in interface OCreateRequest<T>
OCreateRequest.inline(String, OEntity...)
public OCreateRequest<T> inline(String navProperty, Iterable<OEntity> entities)
OCreateRequest
inline
in interface OCreateRequest<T>
navProperty
- the new entity's relationship navigation propertyentities
- related entities, returned by OCreateRequest.get()
OCreateRequest.get()
public OCreateRequest<T> inline(String navProperty, OEntity... entities)
OCreateRequest
inline
in interface OCreateRequest<T>
navProperty
- the new entity's relationship navigation propertyentities
- related entities, returned by OCreateRequest.get()
OCreateRequest.get()
public OCreateRequest<T> link(String navProperty, OEntity target)
OCreateRequest
link
in interface OCreateRequest<T>
navProperty
- the new entity's relationship navigation propertytarget
- the link target entity
OCreateRequest.addToRelation(OEntity, String)
,
http://www.odata.org/developers/protocols/operations#CreatingnewEntriespublic OCreateRequest<T> link(String navProperty, OEntityKey targetKey)
OCreateRequest
link
in interface OCreateRequest<T>
navProperty
- the new entity's relationship navigation propertytargetKey
- the key of the link target entity
OCreateRequest.addToRelation(OEntity, String)
,
http://www.odata.org/developers/protocols/operations#CreatingnewEntriespublic OCreateRequest<T> properties(Iterable<OProperty<?>> props)
OCreateRequest
properties
in interface OCreateRequest<T>
props
- the properties
public OCreateRequest<T> properties(OProperty<?>... props)
OCreateRequest
properties
in interface OCreateRequest<T>
props
- the properties
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |