public class Section extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
Section.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<Section> |
CREATOR |
static JSONifiable.Creator<Section> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
Section()
Constructs a new empty instance.
|
protected |
Section(boolean noInit)
Constructs a new empty instance.
|
|
Section(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.
|
|
Section(Section src)
Constructs a new instance that is a deep copy of the source instance.
|
|
Section(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCreatedTime()
Clears the 'createdTime' field, the 'has' method for this field will now return false
|
void |
clearDeletable()
Clears the 'deletable' field, the 'has' method for this field will now return false
|
void |
clearDeletedTime()
Clears the 'deletedTime' field, the 'has' method for this field will now return false
|
void |
clearId()
Clears the 'id' field, the 'has' method for this field will now return false
|
void |
clearMerchant()
Clears the 'merchant' field, the 'has' method for this field will now return false
|
void |
clearModifiedTime()
Clears the 'modifiedTime' 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 |
clearSortOrder()
Clears the 'sortOrder' field, the 'has' method for this field will now return false
|
void |
clearTables()
Clears the 'tables' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
Section |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
Long |
getCreatedTime()
Timestamp when the section was created
|
Boolean |
getDeletable()
True if the section can be deleted by the merchant
|
Long |
getDeletedTime()
Timestamp when section was last deleted
|
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 |
getMerchant()
The merchant the section belongs to
|
Long |
getModifiedTime()
Timestamp when the section was last modified
|
String |
getName()
Name of the table
|
Integer |
getSortOrder()
Display sort order amongst all the merchant's sections
|
List<Table> |
getTables()
Tables belonging to this section
|
boolean |
hasCreatedTime()
Checks whether the 'createdTime' field has been set, however the value could be null
|
boolean |
hasDeletable()
Checks whether the 'deletable' field has been set, however the value could be null
|
boolean |
hasDeletedTime()
Checks whether the 'deletedTime' field has been set, however the value could be null
|
boolean |
hasId()
Checks whether the 'id' field has been set, however the value could be null
|
boolean |
hasMerchant()
Checks whether the 'merchant' field has been set, however the value could be null
|
boolean |
hasModifiedTime()
Checks whether the 'modifiedTime' 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 |
hasSortOrder()
Checks whether the 'sortOrder' field has been set, however the value could be null
|
boolean |
hasTables()
Checks whether the 'tables' field has been set, however the value could be null
|
boolean |
isNotEmptyTables()
Checks whether the 'tables' field is set and is not null and is not empty
|
boolean |
isNotNullCreatedTime()
Checks whether the 'createdTime' field is set and is not null
|
boolean |
isNotNullDeletable()
Checks whether the 'deletable' field is set and is not null
|
boolean |
isNotNullDeletedTime()
Checks whether the 'deletedTime' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullMerchant()
Checks whether the 'merchant' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullSortOrder()
Checks whether the 'sortOrder' field is set and is not null
|
boolean |
isNotNullTables()
Checks whether the 'tables' field is set and is not null
|
void |
mergeChanges(Section 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.
|
Section |
setCreatedTime(Long createdTime)
Sets the field 'createdTime'.
|
Section |
setDeletable(Boolean deletable)
Sets the field 'deletable'.
|
Section |
setDeletedTime(Long deletedTime)
Sets the field 'deletedTime'.
|
Section |
setId(String id)
Sets the field 'id'.
|
Section |
setMerchant(Reference merchant)
Sets the field 'merchant'.
|
Section |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
Section |
setName(String name)
Sets the field 'name'.
|
Section |
setSortOrder(Integer sortOrder)
Sets the field 'sortOrder'.
|
Section |
setTables(List<Table> tables)
Sets the field 'tables'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<Section> CREATOR
public static final JSONifiable.Creator<Section> JSON_CREATOR
public Section()
protected Section(boolean noInit)
public Section(String json) throws IllegalArgumentException
IllegalArgumentException
public Section(JSONObject jsonObject)
public Section(Section src)
public String getId()
public String getName()
public Long getCreatedTime()
public Long getModifiedTime()
public Long getDeletedTime()
public Reference getMerchant()
public Integer getSortOrder()
public Boolean getDeletable()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullCreatedTime()
public boolean isNotNullModifiedTime()
public boolean isNotNullDeletedTime()
public boolean isNotNullMerchant()
public boolean isNotNullSortOrder()
public boolean isNotNullDeletable()
public boolean isNotNullTables()
public boolean isNotEmptyTables()
public boolean hasId()
public boolean hasName()
public boolean hasCreatedTime()
public boolean hasModifiedTime()
public boolean hasDeletedTime()
public boolean hasMerchant()
public boolean hasSortOrder()
public boolean hasDeletable()
public boolean hasTables()
public Section setMerchant(Reference merchant)
public Section setTables(List<Table> tables)
public void clearId()
public void clearName()
public void clearCreatedTime()
public void clearModifiedTime()
public void clearDeletedTime()
public void clearMerchant()
public void clearSortOrder()
public void clearDeletable()
public void clearTables()
public boolean containsChanges()
public void resetChangeLog()
public Section copyChanges()
public void mergeChanges(Section src)