DeltaPacketImpl

Kind of class:class
Inherits from:Object
Implements:
Author:Jason Williams
Classpath:mx.data.components.datasetclasses.DeltaPacketImpl
File last modified:Tuesday, 18 December 2007, 15:44:38
Implements the DeltaPacket interface allowing clients to access the changes
made to the associated DataSet collection and its transfer objects.

Summary


Constructor
  • DeltaPacketImpl (src:Object, id:String, keyInfo:Object, log:Boolean, conSch:Object)
    • Constructs an instance of the DeltaPacket with the specified data and
Instance properties
Instance methods
  • addItem (item:Object) : Boolean
    • Adds the specified delta item to the delta packet
  • clear : Void
    • Clears this delta packet of all changes.
  • contains (item:Object) : Boolean
    • Returns if the specified item exists in the
  • getIterator : Iterator
    • Reutrns an iterator for this collection.
  • getItemAt (index:Number) : Object
    • Used by the iterator to extract an item from this collection
  • getConfigInfo (info:Object) : Object
    • Returns the schema associated with the source component of this delta packet's source
  • getKeyInfo : Object
    • Returns the key information about this delta packet's items.
  • getLength : Number
    • Returns the number of delta within this delta packet.
  • getSource : Object
    • Returns the source of this DeltaPacket.
  • getTransactionId : String
    • Returns the transaction id of this DeltaPacket.
  • getTimestamp : Date
    • Returns the date and time when this DeltaPacket was created.
  • isEmpty : Boolean
    • Indicates if there are any Delta contained within this packet.
  • removeItem (item:Object) : Boolean
  • logChanges : Boolean
    • Returns if the application of this delta packet should

Constructor

DeltaPacketImpl

function DeltaPacketImpl (
src:Object, id:String, keyInfo:Object, log:Boolean, conSch:Object)

Constructs an instance of the DeltaPacket with the specified data and
source.
Parameters:
src :
Object source of this delta packet
id :
String containing the unique transaction id for this
delta packet
keyInfo:
Object containing the
log :
Boolean indicating if this packet of changes should be logged when applied to a dataset
conSch :
Object containing the connector schema used when setting the items property of the dataset

Instance properties

_confInfo

private _confInfo:Object
(read)

_deltaPacket

private _deltaPacket:Array
(read)

_keyInfo

private _keyInfo:Object
(read)

_log

private _log:Boolean
(read)

_optimized

private _optimized:Boolean
(read)

_source

private _source:Object
(read)

_timestamp

private _timestamp:Date
(read)

_transId

private _transId:String
(read)

Instance methods

addItem

function addItem (
item:Object) : Boolean

Adds the specified delta item to the delta packet
Parameters:
item:
Object delta to add to this delta packet

clear

function clear (
) : Void

Clears this delta packet of all changes.

contains

function contains (
item:Object) : Boolean

Returns if the specified item exists in the

getConfigInfo

function getConfigInfo (
info:Object) : Object

Returns the schema associated with the source component of this delta packet's source
component. e.g. XMLConnector's schema in the scenario
Parameters:
info:
Object containing information that only the implementation will
understand
#
Returns:
  • Object contiaining the requested information
    #

getItemAt

function getItemAt (
index:Number) : Object

Used by the iterator to extract an item from this collection
Parameters:
index:
Number containing the desired item within the collection
Returns:
  • Object item from the collection at the specified position

getIterator

function getIterator (

Reutrns an iterator for this collection.
Returns:
  • Iterator

getKeyInfo

function getKeyInfo (
) : Object

Returns the key information about this delta packet's items. This information
is used during the resolve process between a component and the delta packet.
Returns:
  • Object containing key property information for the items descibed in
    this delta packet.
Specified by:

getLength

function getLength (
) : Number

Returns the number of delta within this delta packet.
Returns:
  • Number containing the number of delta or changes contained.

getSource

function getSource (
) : Object

Returns the source of this DeltaPacket.
Returns:
  • Object source of this DeltaPacket i.e. which DataSet
    did it come from.
Specified by:

getTimestamp

function getTimestamp (
) : Date

Returns the date and time when this DeltaPacket was created.
Returns:
  • Date containing the date and time this delta packet was created.

getTransactionId

function getTransactionId (
) : String

Returns the transaction id of this DeltaPacket.
Returns:
  • String transaction id for this delta packet

isEmpty

function isEmpty (
) : Boolean

Indicates if there are any Delta contained within this packet.
Returns:
  • Boolean true if there are no items in the packet, false otherwise.

logChanges

function logChanges (
) : Boolean

Returns if the application of this delta packet should
be logged.
Returns:
  • Boolean indicating if the changes of this packet should
    be logged when applied.
Specified by:

removeItem

function removeItem (
item:Object) : Boolean