com.cumulocity.sdk.client
Class EmptyPagedCollectionResource<T extends BaseCollectionRepresentation>

java.lang.Object
  extended by com.cumulocity.sdk.client.EmptyPagedCollectionResource<T>
All Implemented Interfaces:
GenericResource<T>, PagedCollectionResource<T>

public class EmptyPagedCollectionResource<T extends BaseCollectionRepresentation>
extends Object
implements PagedCollectionResource<T>


Constructor Summary
EmptyPagedCollectionResource(Class<T> type)
           
 
Method Summary
 T get()
          The method returns the first page.
 T get(int pageSize)
          The method returns the first page.
 T getNextPage(BaseCollectionRepresentation collectionRepresentation)
          The method returns the next page from the collection.
 T getPage(BaseCollectionRepresentation collectionRepresentation, int pageNumber)
          The method returns the specified page number.
 T getPage(BaseCollectionRepresentation collectionRepresentation, int pageNumber, int pageSize)
          The method returns the specified page number.
 T getPreviousPage(BaseCollectionRepresentation collectionRepresentation)
          This method returns the previous page in the collection.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

EmptyPagedCollectionResource

public EmptyPagedCollectionResource(Class<T> type)
Method Detail

get

public T get()
                                           throws SDKException
Description copied from interface: PagedCollectionResource
The method returns the first page.

Specified by:
get in interface GenericResource<T extends BaseCollectionRepresentation>
Specified by:
get in interface PagedCollectionResource<T extends BaseCollectionRepresentation>
Throws:
SDKException

get

public T get(int pageSize)
                                           throws SDKException
Description copied from interface: PagedCollectionResource
The method returns the first page.

Specified by:
get in interface PagedCollectionResource<T extends BaseCollectionRepresentation>
Parameters:
pageSize - - page size
Returns:
BaseCollectionRepresentation type of BaseCollectionRepresentation.
Throws:
SDKException

getPage

public T getPage(BaseCollectionRepresentation collectionRepresentation,
                 int pageNumber)
                                               throws SDKException
Description copied from interface: PagedCollectionResource
The method returns the specified page number.

Specified by:
getPage in interface PagedCollectionResource<T extends BaseCollectionRepresentation>
Parameters:
collectionRepresentation - It uses the BaseCollectionRepresentation.getSelf() URL to find the collection.
pageNumber - - page number
Returns:
BaseCollectionRepresentation type of BaseCollectionRepresentation.
Throws:
SDKException

getPage

public T getPage(BaseCollectionRepresentation collectionRepresentation,
                 int pageNumber,
                 int pageSize)
                                               throws SDKException
Description copied from interface: PagedCollectionResource
The method returns the specified page number.

Specified by:
getPage in interface PagedCollectionResource<T extends BaseCollectionRepresentation>
Parameters:
collectionRepresentation - It uses the BaseCollectionRepresentation.getSelf() URL to find the collection.
pageNumber - - page number
pageSize - - page size
Returns:
BaseCollectionRepresentation type of BaseCollectionRepresentation.
Throws:
SDKException

getNextPage

public T getNextPage(BaseCollectionRepresentation collectionRepresentation)
                                                   throws SDKException
Description copied from interface: PagedCollectionResource
The method returns the next page from the collection.

Specified by:
getNextPage in interface PagedCollectionResource<T extends BaseCollectionRepresentation>
Parameters:
collectionRepresentation - It uses the BaseCollectionRepresentation.getNext() URL to find the collection.
Returns:
collectionRepresentation type of BaseCollectionRepresentation.
Throws:
SDKException

getPreviousPage

public T getPreviousPage(BaseCollectionRepresentation collectionRepresentation)
                                                       throws SDKException
Description copied from interface: PagedCollectionResource
This method returns the previous page in the collection.

Specified by:
getPreviousPage in interface PagedCollectionResource<T extends BaseCollectionRepresentation>
Parameters:
collectionRepresentation - - It uses the BaseCollectionRepresentation.getPrevious() URL to find the collection.
Returns:
BaseCollectionRepresentation type of BaseCollectionRepresentation.
Throws:
SDKException


Copyright © 2013 (C) Cumulocity GmbH. All Rights Reserved.