public class AppBundle extends GenericParcelable implements Validator, JSONifiable
Modifier and Type | Class and Description |
---|---|
static interface |
AppBundle.Constraints |
JSONifiable.Creator<T>
Parcelable.ClassLoaderCreator<T>, Parcelable.Creator<T>
Modifier and Type | Field and Description |
---|---|
static Parcelable.Creator<AppBundle> |
CREATOR |
static JSONifiable.Creator<AppBundle> |
JSON_CREATOR |
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
Modifier | Constructor and Description |
---|---|
|
AppBundle()
Constructs a new empty instance.
|
|
AppBundle(AppBundle src)
Constructs a new instance that is a deep copy of the source instance.
|
protected |
AppBundle(boolean noInit)
Constructs a new empty instance.
|
|
AppBundle(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.
|
|
AppBundle(String json)
Constructs a new instance from the given JSON String.
|
Modifier and Type | Method and Description |
---|---|
void |
clearBundleCountries()
Clears the 'bundleCountries' 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 |
clearIncludedApps()
Clears the 'includedApps' 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 |
clearPrice()
Clears the 'price' field, the 'has' method for this field will now return false
|
void |
clearPricePerDevice()
Clears the 'pricePerDevice' field, the 'has' method for this field will now return false
|
boolean |
containsChanges()
Returns true if this instance has any changes.
|
AppBundle |
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
|
List<AppBundleCountry> |
getBundleCountries()
Bundle country options for this app bundle
|
protected GenericClient |
getGenericClient() |
String |
getId()
Unique identifier
|
List<Reference> |
getIncludedApps() |
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 name of the bundle
|
Long |
getPrice()
Deprecated.
|
Long |
getPricePerDevice()
Deprecated.
|
boolean |
hasBundleCountries()
Checks whether the 'bundleCountries' 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 |
hasIncludedApps()
Checks whether the 'includedApps' 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 |
hasPrice()
Checks whether the 'price' field has been set, however the value could be null
|
boolean |
hasPricePerDevice()
Checks whether the 'pricePerDevice' field has been set, however the value could be null
|
boolean |
isNotEmptyBundleCountries()
Checks whether the 'bundleCountries' field is set and is not null and is not empty
|
boolean |
isNotEmptyIncludedApps()
Checks whether the 'includedApps' field is set and is not null and is not empty
|
boolean |
isNotNullBundleCountries()
Checks whether the 'bundleCountries' field is set and is not null
|
boolean |
isNotNullId()
Checks whether the 'id' field is set and is not null
|
boolean |
isNotNullIncludedApps()
Checks whether the 'includedApps' field is set and is not null
|
boolean |
isNotNullName()
Checks whether the 'name' field is set and is not null
|
boolean |
isNotNullPrice()
Checks whether the 'price' field is set and is not null
|
boolean |
isNotNullPricePerDevice()
Checks whether the 'pricePerDevice' field is set and is not null
|
void |
mergeChanges(AppBundle 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.
|
AppBundle |
setBundleCountries(List<AppBundleCountry> bundleCountries)
Sets the field 'bundleCountries'.
|
AppBundle |
setId(String id)
Sets the field 'id'.
|
AppBundle |
setIncludedApps(List<Reference> includedApps)
Sets the field 'includedApps'.
|
AppBundle |
setName(String name)
Sets the field 'name'.
|
AppBundle |
setPrice(Long price)
Sets the field 'price'.
|
AppBundle |
setPricePerDevice(Long pricePerDevice)
Sets the field 'pricePerDevice'.
|
void |
validate() |
describeContents, getBundle, toString, writeToParcel
public static final Parcelable.Creator<AppBundle> CREATOR
public static final JSONifiable.Creator<AppBundle> JSON_CREATOR
public AppBundle()
protected AppBundle(boolean noInit)
public AppBundle(String json) throws IllegalArgumentException
IllegalArgumentException
public AppBundle(JSONObject jsonObject)
public AppBundle(AppBundle src)
public String getId()
public String getName()
@Deprecated public Long getPrice()
@Deprecated public Long getPricePerDevice()
public List<AppBundleCountry> getBundleCountries()
protected GenericClient getGenericClient()
getGenericClient
in class GenericParcelable
public JSONObject getJSONObject()
getJSONObject
in interface JSONifiable
public boolean isNotNullId()
public boolean isNotNullName()
public boolean isNotNullPrice()
public boolean isNotNullPricePerDevice()
public boolean isNotNullIncludedApps()
public boolean isNotEmptyIncludedApps()
public boolean isNotNullBundleCountries()
public boolean isNotEmptyBundleCountries()
public boolean hasId()
public boolean hasName()
public boolean hasPrice()
public boolean hasPricePerDevice()
public boolean hasIncludedApps()
public boolean hasBundleCountries()
public AppBundle setPricePerDevice(Long pricePerDevice)
public AppBundle setIncludedApps(List<Reference> includedApps)
public AppBundle setBundleCountries(List<AppBundleCountry> bundleCountries)
public void clearId()
public void clearName()
public void clearPrice()
public void clearPricePerDevice()
public void clearIncludedApps()
public void clearBundleCountries()
public boolean containsChanges()
public void resetChangeLog()
public AppBundle copyChanges()
public void mergeChanges(AppBundle src)