public interface

OQueryRequest

implements Iterable<T>
org.odata4j.core.OQueryRequest<T>
Known Indirect Subclasses

Class Overview

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

Summary

Public Methods
abstract OQueryRequest<T> custom(String name, String value)
Adds a custom name-value pair.
abstract Enumerable<T> execute()
Sends the query-request to the OData service, returning a client-side Enumerable for subsequent in-memory operations.
abstract OQueryRequest<T> expand(String expand)
Sets the expand expressions.
abstract OQueryRequest<T> filter(String filter)
Sets the filter expression.
abstract OQueryRequest<T> nav(Object keyValue, String navProperty)
Navigates to a referenced collection using a collection-valued navigation property.
abstract OQueryRequest<T> nav(OEntityKey key, String navProperty)
Navigates to a referenced collection using a collection-valued navigation property.
abstract OQueryRequest<T> orderBy(String orderBy)
Sets the ordering expressions.
abstract OQueryRequest<T> select(String select)
Sets the selection clauses.
abstract OQueryRequest<T> skip(int skip)
Sets the number of items to skip.
abstract OQueryRequest<T> top(int top)
Sets the number of items to return.
[Expand]
Inherited Methods
From interface java.lang.Iterable

Public Methods

public abstract 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

public abstract Enumerable<T> execute ()

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.

OQueryRequest itself also extends Iterable so that it can be used in a for each loop without calling execute().

Returns
  • the response as a client-side enumerable

public abstract OQueryRequest<T> expand (String expand)

Sets the expand expressions.

Parameters
expand The expand expressions
Returns
  • the query-request builder

public abstract OQueryRequest<T> filter (String filter)

Sets the filter expression.

Parameters
filter The filter expression
Returns
  • the query-request builder

public abstract 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

public abstract 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

public abstract OQueryRequest<T> orderBy (String orderBy)

Sets the ordering expressions.

Parameters
orderBy The ordering expressions
Returns
  • the query-request builder

public abstract OQueryRequest<T> select (String select)

Sets the selection clauses.

Parameters
select The selection clauses
Returns
  • the query-request builder

public abstract 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

public abstract 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