merge-requests/1/head
geethkokila 7 years ago
commit 3cdd0e5a10

@ -19,6 +19,8 @@
package org.wso2.carbon.device.mgt.common;
import java.util.Date;
import java.util.HashMap;
import java.util.Map;
/**
* This class holds required parameters for a querying a paginated device response.
@ -35,6 +37,7 @@ public class PaginationRequest {
private String deviceName;
private String ownership;
private String ownerRole;
private Map<String, Object> property = new HashMap<>();
private Date since;
public PaginationRequest(int start, int rowCount) {
@ -130,6 +133,24 @@ public class PaginationRequest {
this.ownerPattern = ownerPattern;
}
public void setProperty(String key, Object value) {
this.property.put(key, value);
}
public void setProperties(Map<String, Object> parameters) {
this.property.putAll(parameters);
}
public void getProperty(String key) {
this.property.get(key);
}
public Map<String, Object> getProperties() {
Map<String, Object> temp = new HashMap<>();
temp.putAll(property);
return temp;
}
@Override
public String toString() {
return "Device type '" + this.deviceType + "' Device Name '" + this.deviceName + "' row count: " + this.rowCount

Loading…
Cancel
Save