Package com.collibra.dgc.core.api.dto
Class PagedResponse<T>
- Object
-
- PagedResponse<T>
-
- All Implemented Interfaces:
Serializable
- Direct Known Subclasses:
CursorPagedResponse
public class PagedResponse<T> extends Object implements Serializable
Response containing the paged information.- See Also:
- Serialized Form
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static class
PagedResponse.Builder<T>
-
Field Summary
Fields Modifier and Type Field Description protected long
limit
Deprecated.This field will become private in the next major release.protected long
offset
Deprecated.This field will become private in the next major release.protected long
total
Deprecated.This field will become private in the next major release.
-
Constructor Summary
Constructors Modifier Constructor Description PagedResponse()
protected
PagedResponse(long total, long offset, long limit, List<T> results)
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static <T> PagedResponse.Builder<T>
builder()
protected boolean
canEqual(Object other)
boolean
equals(Object o)
long
getLimit()
Returns the maximum number of results to be returned.long
getOffset()
Returns the offset for the results.List<T>
getResults()
The list of results.long
getTotal()
Returns the total number of results.int
hashCode()
void
setLimit(long limit)
Sets the maximum number of results to be returned.void
setOffset(long offset)
Sets the offset for the results.void
setResults(List<T> results)
The list of results.void
setTotal(long total)
Sets the total number of results.String
toString()
-
-
-
Field Detail
-
total
@Deprecated protected long total
Deprecated.This field will become private in the next major release. MethodsgetTotal()
,setTotal(long)
should be used instead.The total number of results.
-
offset
@Deprecated protected long offset
Deprecated.This field will become private in the next major release. MethodsgetOffset()
,setOffset(long)
should be used instead.The offset for the results.
-
limit
@Deprecated protected long limit
Deprecated.This field will become private in the next major release. MethodsgetLimit()
,setLimit(long)
should be used instead.The maximum number of results to be returned.
-
-
Constructor Detail
-
PagedResponse
public PagedResponse()
-
PagedResponse
protected PagedResponse(long total, long offset, long limit, List<T> results)
-
-
Method Detail
-
getOffset
public long getOffset()
Returns the offset for the results.- Returns:
- the offset for the results
-
setOffset
public void setOffset(long offset)
Sets the offset for the results.- Parameters:
offset
- the offset for the results
-
getLimit
public long getLimit()
Returns the maximum number of results to be returned.- Returns:
- the maximum number of results to be returned
-
setLimit
public void setLimit(long limit)
Sets the maximum number of results to be returned.- Parameters:
limit
- the maximum number of results to be returned
-
getTotal
public long getTotal()
Returns the total number of results.- Returns:
- the total number of results
-
setTotal
public void setTotal(long total)
Sets the total number of results.- Parameters:
total
- the total number of results
-
builder
public static <T> PagedResponse.Builder<T> builder()
-
getResults
public List<T> getResults()
The list of results.
-
setResults
public void setResults(List<T> results)
The list of results.
-
equals
public boolean equals(Object o)
- Overrides:
equals
in classObject
-
canEqual
protected boolean canEqual(Object other)
-
hashCode
public int hashCode()
- Overrides:
hashCode
in classObject
-
toString
public String toString()
- Overrides:
toString
in classObject
-
-