aboutsummaryrefslogtreecommitdiffstats
path: root/workflow-designer-be/src/main/java/org/onap/sdc/workflow/services/types/PagingRequest.java
blob: da46cc2c231260c87f17d778b559410df23b3a92 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
package org.onap.sdc.workflow.services.types;

import lombok.Getter;

@Getter
public class PagingRequest {

    private Integer offset;
    private Integer limit;

    public PagingRequest(int offset, int limit) {
        setOffset(offset);
        setLimit(limit);
    }

    public void setOffset(int offset) {
        this.offset = offset < 0 ? null : offset;
    }

    public void setLimit(int limit) {
        this.limit = limit <= 0 ? null : limit;
    }
}