Class BaseResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>
java.lang.Object
com.microsoft.store.partnercenter.BasePartnerComponent<String>
com.microsoft.store.partnercenter.BasePartnerComponentString
com.microsoft.store.partnercenter.enumerators.BaseResourceCollectionEnumerator<T>
- All Implemented Interfaces:
IResourceCollectionEnumerator<T>,IPartnerComponent<String>
- Direct Known Subclasses:
IndexBasedCollectionEnumerator
public abstract class BaseResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>> extends BasePartnerComponentString implements IResourceCollectionEnumerator<T>
Base implementation for resource collection enumerators.
-
Constructor Summary
Constructors Modifier Constructor Description protectedBaseResourceCollectionEnumerator(IPartner rootPartnerOperations, T resourceCollection, com.fasterxml.jackson.databind.ObjectMapper resourceCollectionConverter, com.fasterxml.jackson.core.type.TypeReference<T> responseType)Initializes a new instance of the BaseResourceCollectionEnumerator class. -
Method Summary
Modifier and Type Method Description TgetCurrent()The current resource collection.booleanhasValue()Gets whether the current result collection has a value or not.booleanisFirstPage()Gets whether the current collection is the first page of results or not.booleanisLastPage()Gets whether the current collection is the last page of results or not.voidnext()Retrieves the next result set.voidnext(IRequestContext context)Retrieves the next result set.voidprevious()Retrieves the previous result set.voidprevious(IRequestContext context)Retrieves the previous result set.Methods inherited from class com.microsoft.store.partnercenter.BasePartnerComponent
getContext, getPartner
-
Constructor Details
-
BaseResourceCollectionEnumerator
protected BaseResourceCollectionEnumerator(IPartner rootPartnerOperations, T resourceCollection, com.fasterxml.jackson.databind.ObjectMapper resourceCollectionConverter, com.fasterxml.jackson.core.type.TypeReference<T> responseType)Initializes a new instance of the BaseResourceCollectionEnumerator class.- Parameters:
rootPartnerOperations- The root partner operations instance.resourceCollection- The initial resource collection.resourceCollectionConverter- An optional converter.responseType- The type of the resource collection.
-
-
Method Details
-
isFirstPage
public boolean isFirstPage()Gets whether the current collection is the first page of results or not.- Specified by:
isFirstPagein interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>- Returns:
- A flag indicating whether the current collection is the first page of results or not.
-
isLastPage
public boolean isLastPage()Gets whether the current collection is the last page of results or not.- Specified by:
isLastPagein interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>- Returns:
- A flag indicating whether the current collection is the last page of results or not.
-
hasValue
public boolean hasValue()Gets whether the current result collection has a value or not. This indicates if the collection has been fully enumerated or not.- Specified by:
hasValuein interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>- Returns:
- A flag indicating whether the current result collection has a value or not.
-
getCurrent
The current resource collection.- Specified by:
getCurrentin interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>- Returns:
- The current resource collection.
-
next
public void next()Retrieves the next result set.- Specified by:
nextin interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>
-
next
Retrieves the next result set.- Specified by:
nextin interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>- Parameters:
context- The request context.
-
previous
public void previous()Retrieves the previous result set.- Specified by:
previousin interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>
-
previous
Retrieves the previous result set.- Specified by:
previousin interfaceIResourceCollectionEnumerator<T extends ResourceBaseWithLinks<StandardResourceCollectionLinks>>- Parameters:
context- The request context.
-