Class ResourceQueryResult

Object
se.curity.identityserver.sdk.data.query.ResourceQueryResult

public class ResourceQueryResult extends Object
Result of a resource query.
  • Constructor Details

    • ResourceQueryResult

      public ResourceQueryResult(List<? extends ResourceAttributes<?>> resources, long totalResults, long startIndex, long count)
      Parameters:
      resources - the list of resources
      totalResults - the total number of resource entries, possibly spanning multiple pages
      startIndex - index of the page this result represents
      count - number of resource entries per page
  • Method Details

    • getResources

      public List<? extends ResourceAttributes<?>> 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 than getTotalResults()
    • withResources

      public ResourceQueryResult withResources(List<? extends ResourceAttributes<?>> resources)
      Creates a new ResourceQueryResult with 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 ResourceQueryResult instance