Package com.cumulocity.sdk.client
Interface PagedCollectionResource<T,C extends BaseCollectionRepresentation<T>>
-
- All Known Subinterfaces:
AlarmCollection
,AuditRecordCollection
,EventCollection
,ExternalIDCollection
,ManagedObjectCollection
,ManagedObjectReferenceCollection
,MeasurementCollection
,NotificationSubscriptionCollection
,OperationCollection
,TenantOptionCollection
- All Known Implementing Classes:
AlarmCollectionImpl
,AuditRecordCollectionImpl
,EventCollectionImpl
,ExternalIDCollectionImpl
,ManagedObjectCollectionImpl
,ManagedObjectReferenceCollectionImpl
,MeasurementCollectionImpl
,NotificationSubscriptionCollectionImpl
,OperationCollectionImpl
,PagedCollectionResourceImpl
,TenantOptionCollectionImpl
public interface PagedCollectionResource<T,C extends BaseCollectionRepresentation<T>>
-
-
Field Summary
Fields Modifier and Type Field Description static String
PAGE_NUMBER_KEY
static String
PAGE_SIZE_KEY
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description C
get(int pageSize, QueryParam... queryParams)
The method returns the first page.C
get(QueryParam... queryParams)
The method returns the first page.C
getNextPage(BaseCollectionRepresentation collectionRepresentation)
The method returns the next page from the collection.C
getPage(BaseCollectionRepresentation collectionRepresentation, int pageNumber)
The method returns the specified page number.C
getPage(BaseCollectionRepresentation collectionRepresentation, int pageNumber, int pageSize)
The method returns the specified page number.C
getPreviousPage(BaseCollectionRepresentation collectionRepresentation)
This method returns the previous page in the collection.
-
-
-
Field Detail
-
PAGE_SIZE_KEY
static final String PAGE_SIZE_KEY
- See Also:
- Constant Field Values
-
PAGE_NUMBER_KEY
static final String PAGE_NUMBER_KEY
- See Also:
- Constant Field Values
-
-
Method Detail
-
get
C get(QueryParam... queryParams) throws SDKException
The method returns the first page.- Parameters:
queryParams
- query parameters- Returns:
- BaseCollectionRepresentation type of BaseCollectionRepresentation.
- Throws:
SDKException
- if the query failed
-
get
C get(int pageSize, QueryParam... queryParams) throws SDKException
The method returns the first page.- Parameters:
pageSize
- - page sizequeryParams
- query parameters- Returns:
- BaseCollectionRepresentation type of BaseCollectionRepresentation.
- Throws:
SDKException
- if the query failed
-
getPage
C getPage(BaseCollectionRepresentation collectionRepresentation, int pageNumber) throws SDKException
The method returns the specified page number.- Parameters:
collectionRepresentation
- It uses the BaseCollectionRepresentation.getSelf() URL to find the collection.pageNumber
- - page number- Returns:
- BaseCollectionRepresentation type of BaseCollectionRepresentation.
- Throws:
SDKException
- if the query failed
-
getPage
C getPage(BaseCollectionRepresentation collectionRepresentation, int pageNumber, int pageSize) throws SDKException
The method returns the specified page number.- Parameters:
collectionRepresentation
- It uses the BaseCollectionRepresentation.getSelf() URL to find the collection.pageNumber
- - page numberpageSize
- - page size- Returns:
- BaseCollectionRepresentation type of BaseCollectionRepresentation.
- Throws:
SDKException
- if the query failed
-
getNextPage
C getNextPage(BaseCollectionRepresentation collectionRepresentation) throws SDKException
The method returns the next page from the collection.- Parameters:
collectionRepresentation
- It uses the BaseCollectionRepresentation.getNext() URL to find the collection.- Returns:
- collectionRepresentation type of BaseCollectionRepresentation.
- Throws:
SDKException
- if the query failed
-
getPreviousPage
C getPreviousPage(BaseCollectionRepresentation collectionRepresentation) throws SDKException
This method returns the previous page in the collection.- Parameters:
collectionRepresentation
- - It uses the BaseCollectionRepresentation.getPrevious() URL to find the collection.- Returns:
- BaseCollectionRepresentation type of BaseCollectionRepresentation.
- Throws:
SDKException
- if the query failed
-
-