ItemUpdate class interface

Contains all the information related to an update of the field values for an item.

It reports all the new values of the fields.

COMMAND Subscription
If the involved Subscription is a COMMAND Subscription, then the values for the current update are meant as relative to the same key.
Moreover, if the involved Subscription has a two-level behavior enabled, then each update may be associated with either a first-level or a second-level item. In this case, the reported fields are always the union of the first-level and second-level fields and each single update can only change either the first-level or the second-level fields (but for the "command" field, which is first-level and is always set to "UPDATE" upon a second-level update); note that the second-level field values are always null until the first second-level update occurs). When the two-level behavior is enabled, in all methods where a field name has to be supplied, the following convention should be followed:

  • The field name can always be used, both for the first-level and the second-level fields. In case of name conflict, the first-level field is meant.
  • The field position can always be used; however, the field positions for the second-level fields start at the highest position of the first-level field list + 1. If a field schema had been specified for either first-level or second-level Subscriptions, then client-side knowledge of the first-level schema length would be required.

Properties

hashCode int
The hash code for this object.
no setterinherited
runtimeType Type
A representation of the runtime type of the object.
no setterinherited

Methods

getChangedFields() Map<String, String?>
Returns an immutable Map containing the values for each field changed with the last server update.
getChangedFieldsByPosition() Map<int, String?>
Returns an immutable Map containing the values for each field changed with the last server update.
getFields() Map<String, String?>
Returns an immutable Map containing the values for each field in the Subscription.
getFieldsByPosition() Map<int, String?>
Returns an immutable Map containing the values for each field in the Subscription.
getItemName() String?
Inquiry method that retrieves the name of the item to which this update pertains.
getItemPos() int
Inquiry method that retrieves the position in the "Item List" or "Item Group" of the item to which this update pertains.
getValue(String fieldName) String?
Returns the current value for the specified field.
getValueAsJSONPatchIfAvailable(String fieldName) String?
Inquiry method that gets the difference between the new value and the previous one as a JSON Patch structure, provided that the Server has used the JSON Patch format to send this difference, as part of the "delta delivery" mechanism.
getValueAsJSONPatchIfAvailableByPosition(int fieldPosition) String?
Inquiry method that gets the difference between the new value and the previous one as a JSON Patch structure, provided that the Server has used the JSON Patch format to send this difference, as part of the "delta delivery" mechanism.
getValueByPosition(int fieldPosition) String?
Returns the current value for the specified field.
isSnapshot() bool
Inquiry method that asks whether the current update belongs to the item snapshot (which carries the current item state at the time of Subscription).
isValueChanged(String fieldName) bool
Inquiry method that asks whether the value for a field has changed after the reception of the last update from the Server for an item.
isValueChangedByPosition(int fieldPosition) bool
Inquiry method that asks whether the value for a field has changed after the reception of the last update from the Server for an item.
noSuchMethod(Invocation invocation) → dynamic
Invoked when a nonexistent method or property is accessed.
inherited
toString() String
A string representation of this object.
inherited

Operators

operator ==(Object other) bool
The equality operator.
inherited