public class BatchRequest extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
BatchRequest.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<BatchRequest> |
CREATOR |
static JSONifiable.Creator<BatchRequest> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
BatchRequest()
Constructs a new empty instance.
|
|
BatchRequest(BatchRequest src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
BatchRequest(boolean noInit)
Constructs a new empty instance.
|
|
BatchRequest(JSONObject jsonObject)
Construct a new instance backed by the given JSONObject, the parameter is not copied so changes to it will be
reflected in this instance and vice-versa.
|
|
BatchRequest(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearDevices()
Clears the 'devices' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
BatchRequest |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
List<String> |
getDevices() |
protected GenericClient |
getGenericClient() |
JSONObject |
getJSONObject()
Returns the internal JSONObject backing this instance, the return value is not a copy so changes to it will be
reflected in this instance and vice-versa.
|
boolean |
hasDevices()
Checks whether the 'devices' field has been set, however the value could be null
|
boolean |
isNotEmptyDevices()
Checks whether the 'devices' field is set and is not null and is not empty
|
boolean |
isNotNullDevices()
Checks whether the 'devices' field is set and is not null
|
void |
mergeChanges(BatchRequest src)
Copy all the changed fields from the given source to this instance.
|
void |
resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
|
BatchRequest |
setDevices(List<String> devices)
Sets the field 'devices'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<BatchRequest> CREATOR
public static final JSONifiable.Creator<BatchRequest> JSON_CREATOR
public BatchRequest()
protected BatchRequest(boolean noInit)
public BatchRequest(String json) throws IllegalArgumentException
IllegalArgumentException
public BatchRequest(JSONObject jsonObject)
public BatchRequest(BatchRequest src)
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullDevices()
public boolean isNotEmptyDevices()
public boolean hasDevices()
public BatchRequest setDevices(List<String> devices)
public void clearDevices()
public boolean containsChanges()
public void resetChangeLog()
public BatchRequest copyChanges()
public void mergeChanges(BatchRequest src)