org.odata4j.consumer
Class AbstractConsumerQueryRequestBase<T>

java.lang.Object
  extended by org.odata4j.consumer.AbstractConsumerQueryRequestBase<T>
All Implemented Interfaces:
OQueryRequest<T>
Direct Known Subclasses:
ConsumerFunctionCallRequest, ConsumerQueryEntitiesRequest, ConsumerQueryLinksRequest

public abstract class AbstractConsumerQueryRequestBase<T>
extends Object
implements OQueryRequest<T>

Shared consumer request implementation for operations dealing with multiple response entities.


Constructor Summary
AbstractConsumerQueryRequestBase(ODataClient client, String serviceRootUri, EdmDataServices metadata, String lastSegment)
           
 
Method Summary
protected  ODataClientRequest buildRequest(Func1<String,String> pathModification)
           
 OQueryRequest<T> custom(String name, String value)
          Adds a custom name-value pair.
 OQueryRequest<T> expand(String expand)
          Sets the expand expressions.
 OQueryRequest<T> filter(String filter)
          Sets the filter expression.
protected  ODataClient getClient()
           
protected  EdmEntitySet getEntitySet()
           
protected  EdmDataServices getMetadata()
           
protected  List<EntitySegment> getSegments()
           
protected  String getServiceRootUri()
           
 OQueryRequest<T> nav(Object keyValue, String navProperty)
          Navigates to a referenced collection using a collection-valued navigation property.
 OQueryRequest<T> nav(OEntityKey key, String navProperty)
          Navigates to a referenced collection using a collection-valued navigation property.
 OQueryRequest<T> orderBy(String orderBy)
          Sets the ordering expressions.
 OQueryRequest<T> select(String select)
          Sets the selection clauses.
 OQueryRequest<T> skip(int skip)
          Sets the number of items to skip.
 OQueryRequest<T> top(int top)
          Sets the number of items to return.
 
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.OQueryRequest
execute
 

Constructor Detail

AbstractConsumerQueryRequestBase

public AbstractConsumerQueryRequestBase(ODataClient client,
                                        String serviceRootUri,
                                        EdmDataServices metadata,
                                        String lastSegment)
Method Detail

buildRequest

protected ODataClientRequest buildRequest(Func1<String,String> pathModification)

custom

public OQueryRequest<T> custom(String name,
                               String value)
Description copied from interface: OQueryRequest
Adds a custom name-value pair.

Specified by:
custom in interface OQueryRequest<T>
Parameters:
name - the name
value - the value
Returns:
the query-request builder
See Also:
[odata.org] Custom Query Options

expand

public OQueryRequest<T> expand(String expand)
Description copied from interface: OQueryRequest
Sets the expand expressions.

Specified by:
expand in interface OQueryRequest<T>
Parameters:
expand - the expand expressions
Returns:
the query-request builder
See Also:
[odata.org] Expand System Query Option ($expand)

filter

public OQueryRequest<T> filter(String filter)
Description copied from interface: OQueryRequest
Sets the filter expression.

Specified by:
filter in interface OQueryRequest<T>
Parameters:
filter - the filter expression
Returns:
the query-request builder
See Also:
[odata.org] Filter System Query Option ($filter)

getClient

protected ODataClient getClient()

getEntitySet

protected EdmEntitySet getEntitySet()

getMetadata

protected EdmDataServices getMetadata()

getSegments

protected List<EntitySegment> getSegments()

getServiceRootUri

protected String getServiceRootUri()

nav

public OQueryRequest<T> nav(Object keyValue,
                            String navProperty)
Description copied from interface: OQueryRequest
Navigates to a referenced collection using a collection-valued navigation property.

Specified by:
nav in interface OQueryRequest<T>
Parameters:
keyValue - identify an entity in the current entity-set using this key value
navProperty - the collection-valued navigation property off of the entity
Returns:
the query-request builder

nav

public OQueryRequest<T> nav(OEntityKey key,
                            String navProperty)
Description copied from interface: OQueryRequest
Navigates to a referenced collection using a collection-valued navigation property.

Specified by:
nav in interface OQueryRequest<T>
Parameters:
key - identify an entity in the current entity-set using this entity-key
navProperty - the collection-valued navigation property off of the entity
Returns:
the query-request builder

orderBy

public OQueryRequest<T> orderBy(String orderBy)
Description copied from interface: OQueryRequest
Sets the ordering expressions.

Specified by:
orderBy in interface OQueryRequest<T>
Parameters:
orderBy - the ordering expressions
Returns:
the query-request builder
See Also:
[odata.org] Orderby System Query Option ($orderby)

select

public OQueryRequest<T> select(String select)
Description copied from interface: OQueryRequest
Sets the selection clauses.

Specified by:
select in interface OQueryRequest<T>
Parameters:
select - the selection clauses
Returns:
the query-request builder
See Also:
[odata.org] Select System Query Option ($select)

skip

public OQueryRequest<T> skip(int skip)
Description copied from interface: OQueryRequest
Sets the number of items to skip.

Specified by:
skip in interface OQueryRequest<T>
Parameters:
skip - the number of items to skip
Returns:
the query-request builder
See Also:
[odata.org] Skip System Query Option ($skip)

top

public OQueryRequest<T> top(int top)
Description copied from interface: OQueryRequest
Sets the number of items to return.

Specified by:
top in interface OQueryRequest<T>
Parameters:
top - the number of items to return
Returns:
the query-request builder
See Also:
[odata.org] Top System Query Option ($top)


http://odata4j.org