public class MerchantPlanMeta extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
MerchantPlanMeta.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<MerchantPlanMeta> |
CREATOR |
static JSONifiable.Creator<MerchantPlanMeta> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
MerchantPlanMeta()
Constructs a new empty instance.
|
protected |
MerchantPlanMeta(boolean noInit)
Constructs a new empty instance.
|
|
MerchantPlanMeta(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.
|
|
MerchantPlanMeta(MerchantPlanMeta src)
Constructs a new instance that is a deep copy of the source instance.
|
|
MerchantPlanMeta(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearCurrentMerchantPlan()
Clears the 'currentMerchantPlan' field, the 'has' method for this field will now return false
|
void |
clearMerchantPlans()
Clears the 'merchantPlans' field, the 'has' method for this field will now return false
|
void |
clearRules()
Clears the 'rules' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
MerchantPlanMeta |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
MerchantPlan |
getCurrentMerchantPlan() |
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.
|
List<MerchantPlan> |
getMerchantPlans() |
MerchantPlanRules |
getRules() |
boolean |
hasCurrentMerchantPlan()
Checks whether the 'currentMerchantPlan' field has been set, however the value could be null
|
boolean |
hasMerchantPlans()
Checks whether the 'merchantPlans' field has been set, however the value could be null
|
boolean |
hasRules()
Checks whether the 'rules' field has been set, however the value could be null
|
boolean |
isNotEmptyMerchantPlans()
Checks whether the 'merchantPlans' field is set and is not null and is not empty
|
boolean |
isNotNullCurrentMerchantPlan()
Checks whether the 'currentMerchantPlan' field is set and is not null
|
boolean |
isNotNullMerchantPlans()
Checks whether the 'merchantPlans' field is set and is not null
|
boolean |
isNotNullRules()
Checks whether the 'rules' field is set and is not null
|
void |
mergeChanges(MerchantPlanMeta 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.
|
MerchantPlanMeta |
setCurrentMerchantPlan(MerchantPlan currentMerchantPlan)
Sets the field 'currentMerchantPlan'.
|
MerchantPlanMeta |
setMerchantPlans(List<MerchantPlan> merchantPlans)
Sets the field 'merchantPlans'.
|
MerchantPlanMeta |
setRules(MerchantPlanRules rules)
Sets the field 'rules'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<MerchantPlanMeta> CREATOR
public static final JSONifiable.Creator<MerchantPlanMeta> JSON_CREATOR
public MerchantPlanMeta()
protected MerchantPlanMeta(boolean noInit)
public MerchantPlanMeta(String json) throws IllegalArgumentException
IllegalArgumentException
public MerchantPlanMeta(JSONObject jsonObject)
public MerchantPlanMeta(MerchantPlanMeta src)
public List<MerchantPlan> getMerchantPlans()
public MerchantPlan getCurrentMerchantPlan()
public MerchantPlanRules getRules()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullMerchantPlans()
public boolean isNotEmptyMerchantPlans()
public boolean isNotNullCurrentMerchantPlan()
public boolean isNotNullRules()
public boolean hasMerchantPlans()
public boolean hasCurrentMerchantPlan()
public boolean hasRules()
public MerchantPlanMeta setMerchantPlans(List<MerchantPlan> merchantPlans)
public MerchantPlanMeta setCurrentMerchantPlan(MerchantPlan currentMerchantPlan)
public MerchantPlanMeta setRules(MerchantPlanRules rules)
public void clearMerchantPlans()
public void clearCurrentMerchantPlan()
public void clearRules()
public boolean containsChanges()
public void resetChangeLog()
public MerchantPlanMeta copyChanges()
public void mergeChanges(MerchantPlanMeta src)