public class CustomerMetadata extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
CustomerMetadata.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<CustomerMetadata> |
CREATOR |
static JSONifiable.Creator<CustomerMetadata> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
CustomerMetadata()
Constructs a new empty instance.
|
protected |
CustomerMetadata(boolean noInit)
Constructs a new empty instance.
|
|
CustomerMetadata(CustomerMetadata src)
Constructs a new instance that is a deep copy of the source instance.
|
|
CustomerMetadata(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.
|
|
CustomerMetadata(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearBusinessName()
Clears the 'businessName' field, the 'has' method for this field will now return false
|
void |
clearCustomer()
Clears the 'customer' field, the 'has' method for this field will now return false
|
void |
clearDobDay()
Clears the 'dobDay' field, the 'has' method for this field will now return false
|
void |
clearDobMonth()
Clears the 'dobMonth' field, the 'has' method for this field will now return false
|
void |
clearDobYear()
Clears the 'dobYear' 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 |
clearNote()
Clears the 'note' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
CustomerMetadata |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
String |
getBusinessName()
The name of the business the customer is associated with.
|
Reference |
getCustomer()
Customer who this metadata belongs to.
|
Integer |
getDobDay()
The day part of the date of birth for this customer.
|
Integer |
getDobMonth()
The month part of the date of birth for this customer.
|
Integer |
getDobYear()
The year part of the date of birth for this customer.
|
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.
|
Long |
getModifiedTime()
The timestamp from when this customer's data was last updated.
|
String |
getNote()
A note about the customer.
|
boolean |
hasBusinessName()
Checks whether the 'businessName' field has been set, however the value could be null
|
boolean |
hasCustomer()
Checks whether the 'customer' field has been set, however the value could be null
|
boolean |
hasDobDay()
Checks whether the 'dobDay' field has been set, however the value could be null
|
boolean |
hasDobMonth()
Checks whether the 'dobMonth' field has been set, however the value could be null
|
boolean |
hasDobYear()
Checks whether the 'dobYear' 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 |
hasNote()
Checks whether the 'note' field has been set, however the value could be null
|
boolean |
isNotNullBusinessName()
Checks whether the 'businessName' field is set and is not null
|
boolean |
isNotNullCustomer()
Checks whether the 'customer' field is set and is not null
|
boolean |
isNotNullDobDay()
Checks whether the 'dobDay' field is set and is not null
|
boolean |
isNotNullDobMonth()
Checks whether the 'dobMonth' field is set and is not null
|
boolean |
isNotNullDobYear()
Checks whether the 'dobYear' field is set and is not null
|
boolean |
isNotNullModifiedTime()
Checks whether the 'modifiedTime' field is set and is not null
|
boolean |
isNotNullNote()
Checks whether the 'note' field is set and is not null
|
void |
mergeChanges(CustomerMetadata 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.
|
CustomerMetadata |
setBusinessName(String businessName)
Sets the field 'businessName'.
|
CustomerMetadata |
setCustomer(Reference customer)
Sets the field 'customer'.
|
CustomerMetadata |
setDobDay(Integer dobDay)
Sets the field 'dobDay'.
|
CustomerMetadata |
setDobMonth(Integer dobMonth)
Sets the field 'dobMonth'.
|
CustomerMetadata |
setDobYear(Integer dobYear)
Sets the field 'dobYear'.
|
CustomerMetadata |
setModifiedTime(Long modifiedTime)
Sets the field 'modifiedTime'.
|
CustomerMetadata |
setNote(String note)
Sets the field 'note'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<CustomerMetadata> CREATOR
public static final JSONifiable.Creator<CustomerMetadata> JSON_CREATOR
public CustomerMetadata()
protected CustomerMetadata(boolean noInit)
public CustomerMetadata(String json) throws IllegalArgumentException
IllegalArgumentException
public CustomerMetadata(JSONObject jsonObject)
public CustomerMetadata(CustomerMetadata src)
public String getBusinessName()
public String getNote()
public Integer getDobYear()
public Integer getDobMonth()
public Integer getDobDay()
public Long getModifiedTime()
public Reference getCustomer()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullBusinessName()
public boolean isNotNullNote()
public boolean isNotNullDobYear()
public boolean isNotNullDobMonth()
public boolean isNotNullDobDay()
public boolean isNotNullModifiedTime()
public boolean isNotNullCustomer()
public boolean hasBusinessName()
public boolean hasNote()
public boolean hasDobYear()
public boolean hasDobMonth()
public boolean hasDobDay()
public boolean hasModifiedTime()
public boolean hasCustomer()
public CustomerMetadata setBusinessName(String businessName)
public CustomerMetadata setNote(String note)
public CustomerMetadata setDobYear(Integer dobYear)
public CustomerMetadata setDobMonth(Integer dobMonth)
public CustomerMetadata setDobDay(Integer dobDay)
public CustomerMetadata setModifiedTime(Long modifiedTime)
public CustomerMetadata setCustomer(Reference customer)
public void clearBusinessName()
public void clearNote()
public void clearDobYear()
public void clearDobMonth()
public void clearDobDay()
public void clearModifiedTime()
public void clearCustomer()
public boolean containsChanges()
public void resetChangeLog()
public CustomerMetadata copyChanges()
public void mergeChanges(CustomerMetadata src)