DADelta

Overview

The DADelta class is used internally to maintain a list of inserted, deleted and updated rows in a DADataTable until they are sent to the server and applied to the back-end database. Each contained change is represented by a DADeltaChange instance.

Location

 

addChange:

Appends given change to delta's change list.

- (void) addChange:(DADeltaChange *)change

Parameters:

  • change: Change we want to append.

changes

Provides access to the array of DADeltaChange objects.

@property (readonly) NSArray *changes

deltaWithTable:

Creates and initializes a new DADelta' object with the changes from the given table.

+ (id) deltaWithTable:(DADataTable *)ownerTable

Parameters:

  • ownerTable: Reference to the DADataTable for which the delta will be created.

errorMessages

Returns all error messages that were returned when trying to apply changes to the server.

@property (readonly) NSString *errorMessages

errors

Returns an array of all failed DADeltaChanges.

@property (readonly) NSArray *errors

hasErrors

Returns YES if one or more changes have failed to be applied on the server, NO if all changes were applied successfully.

@property (readonly) BOOL hasErrors

initWithTable:

Initializes a new DADelta' object with the changes from the given table.

- (id) initWithTable:(DADataTable *)ownerTable

Parameters:

  • ownerTable: Reference to the DADataTable for which we want to create a delta.

lockRows

This method is used internally by DARemoteDataAdapter to lock changed rows and prevent them from future changes. Locking is important in case of asynchronous updating data. We need to be sure that pending changes will not be modified at the client side while they trying to apply at the server

- (void) lockRows

name

Delta name (which equals to the name of the data table)

@property (readonly) NSString *name

table  retain

Returns reference to DADataTable to which this delta belongs.

@property (retain) DADataTable *table

unlockRows

This method is used internally by DARemoteDataAdapter to unlock changed rows and allow their future changes. Unlock is called after the server returns a response if the request was successful or unsuccessful

- (void) unlockRows

 

changes

Provides access to the array of DADeltaChange objects.

@property (readonly) NSArray *changes

errorMessages

Returns all error messages that were returned when trying to apply changes to the server.

@property (readonly) NSString *errorMessages

errors

Returns an array of all failed DADeltaChanges.

@property (readonly) NSArray *errors

hasErrors

Returns YES if one or more changes have failed to be applied on the server, NO if all changes were applied successfully.

@property (readonly) BOOL hasErrors

name

Delta name (which equals to the name of the data table)

@property (readonly) NSString *name

table  retain

Returns reference to DADataTable to which this delta belongs.

@property (retain) DADataTable *table

 

deltaWithTable:

Creates and initializes a new DADelta' object with the changes from the given table.

+ (id) deltaWithTable:(DADataTable *)ownerTable

Parameters:

  • ownerTable: Reference to the DADataTable for which the delta will be created.

 

addChange:

Appends given change to delta's change list.

- (void) addChange:(DADeltaChange *)change

Parameters:

  • change: Change we want to append.

initWithTable:

Initializes a new DADelta' object with the changes from the given table.

- (id) initWithTable:(DADataTable *)ownerTable

Parameters:

  • ownerTable: Reference to the DADataTable for which we want to create a delta.

lockRows

This method is used internally by DARemoteDataAdapter to lock changed rows and prevent them from future changes. Locking is important in case of asynchronous updating data. We need to be sure that pending changes will not be modified at the client side while they trying to apply at the server

- (void) lockRows

unlockRows

This method is used internally by DARemoteDataAdapter to unlock changed rows and allow their future changes. Unlock is called after the server returns a response if the request was successful or unsuccessful

- (void) unlockRows

See Also