org.odata4j.core
Interface OQueryRequest<T>

Type Parameters:
T - the entity representation as a java type
All Known Subinterfaces:
OFunctionRequest<T>
All Known Implementing Classes:
AbstractConsumerQueryRequestBase, ConsumerFunctionCallRequest, ConsumerQueryEntitiesRequest, ConsumerQueryLinksRequest

public interface OQueryRequest<T>

A consumer-side query-request builder. Call execute() to issue the request.


Method Summary
 OQueryRequest<T> custom(String name, String value)
          Adds a custom name-value pair.
 Enumerable<T> execute()
          Sends the query-request to the OData service, returning a client-side Enumerable for subsequent in-memory operations.
 OQueryRequest<T> expand(String expand)
          Sets the expand expressions.
 OQueryRequest<T> filter(String filter)
          Sets the filter expression.
 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.
 

Method Detail

custom

OQueryRequest<T> custom(String name,
                        String value)
Adds a custom name-value pair.

Parameters:
name - the name
value - the value
Returns:
the query-request builder
See Also:
[odata.org] Custom Query Options

execute

Enumerable<T> execute()
                      throws ODataProducerException
Sends the query-request to the OData service, returning a client-side Enumerable for subsequent in-memory operations.

The returned enumerable transparently handles server-side paging and deferred enumeration.

Subsequent server calls are handled within the enumerable's Iterator.

Returns:
the response as a client-side enumerable
Throws:
ODataProducerException - error from the producer

expand

OQueryRequest<T> expand(String expand)
Sets the expand expressions.

Parameters:
expand - the expand expressions
Returns:
the query-request builder
See Also:
[odata.org] Expand System Query Option ($expand)

filter

OQueryRequest<T> filter(String filter)
Sets the filter expression.

Parameters:
filter - the filter expression
Returns:
the query-request builder
See Also:
[odata.org] Filter System Query Option ($filter)

nav

OQueryRequest<T> nav(Object keyValue,
                     String navProperty)
Navigates to a referenced collection using a collection-valued navigation property.

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

OQueryRequest<T> nav(OEntityKey key,
                     String navProperty)
Navigates to a referenced collection using a collection-valued navigation property.

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

OQueryRequest<T> orderBy(String orderBy)
Sets the ordering expressions.

Parameters:
orderBy - the ordering expressions
Returns:
the query-request builder
See Also:
[odata.org] Orderby System Query Option ($orderby)

select

OQueryRequest<T> select(String select)
Sets the selection clauses.

Parameters:
select - the selection clauses
Returns:
the query-request builder
See Also:
[odata.org] Select System Query Option ($select)

skip

OQueryRequest<T> skip(int skip)
Sets the number of items to skip.

Parameters:
skip - the number of items to skip
Returns:
the query-request builder
See Also:
[odata.org] Skip System Query Option ($skip)

top

OQueryRequest<T> top(int top)
Sets the number of items to return.

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