public class VasDataType extends GenericParcelable implements Validator, JSONifiable
Service types supported by the vas provider.
Modifier and Type | Class and Description |
---|---|
static interface |
VasDataType.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<VasDataType> |
CREATOR |
static JSONifiable.Creator<VasDataType> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
VasDataType()
Constructs a new empty instance.
|
protected |
VasDataType(boolean noInit)
Constructs a new empty instance.
|
|
VasDataType(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.
|
|
VasDataType(String json)
Constructs a new instance from the given JSON String.
|
|
VasDataType(VasDataType src)
Constructs a new instance that is a deep copy of the source instance.
|
Modifier and Type | Method and Description |
---|---|
void |
clearDataType()
Clears the 'dataType' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
VasDataType |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
VasDataTypeType |
getDataType() |
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 |
hasDataType()
Checks whether the 'dataType' field has been set, however the value could be null
|
boolean |
isNotNullDataType()
Checks whether the 'dataType' field is set and is not null
|
void |
mergeChanges(VasDataType 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.
|
VasDataType |
setDataType(VasDataTypeType dataType)
Sets the field 'dataType'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<VasDataType> CREATOR
public static final JSONifiable.Creator<VasDataType> JSON_CREATOR
public VasDataType()
protected VasDataType(boolean noInit)
public VasDataType(String json) throws IllegalArgumentException
IllegalArgumentException
public VasDataType(JSONObject jsonObject)
public VasDataType(VasDataType src)
public VasDataTypeType getDataType()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullDataType()
public boolean hasDataType()
public VasDataType setDataType(VasDataTypeType dataType)
public void clearDataType()
public boolean containsChanges()
public void resetChangeLog()
public VasDataType copyChanges()
public void mergeChanges(VasDataType src)