Class DeviceAccessory

    • Constructor Detail

      • DeviceAccessory

        public DeviceAccessory()
        Constructs a new empty instance.
      • DeviceAccessory

        protected DeviceAccessory​(boolean noInit)
        Constructs a new empty instance.
      • DeviceAccessory

        public DeviceAccessory​(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.
      • DeviceAccessory

        public DeviceAccessory​(DeviceAccessory 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
      • getModel

        public String getModel()
      • getSerial

        public String getSerial()
        The accessories' serial number.
      • getAssociatedDevice

        public Reference getAssociatedDevice()
        The device that this accessory is currently connected to, a 128-bit UUID, not a normal base-13 Clover ID.
      • getCpuId

        public String getCpuId()
      • getPedCertificate

        public String getPedCertificate()
      • getDeviceType

        public Reference getDeviceType()
      • getVersionCode

        public Long getVersionCode()
      • getCurrentRom

        public Reference getCurrentRom()
      • getCreatedTime

        public Long getCreatedTime()
      • getModifiedTime

        public Long getModifiedTime()
      • 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 interface JSONifiable
      • isNotNullId

        public boolean isNotNullId()
        Checks whether the 'id' field is set and is not null
      • isNotNullModel

        public boolean isNotNullModel()
        Checks whether the 'model' field is set and is not null
      • isNotNullSerial

        public boolean isNotNullSerial()
        Checks whether the 'serial' field is set and is not null
      • isNotNullAssociatedDevice

        public boolean isNotNullAssociatedDevice()
        Checks whether the 'associatedDevice' field is set and is not null
      • isNotNullCpuId

        public boolean isNotNullCpuId()
        Checks whether the 'cpuId' field is set and is not null
      • isNotNullPedCertificate

        public boolean isNotNullPedCertificate()
        Checks whether the 'pedCertificate' field is set and is not null
      • isNotNullBuildType

        public boolean isNotNullBuildType()
        Checks whether the 'buildType' field is set and is not null
      • isNotNullDeviceType

        public boolean isNotNullDeviceType()
        Checks whether the 'deviceType' field is set and is not null
      • isNotNullVersionCode

        public boolean isNotNullVersionCode()
        Checks whether the 'versionCode' field is set and is not null
      • isNotNullCurrentRom

        public boolean isNotNullCurrentRom()
        Checks whether the 'currentRom' field is set and is not null
      • isNotNullSecureReports

        public boolean isNotNullSecureReports()
        Checks whether the 'secureReports' field is set and is not null
      • isNotEmptySecureReports

        public boolean isNotEmptySecureReports()
        Checks whether the 'secureReports' field is set and is not null and is not empty
      • isNotNullCreatedTime

        public boolean isNotNullCreatedTime()
        Checks whether the 'createdTime' field is set and is not null
      • isNotNullModifiedTime

        public boolean isNotNullModifiedTime()
        Checks whether the 'modifiedTime' field is set and is not null
      • hasId

        public boolean hasId()
        Checks whether the 'id' field has been set, however the value could be null
      • hasModel

        public boolean hasModel()
        Checks whether the 'model' field has been set, however the value could be null
      • hasSerial

        public boolean hasSerial()
        Checks whether the 'serial' field has been set, however the value could be null
      • hasAssociatedDevice

        public boolean hasAssociatedDevice()
        Checks whether the 'associatedDevice' field has been set, however the value could be null
      • hasCpuId

        public boolean hasCpuId()
        Checks whether the 'cpuId' field has been set, however the value could be null
      • hasPedCertificate

        public boolean hasPedCertificate()
        Checks whether the 'pedCertificate' field has been set, however the value could be null
      • hasBuildType

        public boolean hasBuildType()
        Checks whether the 'buildType' field has been set, however the value could be null
      • hasDeviceType

        public boolean hasDeviceType()
        Checks whether the 'deviceType' field has been set, however the value could be null
      • hasVersionCode

        public boolean hasVersionCode()
        Checks whether the 'versionCode' field has been set, however the value could be null
      • hasCurrentRom

        public boolean hasCurrentRom()
        Checks whether the 'currentRom' field has been set, however the value could be null
      • hasSecureReports

        public boolean hasSecureReports()
        Checks whether the 'secureReports' field has been set, however the value could be null
      • hasCreatedTime

        public boolean hasCreatedTime()
        Checks whether the 'createdTime' field has been set, however the value could be null
      • hasModifiedTime

        public boolean hasModifiedTime()
        Checks whether the 'modifiedTime' field has been set, however the value could be null
      • setAssociatedDevice

        public DeviceAccessory setAssociatedDevice​(Reference associatedDevice)
        Sets the field 'associatedDevice'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setPedCertificate

        public DeviceAccessory setPedCertificate​(String pedCertificate)
        Sets the field 'pedCertificate'.
      • setDeviceType

        public DeviceAccessory setDeviceType​(Reference deviceType)
        Sets the field 'deviceType'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setVersionCode

        public DeviceAccessory setVersionCode​(Long versionCode)
        Sets the field 'versionCode'.
      • setCurrentRom

        public DeviceAccessory setCurrentRom​(Reference currentRom)
        Sets the field 'currentRom'. The parameter is not copied so changes to it will be reflected in this instance and vice-versa.
      • setSecureReports

        public DeviceAccessory setSecureReports​(List<Reference> secureReports)
        Sets the field 'secureReports'. Nulls in the given List are skipped. List parameter is copied, so it will not reflect any changes, but objects inside it will.
      • setCreatedTime

        public DeviceAccessory setCreatedTime​(Long createdTime)
        Sets the field 'createdTime'.
      • setModifiedTime

        public DeviceAccessory setModifiedTime​(Long modifiedTime)
        Sets the field 'modifiedTime'.
      • clearId

        public void clearId()
        Clears the 'id' field, the 'has' method for this field will now return false
      • clearModel

        public void clearModel()
        Clears the 'model' field, the 'has' method for this field will now return false
      • clearSerial

        public void clearSerial()
        Clears the 'serial' field, the 'has' method for this field will now return false
      • clearAssociatedDevice

        public void clearAssociatedDevice()
        Clears the 'associatedDevice' field, the 'has' method for this field will now return false
      • clearCpuId

        public void clearCpuId()
        Clears the 'cpuId' field, the 'has' method for this field will now return false
      • clearPedCertificate

        public void clearPedCertificate()
        Clears the 'pedCertificate' field, the 'has' method for this field will now return false
      • clearBuildType

        public void clearBuildType()
        Clears the 'buildType' field, the 'has' method for this field will now return false
      • clearDeviceType

        public void clearDeviceType()
        Clears the 'deviceType' field, the 'has' method for this field will now return false
      • clearVersionCode

        public void clearVersionCode()
        Clears the 'versionCode' field, the 'has' method for this field will now return false
      • clearCurrentRom

        public void clearCurrentRom()
        Clears the 'currentRom' field, the 'has' method for this field will now return false
      • clearSecureReports

        public void clearSecureReports()
        Clears the 'secureReports' field, the 'has' method for this field will now return false
      • clearCreatedTime

        public void clearCreatedTime()
        Clears the 'createdTime' field, the 'has' method for this field will now return false
      • clearModifiedTime

        public void clearModifiedTime()
        Clears the 'modifiedTime' 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 DeviceAccessory copyChanges()
        Create a copy of this instance that contains only fields that were set after the constructor was called.
      • mergeChanges

        public void mergeChanges​(DeviceAccessory src)
        Copy all the changed fields from the given source to this instance.