Interface RecordPagedQueryResponse


public interface RecordPagedQueryResponse

PagedQueryResult with results containing an array of Record.


Example to create an instance using the builder pattern

     RecordPagedQueryResponse recordPagedQueryResponse = RecordPagedQueryResponse.builder()
             .limit(1)
             .count(1)
             .total(1)
             .offset(1)
             .plusResults(resultsBuilder -> resultsBuilder)
             .build()
 
  • Method Details

    • getLimit

      @NotNull @NotNull Integer getLimit()

      Number of results requested.

      Returns:
      limit
    • getCount

      @NotNull @NotNull Integer getCount()

      Actual number of results returned.

      Returns:
      count
    • getTotal

      @NotNull @NotNull Integer getTotal()

      Total number of results matching the query. This number is an estimation and not strongly consistent.

      Returns:
      total
    • getOffset

      @NotNull @NotNull Integer getOffset()

      Number of elements skipped.

      Returns:
      offset
    • getResults

      @NotNull @Valid @NotNull @Valid List<Record> getResults()

      Records matching the query.

      Returns:
      results
    • setLimit

      void setLimit(Integer limit)

      Number of results requested.

      Parameters:
      limit - value to be set
    • setCount

      void setCount(Integer count)

      Actual number of results returned.

      Parameters:
      count - value to be set
    • setTotal

      void setTotal(Integer total)

      Total number of results matching the query. This number is an estimation and not strongly consistent.

      Parameters:
      total - value to be set
    • setOffset

      void setOffset(Integer offset)

      Number of elements skipped.

      Parameters:
      offset - value to be set
    • setResults

      void setResults(Record... results)

      Records matching the query.

      Parameters:
      results - values to be set
    • setResults

      void setResults(List<Record> results)

      Records matching the query.

      Parameters:
      results - values to be set
    • of

      factory method
      Returns:
      instance of RecordPagedQueryResponse
    • of

      factory method to create a shallow copy RecordPagedQueryResponse
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • deepCopy

      factory method to create a deep copy of RecordPagedQueryResponse
      Parameters:
      template - instance to be copied
      Returns:
      copy instance
    • builder

      builder factory method for RecordPagedQueryResponse
      Returns:
      builder
    • builder

      create builder for RecordPagedQueryResponse instance
      Parameters:
      template - instance with prefilled values for the builder
      Returns:
      builder
    • withRecordPagedQueryResponse

      default <T> T withRecordPagedQueryResponse(Function<RecordPagedQueryResponse,T> helper)
      accessor map function
      Type Parameters:
      T - mapped type
      Parameters:
      helper - function to map the object
      Returns:
      mapped value
    • typeReference

      static com.fasterxml.jackson.core.type.TypeReference<RecordPagedQueryResponse> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference