com.google.gwt.gadgets.client.osapi
Class CollectionRequestBuilder<T extends CollectionRequestBuilder<?>>

java.lang.Object
  extended by com.google.gwt.core.client.JavaScriptObject
      extended by com.google.gwt.gadgets.client.osapi.OsapiRequestBuilder<T>
          extended by com.google.gwt.gadgets.client.osapi.CollectionRequestBuilder<T>
Type Parameters:
T - Specific request builder implementation.
Direct Known Subclasses:
GetAlbumsRequestBuilder, GetMediaItemsRequestBuilder, GetPeopleRequestBuilder

public abstract class CollectionRequestBuilder<T extends CollectionRequestBuilder<?>>
extends OsapiRequestBuilder<T>

A superclass for all request builders building requests returning collections of objects.


Constructor Summary
protected CollectionRequestBuilder()
          Required by JavaScriptObject policy.
 
Method Summary
 T setContainsFilter(java.lang.String field, java.lang.String value)
          Indicates to return elements where value appears somewhere in the element's field value.
 T setCount(int count)
          Sets the page size for a paged collection.
 T setEqualsFilter(java.lang.String field, java.lang.String value)
          Indicates to return elements where value exactly matches the element's field value.
 T setPresentFilter(java.lang.String field)
          Indicates to return elements where the element's field value is not null or empty.
 T setSorting(java.lang.String field, SortOrder order)
          Indicates to sort return elements by the element's field value and given order.
 T setStartIndex(int startIndex)
          Sets start index for a paged collection.
 T setStartsWithFilter(java.lang.String field, java.lang.String value)
          Indicates to return elements where value is an exact prefix of the element's field value.
 
Methods inherited from class com.google.gwt.gadgets.client.osapi.OsapiRequestBuilder
nativeSet, nativeSet, setGroupId, setUpdatedSince, setUserId
 
Methods inherited from class com.google.gwt.core.client.JavaScriptObject
cast, createArray, createFunction, createObject, equals, hashCode, toSource, toString
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

CollectionRequestBuilder

protected CollectionRequestBuilder()
Required by JavaScriptObject policy.

Method Detail

setContainsFilter

public final T setContainsFilter(java.lang.String field,
                                 java.lang.String value)
Indicates to return elements where value appears somewhere in the element's field value. Note that only one filter can be set on request and previously set filters (of any type) are canceled with invocation of this method.

Parameters:
field - Identifier of the field to use for filtering.
value - Value to use for filtering.

setCount

public final T setCount(int count)
Sets the page size for a paged collection. If this parameter is not specified the container can choose how many items in the collection should be returned.

Parameters:
count - The page size for a paged collection.

setEqualsFilter

public final T setEqualsFilter(java.lang.String field,
                               java.lang.String value)
Indicates to return elements where value exactly matches the element's field value. Note that only one filter can be set on request and previously set filters (of any type) are canceled with invocation of this method.

Parameters:
field - Identifier of the field to use for filtering.
value - Value to use for filtering.

setPresentFilter

public final T setPresentFilter(java.lang.String field)
Indicates to return elements where the element's field value is not null or empty. Note that only one filter can be set on request and previously set filters (of any type) are canceled with invocation of this method.

Parameters:
field - Identifier of the field to use for filtering.

setSorting

public final T setSorting(java.lang.String field,
                          SortOrder order)
Indicates to sort return elements by the element's field value and given order.

Parameters:
field - Identifier of the field to use for sorting.
order - The order to use for sorting.

setStartIndex

public final T setStartIndex(int startIndex)
Sets start index for a paged collection. This value is relative to the starting index of all results that would be returned if no startIndex had been specified, but with specified filtering.

Parameters:
startIndex - Start index for a paged collection.

setStartsWithFilter

public final T setStartsWithFilter(java.lang.String field,
                                   java.lang.String value)
Indicates to return elements where value is an exact prefix of the element's field value. Note that only one filter can be set on request and previously set filters (of any type) are canceled with invocation of this method.

Parameters:
field - Identifier of the field to use for filtering.
value - Value to use for filtering.