Compare commits
No commits in common. "85935c71d7ec87804e74a5e0d8cd963c29f759b6" and "8d5c498d0732651195bd821d1aaa97138097f9c4" have entirely different histories.
85935c71d7
...
8d5c498d07
|
@ -51,7 +51,7 @@ public class ContextCache {
|
|||
|
||||
protected ContextCacheRenewal contextCacheRenewal;
|
||||
|
||||
// in millisec used only for logging and debugging
|
||||
// in millisec used for logging purposes only
|
||||
protected Calendar creationTime;
|
||||
// in millisec
|
||||
protected Calendar expiringTime;
|
||||
|
|
|
@ -8,21 +8,21 @@ import org.gcube.informationsystem.model.reference.properties.Metadata;
|
|||
*/
|
||||
public class BaseRequestInfo implements RequestInfo {
|
||||
|
||||
public static final Integer DEFAULT_OFFSET = 0;
|
||||
public static final Integer DEFAULT_LIMIT = 10;
|
||||
|
||||
public static final Integer UNBOUNDED_LIMIT = -1;
|
||||
|
||||
/**
|
||||
* The offset parameter indicates the starting position of the result.
|
||||
*/
|
||||
protected Integer offset;
|
||||
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.
|
||||
*/
|
||||
protected Integer limit;
|
||||
protected int limit;
|
||||
|
||||
/**
|
||||
* The offset parameter indicates the starting position of the result.
|
||||
*/
|
||||
protected int offset;
|
||||
|
||||
|
||||
/**
|
||||
* Track if the request requested to include {@link Metadata}
|
||||
|
@ -47,12 +47,8 @@ public class BaseRequestInfo implements RequestInfo {
|
|||
protected boolean includeContexts;
|
||||
|
||||
public BaseRequestInfo() {
|
||||
this(null, null);
|
||||
}
|
||||
|
||||
public BaseRequestInfo(Integer offset, Integer limit) {
|
||||
this.offset = offset;
|
||||
this.limit = limit;
|
||||
this.limit = BaseRequestInfo.DEFAULT_LIMIT;
|
||||
this.offset = BaseRequestInfo.DEFAULT_OFFSET;
|
||||
this.includeMeta = false;
|
||||
this.allMeta = false;
|
||||
this.hierarchicalMode = false;
|
||||
|
@ -60,22 +56,22 @@ public class BaseRequestInfo implements RequestInfo {
|
|||
}
|
||||
|
||||
@Override
|
||||
public Integer getLimit() {
|
||||
public int getLimit() {
|
||||
return limit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setLimit(Integer limit) {
|
||||
public void setLimit(int limit) {
|
||||
this.limit = limit;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Integer getOffset() {
|
||||
public int getOffset() {
|
||||
return offset;
|
||||
}
|
||||
|
||||
@Override
|
||||
public void setOffset(Integer offset) {
|
||||
public void setOffset(int offset) {
|
||||
this.offset = offset;
|
||||
}
|
||||
|
||||
|
|
|
@ -5,13 +5,13 @@ package org.gcube.informationsystem.resourceregistry.api.request;
|
|||
*/
|
||||
public interface RequestInfo {
|
||||
|
||||
public Integer getLimit();
|
||||
public int getLimit();
|
||||
|
||||
public void setLimit(Integer limit);
|
||||
public void setLimit(int limit);
|
||||
|
||||
public Integer getOffset();
|
||||
public int getOffset();
|
||||
|
||||
public void setOffset(Integer offset);
|
||||
public void setOffset(int offset);
|
||||
|
||||
public boolean includeMeta();
|
||||
|
||||
|
|
|
@ -22,10 +22,6 @@ public class AccessPath {
|
|||
public static final String INCLUDE_META_QUERY_PARAMETER = InstancePath.INCLUDE_META_QUERY_PARAMETER;
|
||||
public static final String INCLUDE_META_IN_ALL_INSTANCES_QUERY_PARAMETER = InstancePath.INCLUDE_META_IN_ALL_INSTANCES_QUERY_PARAMETER;
|
||||
|
||||
public static final String OFFSET_QUERY_PARAMETER = InstancePath.OFFSET_QUERY_PARAMETER;
|
||||
public static final String LIMIT_QUERY_PARAMETER = InstancePath.LIMIT_QUERY_PARAMETER;
|
||||
|
||||
|
||||
/**
|
||||
* Used only in getRelated() function
|
||||
* The _ is prepended to avoid clash with field name
|
||||
|
|
|
@ -10,9 +10,10 @@ public class InstancePath {
|
|||
|
||||
public static final String INSTANCES_PATH_PART = "instances";
|
||||
|
||||
public static final String OFFSET_QUERY_PARAMETER = "offset";
|
||||
public static final String LIMIT_QUERY_PARAMETER = "limit";
|
||||
|
||||
public static final String OFFSET_QUERY_PARAMETER = "offset";
|
||||
|
||||
public static final String POLYMORPHIC_QUERY_PARAMETER = "polymorphic";
|
||||
|
||||
public static final String HIERARCHICAL_MODE_QUERY_PARAMETER = "hierarchical";
|
||||
|
|
Loading…
Reference in New Issue