Lightstreamer iOS Client 1.1.1
Native iOS/Mac OS X Client library for Lightstreamer Server version 4.x and up
Public Member Functions | Static Public Member Functions | Properties

LSUpdateInfo Class Reference

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

#import <LSUpdateInfo.h>

List of all members.

Public Member Functions

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

Static Public Member Functions

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

Properties

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

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.


Member Function 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:
NSInvalidArgumentExceptionThrown in case the specified field name does not represent a subscribed field.
LSExceptionThron in case 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:
NSInvalidArgumentExceptionThrown 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
newValues: (NSArray *)  newValues
isSnapshot: (BOOL)  isSnapshot 

Initializes an LSUpdateInfo object with the specified parameters.

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.
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:
NSInvalidArgumentExceptionThrown in case the specified field name does not represent a subscribed field.
LSExceptionThron in case 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:
NSInvalidArgumentExceptionThrown 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:
NSInvalidArgumentExceptionThrown in case the specified field name does not represent a subscribed field.
LSExceptionThron in case 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:
NSInvalidArgumentExceptionThrown 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
newValues: (NSArray *)  newValues
isSnapshot: (BOOL)  isSnapshot 

Creates and returns an LSUpdateInfo object with the specified parameters.

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.
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 [read, assign]

Tells if the update is part of the initial snapshot.

- (NSString*) itemName [read, assign]

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

- (int) itemPosition [read, assign]

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

- (int) numberOfFields [read, assign]

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: