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)
             .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

      Integer getTotal()

      Total number of results matching the query. This number is an estimation and not strongly consistent. Returned only when withTotal is set to true on the query.

      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. Returned only when withTotal is set to true on the query.

      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
    • copyDeep

    • deepCopy

      @Nullable static RecordPagedQueryResponse deepCopy(@Nullable RecordPagedQueryResponse template)
      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 tools.jackson.core.type.TypeReference<RecordPagedQueryResponse> typeReference()
      gives a TypeReference for usage with Jackson DataBind
      Returns:
      TypeReference