-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathPaginatedResult.java
52 lines (45 loc) · 995 Bytes
/
PaginatedResult.java
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
// SPDX-FileCopyrightText: the secureCodeBox authors
//
// SPDX-License-Identifier: Apache-2.0
package io.securecodebox.persistence.defectdojo.model;
import com.fasterxml.jackson.annotation.JsonProperty;
import lombok.Data;
import java.util.ArrayList;
import java.util.List;
/**
* This class wraps the paginated results from DefectDojo
*
* @param <T> type of results
*/
@Data
public final class PaginatedResult<T extends Model> {
/**
* Total number of results
*/
@JsonProperty
private int count;
/**
* URL to the result's next page
* <p>
* This is {@code null} if there is no next page.
* </p>
*/
@JsonProperty
private String next;
/**
* URL to the result's previous page
* <p>
* This is {@code null} if there is no previous page.
* </p>
*/
@JsonProperty
private String previous;
/**
* Result for current page
* <p>
* Never {@code null}.
* </p>
*/
@JsonProperty
private List<T> results = new ArrayList<>();
}