Lightstreamer macOS Client  1.2.5
Native macOS Client library for Lightstreamer
Instance Methods | Class Methods | Properties | List of all members
LSUpdateInfo Class Reference

The LSUpdateInfo class provides information about an update for a subscribed item. More...

#import <LSUpdateInfo.h>

Inheritance diagram for LSUpdateInfo:

Instance Methods

(id) - initWithItemPosition:itemName:fieldNames:oldValues:changeFlags:newValues:isSnapshot:
 Initializes an LSUpdateInfo object with the specified parameters. More...
 
(BOOL) - isChangedValueOfFieldPosition:
 Tells if the value for a field has changed after the reception of this update. More...
 
(BOOL) - isChangedValueOfFieldName:
 Tells if the value for a field has changed after the reception of this update. More...
 
(NSString *) - currentValueOfFieldPosition:
 Gets the value for a field as it is after the reception of this update. More...
 
(NSString *) - currentValueOfFieldName:
 Gets the value for a field as it is after the reception of this update. More...
 
(NSString *) - previousValueOfFieldPosition:
 Gets the value for a field as it was before the reception of this update. More...
 
(NSString *) - previousValueOfFieldName:
 Gets the value for a field as it was before the reception of this update. More...
 

Class Methods

(LSUpdateInfo *) + updateInfoForItemPosition:itemName:fieldNames:oldValues:changeFlags:newValues:isSnapshot:
 Creates and returns an LSUpdateInfo object with the specified parameters. More...
 

Properties

int itemPosition
 The 1-based position of the item in the Group of items in the related table. More...
 
NSString * itemName
 The item name, or nil if an LSTableInfo was used to describe the related table. More...
 
int numberOfFields
 The number of fields of the Schema used to subscribe the table. More...
 
BOOL isSnapshot
 Tells if the update is part of the initial snapshot. More...
 

Detailed Description

The LSUpdateInfo class provides information about an update for a subscribed item.

The new and previous values for the subscribed fields are reported.
NOTE: If the table subscription configuration enables the "COMMAND logic", then the old field values are referred to the same key.
Both names and positional information can be used to identify the specific fields, unless an LSTableInfo was used to describe the related table: in that case, only positional information can be used.

Method Documentation

- (NSString *) currentValueOfFieldName: (NSString *)  fieldName

Gets the value for a field as it is after the reception of this update.

Parameters
fieldNameA field name.
Returns
The field value (nil is legal value too).
Exceptions
LSPushClientExceptionThrown in case the specified field name does not represent a subscribed field or an LSTableInfo was used to describe the related table.
- (NSString *) currentValueOfFieldPosition: (int)  fieldPosition

Gets the value for a field as it is after the reception of this update.

Parameters
fieldPositionThe 1-based field position within the Schema of fields in the related table.
Returns
The field value (nil is legal value too).
Exceptions
LSPushClientExceptionThrown in case the specified field position does not represent a subscribed field.
- (id) initWithItemPosition: (int)  itemPosition
itemName: (NSString *)  itemName
fieldNames: (NSArray *)  fieldNames
oldValues: (NSArray *)  oldValues
changeFlags: (NSArray *)  changeFlags
newValues: (NSArray *)  newValues
isSnapshot: (BOOL)  isSnapshot 

Initializes an LSUpdateInfo object with the specified parameters.


This initializer is for internal use only.

Parameters
itemPositionThe 1-based position of the item in the Group of items in the related table.
itemNameThe item name, or nil if an LSTableInfo was used to describe the related table.
fieldNamesAn array of strings containing the names of fields of the Schema used to subscribe the table, or nil if an LSTableInfo was used to describe the related table.
oldValuesAn array of strings containing the previous values of fields of the Schema.
changeFlagsAn array of booleans flagging which fields of the Schema change with this update.
newValuesAn array of strings containing the current values of fields of the Schema.
isSnapshotTells if the update is part of the initial snapshot.
Returns
The LSUpdateInfo object.
- (BOOL) isChangedValueOfFieldName: (NSString *)  fieldName

Tells if the value for a field has changed after the reception of this update.

For the first update for the item, it always returns YES.

Parameters
fieldNameA field name.
Returns
YES if the updated value is different than the previous one.
Exceptions
LSPushClientExceptionThrown in case the specified field name does not represent a subscribed field or an LSTableInfo was used to describe the related table.
- (BOOL) isChangedValueOfFieldPosition: (int)  fieldPosition

Tells if the value for a field has changed after the reception of this update.

For the first update for the item, it always returns YES.

Parameters
fieldPositionThe 1-based field position within the Schema of fields in the related table.
Returns
YES if the updated value is different than the previous one.
Exceptions
LSPushClientExceptionThrown in case the specified field position does not represent a subscribed field.
- (NSString *) previousValueOfFieldName: (NSString *)  fieldName

Gets the value for a field as it was before the reception of this update.

Parameters
fieldNameA field name.
Returns
The previous field value (nil is a legal value too).
Exceptions
LSPushClientExceptionThrown in case the specified field name does not represent a subscribed field or an LSTableInfo was used to describe the related table.
- (NSString *) previousValueOfFieldPosition: (int)  fieldPosition

Gets the value for a field as it was before the reception of this update.

Parameters
fieldPositionThe 1-based field position within the Schema of fields in the related table.
Returns
The previous field value (nil is a legal value too).
Exceptions
LSPushClientExceptionThrown in case the specified field position does not represent a subscribed field.
+ (LSUpdateInfo *) updateInfoForItemPosition: (int)  itemPosition
itemName: (NSString *)  itemName
fieldNames: (NSArray *)  fieldNames
oldValues: (NSArray *)  oldValues
changeFlags: (NSArray *)  changeFlags
newValues: (NSArray *)  newValues
isSnapshot: (BOOL)  isSnapshot 

Creates and returns an LSUpdateInfo object with the specified parameters.


This factory method is for internal use only.

Parameters
itemPositionThe 1-based position of the item in the Group of items in the related table.
itemNameThe item name, or nil if an LSTableInfo was used to describe the related table.
fieldNamesAn array of strings containing the names of fields of the Schema used to subscribe the table, or nil if an LSTableInfo was used to describe the related table.
oldValuesAn array of strings containing the previous values of fields of the Schema.
changeFlagsAn array of booleans flagging which fields of the Schema change with this update.
newValuesAn array of strings containing the current values of fields of the Schema.
isSnapshotTells if the update is part of the initial snapshot.
Returns
The LSUpdateInfo object.

Property Documentation

- (BOOL) isSnapshot
readnonatomicassign

Tells if the update is part of the initial snapshot.

- (NSString*) itemName
readnonatomicassign

The item name, or nil if an LSTableInfo was used to describe the related table.

- (int) itemPosition
readnonatomicassign

The 1-based position of the item in the Group of items in the related table.

- (int) numberOfFields
readnonatomicassign

The number of fields of the Schema used to subscribe the table.

In case an LSTableInfo was used to describe the related table, this number might not be known at subscription time.


The documentation for this class was generated from the following file: