home *** CD-ROM | disk | FTP | other *** search
/ One Click 5 / ONCE005.iso / Interface / it.dig / scripts / __Packages / mx / data / components / datasetclasses / DeltaPacketImpl.as < prev   
Encoding:
Text File  |  2006-06-12  |  2.0 KB  |  93 lines

  1. class mx.data.components.datasetclasses.DeltaPacketImpl extends Object implements mx.data.components.datasetclasses.DeltaPacket
  2. {
  3.    var _deltaPacket;
  4.    var _optimized;
  5.    var _source;
  6.    var _keyInfo;
  7.    var _transId;
  8.    var _log;
  9.    var _timestamp;
  10.    var _confInfo;
  11.    function DeltaPacketImpl(src, id, keyInfo, log, conSch)
  12.    {
  13.       super();
  14.       this._deltaPacket = new Array();
  15.       this._optimized = true;
  16.       this._source = src;
  17.       this._keyInfo = keyInfo != undefined ? keyInfo : null;
  18.       this._transId = id;
  19.       this._log = log != undefined ? log : false;
  20.       this._timestamp = new Date();
  21.       this._confInfo = conSch;
  22.    }
  23.    function addItem(item)
  24.    {
  25.       if(item instanceof mx.data.components.datasetclasses.Delta)
  26.       {
  27.          item._owner = this;
  28.          this._deltaPacket.push(item);
  29.          return true;
  30.       }
  31.       return false;
  32.    }
  33.    function clear()
  34.    {
  35.       this._deltaPacket = new Array();
  36.    }
  37.    function contains(item)
  38.    {
  39.       var _loc3_ = false;
  40.       var _loc2_ = 0;
  41.       while(!_loc3_ && _loc2_ < this._deltaPacket.length)
  42.       {
  43.          _loc3_ = this._deltaPacket[_loc2_] == item;
  44.          _loc2_ = _loc2_ + 1;
  45.       }
  46.       return _loc3_;
  47.    }
  48.    function getIterator()
  49.    {
  50.       return new mx.utils.IteratorImpl(this);
  51.    }
  52.    function getItemAt(index)
  53.    {
  54.       return this._deltaPacket[index];
  55.    }
  56.    function getConfigInfo(info)
  57.    {
  58.       return this._confInfo;
  59.    }
  60.    function getKeyInfo()
  61.    {
  62.       return this._keyInfo;
  63.    }
  64.    function getLength()
  65.    {
  66.       return this._deltaPacket.length;
  67.    }
  68.    function getSource()
  69.    {
  70.       return this._source;
  71.    }
  72.    function getTransactionId()
  73.    {
  74.       return this._transId;
  75.    }
  76.    function getTimestamp()
  77.    {
  78.       return this._timestamp;
  79.    }
  80.    function isEmpty()
  81.    {
  82.       return this._deltaPacket.length == 0;
  83.    }
  84.    function removeItem(item)
  85.    {
  86.       return false;
  87.    }
  88.    function logChanges()
  89.    {
  90.       return this._log;
  91.    }
  92. }
  93.