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 Summary
Modifier and TypeMethodDescriptionbuilder()
builder factory method for RecordPagedQueryResponsebuilder
(RecordPagedQueryResponse template) create builder for RecordPagedQueryResponse instancestatic RecordPagedQueryResponse
deepCopy
(RecordPagedQueryResponse template) factory method to create a deep copy of RecordPagedQueryResponse@NotNull Integer
getCount()
Actual number of results returned.@NotNull Integer
getLimit()
Number of results requested.@NotNull Integer
Number of elements skipped.Records matching the query.@NotNull Integer
getTotal()
Total number of results matching the query.static RecordPagedQueryResponse
of()
factory methodstatic RecordPagedQueryResponse
of
(RecordPagedQueryResponse template) factory method to create a shallow copy RecordPagedQueryResponsevoid
Actual number of results returned.void
Number of results requested.void
Number of elements skipped.void
setResults
(Record... results) Records matching the query.void
setResults
(List<Record> results) Records matching the query.void
Total number of results matching the query.static com.fasterxml.jackson.core.type.TypeReference<RecordPagedQueryResponse>
gives a TypeReference for usage with Jackson DataBinddefault <T> T
accessor map function
-
Method Details
-
getLimit
Number of results requested.
- Returns:
- limit
-
getCount
Actual number of results returned.
- Returns:
- count
-
getTotal
Total number of results matching the query. This number is an estimation and not strongly consistent.
- Returns:
- total
-
getOffset
Number of elements skipped.
- Returns:
- offset
-
getResults
Records matching the query.
- Returns:
- results
-
setLimit
Number of results requested.
- Parameters:
limit
- value to be set
-
setCount
Actual number of results returned.
- Parameters:
count
- value to be set
-
setTotal
Total number of results matching the query. This number is an estimation and not strongly consistent.
- Parameters:
total
- value to be set
-
setOffset
Number of elements skipped.
- Parameters:
offset
- value to be set
-
setResults
Records matching the query.
- Parameters:
results
- values to be set
-
setResults
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
accessor map function- Type Parameters:
T
- mapped type- Parameters:
helper
- function to map the object- Returns:
- mapped value
-
typeReference
gives a TypeReference for usage with Jackson DataBind- Returns:
- TypeReference
-