-
Notifications
You must be signed in to change notification settings - Fork 12
/
Copy pathPaginatedResult.java
46 lines (39 loc) · 1.03 KB
/
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
// 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> {
/**
* TODO: What does this count? The number of results in one page or the total number?
*/
@JsonProperty
private int count;
/**
* TODO: What does this contain? I would expect a number for the next page.
* <p>
* This is {@code null} if there is no next page.
* </p>
*/
@JsonProperty
private String next;
/**
* TODO: What does this contain? I would expect a number for the previous page.
* <p>
* This is {@code null} if there is no next page.
* </p>
*/
@JsonProperty
private String previous;
@JsonProperty
private List<T> results = new ArrayList<>();
}