Class ResourceQueryResult
Object
se.curity.identityserver.sdk.data.query.ResourceQueryResult
Result of a resource query.
-
Constructor Summary
ConstructorsConstructorDescriptionResourceQueryResult(List<? extends ResourceAttributes<?>> resources, long totalResults, long startIndex, long count) -
Method Summary
Modifier and TypeMethodDescriptionlonggetCount()List<? extends ResourceAttributes<?>>longlongwithResources(List<? extends ResourceAttributes<?>> resources) Creates a newResourceQueryResultwith the given resource list.
-
Constructor Details
-
ResourceQueryResult
public ResourceQueryResult(List<? extends ResourceAttributes<?>> resources, long totalResults, long startIndex, long count) - Parameters:
resources- the list of resourcestotalResults- the total number of resource entries, possibly spanning multiple pagesstartIndex- index of the page this result representscount- number of resource entries per page
-
-
Method Details
-
getResources
- Returns:
- the list of resources for the result page
-
getTotalResults
public long getTotalResults()- Returns:
- the total number of results for the request, possibly spanning multiple pages
-
getStartIndex
public long getStartIndex()- Returns:
- index of the page this result represents
-
getCount
public long getCount()- Returns:
- number of results per page; may be more than the size of
getResources(), and less thangetTotalResults()
-
withResources
Creates a newResourceQueryResultwith the given resource list. The given resource list is overriding, and will not be joined to any pre-existing resources.- Parameters:
resources- the list of resources to add- Returns:
- a new
ResourceQueryResultinstance
-