public class BroadcastMessage extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
BroadcastMessage.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<BroadcastMessage> |
CREATOR |
static JSONifiable.Creator<BroadcastMessage> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
BroadcastMessage()
Constructs a new empty instance.
|
protected |
BroadcastMessage(boolean noInit)
Constructs a new empty instance.
|
|
BroadcastMessage(BroadcastMessage src)
Constructs a new instance that is a deep copy of the source instance.
|
|
BroadcastMessage(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.
|
|
BroadcastMessage(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearReseller()
Clears the 'reseller' field, the 'has' method for this field will now return false
|
void |
clearText()
Clears the 'text' field, the 'has' method for this field will now return false
|
void |
clearType()
Clears the 'type' field, the 'has' method for this field will now return false
|
void |
clearUrl()
Clears the 'url' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
BroadcastMessage |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
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.
|
Reference |
getReseller() |
String |
getText() |
String |
getType() |
String |
getUrl() |
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasReseller()
Checks whether the 'reseller' field has been set, however the value could be null
|
boolean |
hasText()
Checks whether the 'text' field has been set, however the value could be null
|
boolean |
hasType()
Checks whether the 'type' field has been set, however the value could be null
|
boolean |
hasUrl()
Checks whether the 'url' field has been set, however the value could be null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullReseller()
Checks whether the 'reseller' field is set and is not null
|
boolean |
isNotNullText()
Checks whether the 'text' field is set and is not null
|
boolean |
isNotNullType()
Checks whether the 'type' field is set and is not null
|
boolean |
isNotNullUrl()
Checks whether the 'url' field is set and is not null
|
void |
mergeChanges(BroadcastMessage 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.
|
BroadcastMessage |
setId(String id)
Sets the field 'id'.
|
BroadcastMessage |
setReseller(Reference reseller)
Sets the field 'reseller'.
|
BroadcastMessage |
setText(String text)
Sets the field 'text'.
|
BroadcastMessage |
setType(String type)
Sets the field 'type'.
|
BroadcastMessage |
setUrl(String url)
Sets the field 'url'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<BroadcastMessage> CREATOR
public static final JSONifiable.Creator<BroadcastMessage> JSON_CREATOR
public BroadcastMessage()
protected BroadcastMessage(boolean noInit)
public BroadcastMessage(String json) throws IllegalArgumentException
IllegalArgumentException
public BroadcastMessage(JSONObject jsonObject)
public BroadcastMessage(BroadcastMessage src)
public String getId()
public String getType()
public String getText()
public String getUrl()
public Reference getReseller()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullType()
public boolean isNotNullText()
public boolean isNotNullUrl()
public boolean isNotNullReseller()
public boolean hasId()
public boolean hasType()
public boolean hasText()
public boolean hasUrl()
public boolean hasReseller()
public BroadcastMessage setId(String id)
public BroadcastMessage setType(String type)
public BroadcastMessage setText(String text)
public BroadcastMessage setUrl(String url)
public BroadcastMessage setReseller(Reference reseller)
public void clearId()
public void clearType()
public void clearText()
public void clearUrl()
public void clearReseller()
public boolean containsChanges()
public void resetChangeLog()
public BroadcastMessage copyChanges()
public void mergeChanges(BroadcastMessage src)