blob: c1a76491a758e4853623de2f2ffb8cecd3675f37 (
plain)
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
|
package org.onap.sdc.workflow.services.types;
import lombok.Getter;
@Getter
public class Paging {
private int offset;
private int limit;
private int count;
private boolean hasMore;
private int total;
public Paging(PagingRequest pagingRequest, int count, int total) {
this.offset = pagingRequest.getOffset();
this.limit = pagingRequest.getLimit();
this.count = count;
setTotal(total);
}
private void setTotal(int total) {
this.total = total;
this.hasMore = total > offset + limit;
}
}
|