Class ResourceQueryBuilder

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

public class ResourceQueryBuilder extends Object
Builder of ResourceQuery instances.
  • Constructor Details

    • ResourceQueryBuilder

      public ResourceQueryBuilder()
    • ResourceQueryBuilder

      public ResourceQueryBuilder(ResourceQuery resourceQuery)
  • Method Details

    • withPagination

      public ResourceQueryBuilder withPagination(long startIndex, long count)
      Adds pagination to this builder.
      Parameters:
      startIndex - the index of the requested page
      count - the number of entries to include per page
      Returns:
      this builder
    • withAttributeInclusions

      public ResourceQueryBuilder withAttributeInclusions(@Nullable Set<String> attributeInclusions)
      Adds attribute inclusions to this builder.
      Parameters:
      attributeInclusions - the resource attributes to include in the result
      Returns:
      this builder
    • withAttributeExclusions

      public ResourceQueryBuilder withAttributeExclusions(@Nullable Set<String> attributeExclusions)
      Adds attribute exclusions to this builder.
      Parameters:
      attributeExclusions - the resource attributes to exclude from the result
      Returns:
      this builder
    • withAttributesEnumeration

      public ResourceQueryBuilder withAttributesEnumeration(ResourceQuery.AttributesEnumeration enumeration)
      Adds attribute inclusions or -exclusions to this builder.
      Parameters:
      enumeration - the attributes to include in- or exclude from the result
      Returns:
      this builder
    • withSortBy

      public ResourceQueryBuilder withSortBy(@Nullable String sortBy)
      Adds the attribute to sort by to this builder.
      Parameters:
      sortBy - the attribute to sort by
      Returns:
      this builder
    • withSortOder

      Deprecated.
      Adds the order to sort in to this builder.
      Parameters:
      sortOder - the order to sort in
      Returns:
      this builder
    • withSortOrder

      Adds the order to sort in to this builder.
      Parameters:
      sortOrder - the order to sort in
      Returns:
      this builder
    • withSecondarySortBy

      public ResourceQueryBuilder withSecondarySortBy(@Nullable String secondarySortBy)
      Adds the attribute to secondary sort by to this builder.
      Parameters:
      secondarySortBy - the attribute to secondary sort by
      Returns:
      this builder
      Since:
      7.0.0
    • withFilter

      public ResourceQueryBuilder withFilter(@Nullable Filter filter)
      Adds a filter to search by to this builder.
      Parameters:
      filter - the filter to search by
      Returns:
      this builder
    • build

      public ResourceQuery build()
      Creates a new ResourceQuery instance as defined by this builder.
      Returns:
      a new ResourceQuery instance
    • toString

      public String toString()
      Overrides:
      toString in class Object