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
-
Method Summary
Modifier and TypeMethodDescriptionget
(int pageSize, QueryParam... queryParams) The method returns the first page.get
(QueryParam... queryParams) The method returns the first page.getNextPage
(BaseCollectionRepresentation collectionRepresentation) The method returns the next page from the collection.getPage
(BaseCollectionRepresentation collectionRepresentation, int pageNumber) The method returns the specified page number.getPage
(BaseCollectionRepresentation collectionRepresentation, int pageNumber, int pageSize) The method returns the specified page number.getPreviousPage
(BaseCollectionRepresentation collectionRepresentation) This method returns the previous page in the collection.
-
Field Details
-
PAGE_SIZE_KEY
- See Also:
-
PAGE_NUMBER_KEY
- See Also:
-
-
Method Details
-
get
The method returns the first page.- Parameters:
queryParams
- query parameters- Returns:
- BaseCollectionRepresentation type of BaseCollectionRepresentation.
- Throws:
SDKException
- if the query failed
-
get
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
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
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
-