public class ItemUpdate
extends java.lang.Object
Modifier and Type | Method and Description |
---|---|
java.util.Map<java.lang.String,java.lang.String> |
getChangedFields()
Returns an immutable Map containing the values for each field changed with the last server update.
|
java.util.Map<java.lang.Integer,java.lang.String> |
getChangedFieldsByPosition()
Returns an immutable Map containing the values for each field changed with the last server update.
|
java.util.Map<java.lang.String,java.lang.String> |
getFields()
Returns an immutable Map containing the values for each field in the Subscription.
|
java.util.Map<java.lang.Integer,java.lang.String> |
getFieldsByPosition()
Returns an immutable Map containing the values for each field in the Subscription.
|
java.lang.String |
getItemName()
Inquiry method that retrieves the name of the item to which this update pertains.
The name will be null if the related Subscription was initialized using an "Item Group". |
int |
getItemPos()
Inquiry method that retrieves the position in the "Item List" or "Item Group" of the item to
which this update pertains.
|
java.lang.String |
getValue(int fieldPos)
Returns the current value for the specified field
|
java.lang.String |
getValue(java.lang.String fieldName)
Returns the current value for the specified field
|
boolean |
isSnapshot()
Inquiry method that asks whether the current update belongs to the item snapshot (which carries
the current item state at the time of Subscription).
|
boolean |
isValueChanged(int fieldPos)
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.
|
boolean |
isValueChanged(java.lang.String fieldName)
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.
|
public java.lang.String getItemName()
Subscription.setItemGroup(String)
,
Subscription.setItems(String[])
public int getItemPos()
Subscription.setItemGroup(String)
,
Subscription.setItems(String[])
public java.lang.String getValue(java.lang.String fieldName)
fieldName
- The field name as specified within the "Field List".java.lang.IllegalArgumentException
- if the specified field is not part of the Subscription.Subscription.setFields(String[])
public java.lang.String getValue(int fieldPos)
fieldPos
- The 1-based position of the field within the "Field List" or "Field Schema".java.lang.IllegalArgumentException
- if the specified field is not part of the Subscription.Subscription.setFieldSchema(String)
,
Subscription.setFields(String[])
public boolean isSnapshot()
Subscription.setRequestedSnapshot(String)
and precede the real time events. Snapshot informations take different forms in different
subscription modes and can be spanned across zero, one or several update events. In particular:
Subscription.setRequestedSnapshot(String)
, unless fewer are available;public boolean isValueChanged(java.lang.String fieldName)
fieldName
- The field name as specified within the "Field List".java.lang.IllegalArgumentException
- if the specified field is not part of the Subscription.Subscription.setFields(String[])
public boolean isValueChanged(int fieldPos)
fieldPos
- The 1-based position of the field within the "Field List" or "Field Schema".java.lang.IllegalArgumentException
- if the specified field is not part of the Subscription.Subscription.setFieldSchema(String)
,
Subscription.setFields(String[])
public java.util.Map<java.lang.String,java.lang.String> getChangedFields()
java.lang.IllegalStateException
- if the Subscription was initialized using a field schema.Subscription.setFieldSchema(String)
,
Subscription.setFields(String[])
public java.util.Map<java.lang.Integer,java.lang.String> getChangedFieldsByPosition()
Subscription.setFieldSchema(String)
,
Subscription.setFields(String[])
public java.util.Map<java.lang.String,java.lang.String> getFields()
java.lang.IllegalStateException
- if the Subscription was initialized using a field schema.Subscription.setFieldSchema(String)
,
Subscription.setFields(String[])
public java.util.Map<java.lang.Integer,java.lang.String> getFieldsByPosition()
Subscription.setFieldSchema(String)
,
Subscription.setFields(String[])