Added constant which defines pagination defaults
This commit is contained in:
parent
25fffa886d
commit
54d387e035
|
@ -8,6 +8,10 @@ import org.gcube.informationsystem.model.reference.properties.Metadata;
|
|||
*/
|
||||
public class BaseRequestInfo implements RequestInfo {
|
||||
|
||||
public static final Integer DEFAULT_LIMIT = 10;
|
||||
public static final Integer UNBOUNDED_LIMIT = -1;
|
||||
public static final Integer DEFAULT_OFFSET = 0;
|
||||
|
||||
/**
|
||||
* To get unlimited results the limit query parameters must be set to -1.
|
||||
* If the results are too much the operation could have a timeout.
|
||||
|
@ -43,8 +47,8 @@ public class BaseRequestInfo implements RequestInfo {
|
|||
protected boolean includeContexts;
|
||||
|
||||
public BaseRequestInfo() {
|
||||
this.limit = 10;
|
||||
this.offset = 0;
|
||||
this.limit = BaseRequestInfo.DEFAULT_LIMIT;
|
||||
this.offset = BaseRequestInfo.DEFAULT_OFFSET;
|
||||
this.includeMeta = false;
|
||||
this.allMeta = false;
|
||||
this.hierarchicalMode = false;
|
||||
|
|
Loading…
Reference in New Issue