public class AzureAdPagingWrapper extends Object
| Constructor and Description |
|---|
AzureAdPagingWrapper(AzureAdRestClient azureAdRestClient) |
| Modifier and Type | Method and Description |
|---|---|
<V extends PageableDeltaQueryGraphList<T>,T> |
fetchAllDeltaQueryResults(V firstPage,
Class<V> resultsClass) |
<V extends PageableGraphList<T>,T> |
fetchAllMatchingResults(V firstPage,
Class<V> resultsClass,
Predicate<T> filter)
Will fetch all results from Microsoft Graph that match the specified predicate
|
<V extends PageableGraphList<T>,T> |
fetchAppropriateAmountOfResults(V firstPage,
Class<V> resultsClass,
int startIndex,
int maxResults)
Will fetch results from Microsoft Graph until the desired amount of results is reached or until the results are exhausted
|
<V extends PageableGraphList<T>,T> |
pageForElement(V firstPage,
Class<V> resultsClass,
Predicate<T> predicate)
Retrieves the first element matching the specified predicate, if any, paging for it if necessary
|
public AzureAdPagingWrapper(AzureAdRestClient azureAdRestClient)
public <V extends PageableGraphList<T>,T> List<T> fetchAppropriateAmountOfResults(V firstPage, Class<V> resultsClass, int startIndex, int maxResults) throws OperationFailedException
V - Class representing a page of resultsT - Class representing the entries contained in a pagefirstPage - The first page of the resultsresultsClass - The class to which the results should be mapped (same as class of the first page object)maxResults - the amount of results that should be fetched in the same format as used by EntityQueryOperationFailedExceptionpublic <V extends PageableGraphList<T>,T> List<T> fetchAllMatchingResults(V firstPage, Class<V> resultsClass, Predicate<T> filter) throws OperationFailedException
V - Class representing a page of resultsT - Class representing the entries contained in a pagefirstPage - The first page of the resultsresultsClass - The class to which the results should be mapped (same as class of the first page object)filter - the filter that results should matchOperationFailedExceptionpublic <V extends PageableGraphList<T>,T> Optional<T> pageForElement(V firstPage, Class<V> resultsClass, Predicate<T> predicate) throws OperationFailedException
V - Class representing a page of resultsT - Class representing the entries contained in a pagefirstPage - The first page of the resultsresultsClass - The class to which the results should be mapped (same as class of the first page object)predicate - The predicate against which search items will be matchedOperationFailedExceptionpublic <V extends PageableDeltaQueryGraphList<T>,T> GraphDeltaQueryResult<T> fetchAllDeltaQueryResults(V firstPage, Class<V> resultsClass) throws OperationFailedException
OperationFailedExceptionCopyright © 2018 Atlassian. All rights reserved.