Package com.clover.sdk.v3.hours
Class HoursSet
- java.lang.Object
-
- com.clover.sdk.GenericParcelable
-
- com.clover.sdk.v3.hours.HoursSet
-
- All Implemented Interfaces:
Parcelable
,JSONifiable
,Validator
public class HoursSet extends GenericParcelable implements Validator, JSONifiable
-
-
Nested Class Summary
Nested Classes Modifier and Type Class Description static interface
HoursSet.Constraints
-
Nested classes/interfaces inherited from interface com.clover.sdk.JSONifiable
JSONifiable.Creator<T>
-
Nested classes/interfaces inherited from interface android.os.Parcelable
Parcelable.ClassLoaderCreator<T extends Object>, Parcelable.Creator<T extends Object>
-
-
Field Summary
Fields Modifier and Type Field Description static Parcelable.Creator<HoursSet>
CREATOR
static JSONifiable.Creator<HoursSet>
JSON_CREATOR
-
Fields inherited from interface android.os.Parcelable
CONTENTS_FILE_DESCRIPTOR, PARCELABLE_WRITE_RETURN_VALUE
-
-
Constructor Summary
Constructors Modifier Constructor Description HoursSet()
Constructs a new empty instance.protected
HoursSet(boolean noInit)
Constructs a new empty instance.HoursSet(HoursSet src)
Constructs a new instance that is a deep copy of the source instance.HoursSet(String json)
Constructs a new instance from the given JSON String.HoursSet(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.
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description void
clearFriday()
Clears the 'friday' field, the 'has' method for this field will now return falsevoid
clearId()
Clears the 'id' field, the 'has' method for this field will now return falsevoid
clearMonday()
Clears the 'monday' field, the 'has' method for this field will now return falsevoid
clearName()
Clears the 'name' field, the 'has' method for this field will now return falsevoid
clearReference()
Clears the 'reference' field, the 'has' method for this field will now return falsevoid
clearSaturday()
Clears the 'saturday' field, the 'has' method for this field will now return falsevoid
clearSunday()
Clears the 'sunday' field, the 'has' method for this field will now return falsevoid
clearThursday()
Clears the 'thursday' field, the 'has' method for this field will now return falsevoid
clearTuesday()
Clears the 'tuesday' field, the 'has' method for this field will now return falsevoid
clearWednesday()
Clears the 'wednesday' field, the 'has' method for this field will now return falseboolean
containsChanges()
Returns true if this instance has any changes.HoursSet
copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.List<HourRange>
getFriday()
protected GenericClient
getGenericClient()
String
getId()
Unique identifierJSONObject
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<HourRange>
getMonday()
String
getName()
Friendly name to describe the hoursReference
getReference()
List<HourRange>
getSaturday()
List<HourRange>
getSunday()
List<HourRange>
getThursday()
List<HourRange>
getTuesday()
List<HourRange>
getWednesday()
boolean
hasFriday()
Checks whether the 'friday' field has been set, however the value could be nullboolean
hasId()
Checks whether the 'id' field has been set, however the value could be nullboolean
hasMonday()
Checks whether the 'monday' field has been set, however the value could be nullboolean
hasName()
Checks whether the 'name' field has been set, however the value could be nullboolean
hasReference()
Checks whether the 'reference' field has been set, however the value could be nullboolean
hasSaturday()
Checks whether the 'saturday' field has been set, however the value could be nullboolean
hasSunday()
Checks whether the 'sunday' field has been set, however the value could be nullboolean
hasThursday()
Checks whether the 'thursday' field has been set, however the value could be nullboolean
hasTuesday()
Checks whether the 'tuesday' field has been set, however the value could be nullboolean
hasWednesday()
Checks whether the 'wednesday' field has been set, however the value could be nullboolean
isNotEmptyFriday()
Checks whether the 'friday' field is set and is not null and is not emptyboolean
isNotEmptyMonday()
Checks whether the 'monday' field is set and is not null and is not emptyboolean
isNotEmptySaturday()
Checks whether the 'saturday' field is set and is not null and is not emptyboolean
isNotEmptySunday()
Checks whether the 'sunday' field is set and is not null and is not emptyboolean
isNotEmptyThursday()
Checks whether the 'thursday' field is set and is not null and is not emptyboolean
isNotEmptyTuesday()
Checks whether the 'tuesday' field is set and is not null and is not emptyboolean
isNotEmptyWednesday()
Checks whether the 'wednesday' field is set and is not null and is not emptyboolean
isNotNullFriday()
Checks whether the 'friday' field is set and is not nullboolean
isNotNullId()
Checks whether the 'id' field is set and is not nullboolean
isNotNullMonday()
Checks whether the 'monday' field is set and is not nullboolean
isNotNullName()
Checks whether the 'name' field is set and is not nullboolean
isNotNullReference()
Checks whether the 'reference' field is set and is not nullboolean
isNotNullSaturday()
Checks whether the 'saturday' field is set and is not nullboolean
isNotNullSunday()
Checks whether the 'sunday' field is set and is not nullboolean
isNotNullThursday()
Checks whether the 'thursday' field is set and is not nullboolean
isNotNullTuesday()
Checks whether the 'tuesday' field is set and is not nullboolean
isNotNullWednesday()
Checks whether the 'wednesday' field is set and is not nullvoid
mergeChanges(HoursSet 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.HoursSet
setFriday(List<HourRange> friday)
Sets the field 'friday'.HoursSet
setId(String id)
Sets the field 'id'.HoursSet
setMonday(List<HourRange> monday)
Sets the field 'monday'.HoursSet
setName(String name)
Sets the field 'name'.HoursSet
setReference(Reference reference)
Sets the field 'reference'.HoursSet
setSaturday(List<HourRange> saturday)
Sets the field 'saturday'.HoursSet
setSunday(List<HourRange> sunday)
Sets the field 'sunday'.HoursSet
setThursday(List<HourRange> thursday)
Sets the field 'thursday'.HoursSet
setTuesday(List<HourRange> tuesday)
Sets the field 'tuesday'.HoursSet
setWednesday(List<HourRange> wednesday)
Sets the field 'wednesday'.void
validate()
-
Methods inherited from class com.clover.sdk.GenericParcelable
describeContents, getBundle, toString, writeToParcel
-
-
-
-
Field Detail
-
CREATOR
public static final Parcelable.Creator<HoursSet> CREATOR
-
JSON_CREATOR
public static final JSONifiable.Creator<HoursSet> JSON_CREATOR
-
-
Constructor Detail
-
HoursSet
public HoursSet()
Constructs a new empty instance.
-
HoursSet
protected HoursSet(boolean noInit)
Constructs a new empty instance.
-
HoursSet
public HoursSet(String json) throws IllegalArgumentException
Constructs a new instance from the given JSON String.- Throws:
IllegalArgumentException
-
HoursSet
public HoursSet(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.
-
HoursSet
public HoursSet(HoursSet src)
Constructs a new instance that is a deep copy of the source instance. It does not copy the bundle or changelog.
-
-
Method Detail
-
getId
public String getId()
Unique identifier
-
getName
public String getName()
Friendly name to describe the hours
-
getReference
public Reference getReference()
-
getGenericClient
protected GenericClient getGenericClient()
- Specified by:
getGenericClient
in classGenericParcelable
-
getJSONObject
public 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.- Specified by:
getJSONObject
in interfaceJSONifiable
-
isNotNullId
public boolean isNotNullId()
Checks whether the 'id' field is set and is not null
-
isNotNullName
public boolean isNotNullName()
Checks whether the 'name' field is set and is not null
-
isNotNullReference
public boolean isNotNullReference()
Checks whether the 'reference' field is set and is not null
-
isNotNullSunday
public boolean isNotNullSunday()
Checks whether the 'sunday' field is set and is not null
-
isNotEmptySunday
public boolean isNotEmptySunday()
Checks whether the 'sunday' field is set and is not null and is not empty
-
isNotNullMonday
public boolean isNotNullMonday()
Checks whether the 'monday' field is set and is not null
-
isNotEmptyMonday
public boolean isNotEmptyMonday()
Checks whether the 'monday' field is set and is not null and is not empty
-
isNotNullTuesday
public boolean isNotNullTuesday()
Checks whether the 'tuesday' field is set and is not null
-
isNotEmptyTuesday
public boolean isNotEmptyTuesday()
Checks whether the 'tuesday' field is set and is not null and is not empty
-
isNotNullWednesday
public boolean isNotNullWednesday()
Checks whether the 'wednesday' field is set and is not null
-
isNotEmptyWednesday
public boolean isNotEmptyWednesday()
Checks whether the 'wednesday' field is set and is not null and is not empty
-
isNotNullThursday
public boolean isNotNullThursday()
Checks whether the 'thursday' field is set and is not null
-
isNotEmptyThursday
public boolean isNotEmptyThursday()
Checks whether the 'thursday' field is set and is not null and is not empty
-
isNotNullFriday
public boolean isNotNullFriday()
Checks whether the 'friday' field is set and is not null
-
isNotEmptyFriday
public boolean isNotEmptyFriday()
Checks whether the 'friday' field is set and is not null and is not empty
-
isNotNullSaturday
public boolean isNotNullSaturday()
Checks whether the 'saturday' field is set and is not null
-
isNotEmptySaturday
public boolean isNotEmptySaturday()
Checks whether the 'saturday' field is set and is not null and is not empty
-
hasId
public boolean hasId()
Checks whether the 'id' field has been set, however the value could be null
-
hasName
public boolean hasName()
Checks whether the 'name' field has been set, however the value could be null
-
hasReference
public boolean hasReference()
Checks whether the 'reference' field has been set, however the value could be null
-
hasSunday
public boolean hasSunday()
Checks whether the 'sunday' field has been set, however the value could be null
-
hasMonday
public boolean hasMonday()
Checks whether the 'monday' field has been set, however the value could be null
-
hasTuesday
public boolean hasTuesday()
Checks whether the 'tuesday' field has been set, however the value could be null
-
hasWednesday
public boolean hasWednesday()
Checks whether the 'wednesday' field has been set, however the value could be null
-
hasThursday
public boolean hasThursday()
Checks whether the 'thursday' field has been set, however the value could be null
-
hasFriday
public boolean hasFriday()
Checks whether the 'friday' field has been set, however the value could be null
-
hasSaturday
public boolean hasSaturday()
Checks whether the 'saturday' field has been set, however the value could be null
-
setReference
public HoursSet setReference(Reference reference)
Sets the field 'reference'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
-
setSunday
public HoursSet setSunday(List<HourRange> sunday)
Sets the field 'sunday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setMonday
public HoursSet setMonday(List<HourRange> monday)
Sets the field 'monday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setTuesday
public HoursSet setTuesday(List<HourRange> tuesday)
Sets the field 'tuesday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setWednesday
public HoursSet setWednesday(List<HourRange> wednesday)
Sets the field 'wednesday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setThursday
public HoursSet setThursday(List<HourRange> thursday)
Sets the field 'thursday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setFriday
public HoursSet setFriday(List<HourRange> friday)
Sets the field 'friday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
setSaturday
public HoursSet setSaturday(List<HourRange> saturday)
Sets the field 'saturday'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
-
clearId
public void clearId()
Clears the 'id' field, the 'has' method for this field will now return false
-
clearName
public void clearName()
Clears the 'name' field, the 'has' method for this field will now return false
-
clearReference
public void clearReference()
Clears the 'reference' field, the 'has' method for this field will now return false
-
clearSunday
public void clearSunday()
Clears the 'sunday' field, the 'has' method for this field will now return false
-
clearMonday
public void clearMonday()
Clears the 'monday' field, the 'has' method for this field will now return false
-
clearTuesday
public void clearTuesday()
Clears the 'tuesday' field, the 'has' method for this field will now return false
-
clearWednesday
public void clearWednesday()
Clears the 'wednesday' field, the 'has' method for this field will now return false
-
clearThursday
public void clearThursday()
Clears the 'thursday' field, the 'has' method for this field will now return false
-
clearFriday
public void clearFriday()
Clears the 'friday' field, the 'has' method for this field will now return false
-
clearSaturday
public void clearSaturday()
Clears the 'saturday' field, the 'has' method for this field will now return false
-
containsChanges
public boolean containsChanges()
Returns true if this instance has any changes.
-
resetChangeLog
public void resetChangeLog()
Reset the log of changes made to this instance, calling copyChanges() after this would return an empty instance.
-
copyChanges
public HoursSet copyChanges()
Create a copy of this instance that contains only fields that were set after the constructor was called.
-
mergeChanges
public void mergeChanges(HoursSet src)
Copy all the changed fields from the given source to this instance.
-
-