public class AppCategory extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
AppCategory.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AppCategory> |
CREATOR |
static JSONifiable.Creator<AppCategory> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
AppCategory()
Constructs a new empty instance.
|
|
AppCategory(AppCategory src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
AppCategory(boolean noInit)
Constructs a new empty instance.
|
|
AppCategory(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.
|
|
AppCategory(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 |
clearName()
Clears the 'name' 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
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
AppCategory |
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.
|
String |
getName()
The category name.
|
AppCategoryType |
getType()
Functional categories classify the app based on what the it does.
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasName()
Checks whether the 'name' 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 |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullType()
Checks whether the 'type' field is set and is not null
|
void |
mergeChanges(AppCategory 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.
|
AppCategory |
setId(String id)
Sets the field 'id'.
|
AppCategory |
setName(String name)
Sets the field 'name'.
|
AppCategory |
setType(AppCategoryType type)
Sets the field 'type'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<AppCategory> CREATOR
public static final JSONifiable.Creator<AppCategory> JSON_CREATOR
public AppCategory()
protected AppCategory(boolean noInit)
public AppCategory(String json) throws IllegalArgumentException
IllegalArgumentException
public AppCategory(JSONObject jsonObject)
public AppCategory(AppCategory src)
public String getId()
public String getName()
public AppCategoryType getType()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullType()
public boolean hasId()
public boolean hasName()
public boolean hasType()
public AppCategory setId(String id)
public AppCategory setName(String name)
public AppCategory setType(AppCategoryType type)
public void clearId()
public void clearName()
public void clearType()
public boolean containsChanges()
public void resetChangeLog()
public AppCategory copyChanges()
public void mergeChanges(AppCategory src)