Mage_Dataflow_Model_Mysql4_Batch_Abstract Class Reference

Inheritance diagram for Mage_Dataflow_Model_Mysql4_Batch_Abstract:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract Mage_Dataflow_Model_Mysql4_Batch_Export Mage_Dataflow_Model_Mysql4_Batch_Import

List of all members.

Public Member Functions

 getIdCollection (Mage_Dataflow_Model_Batch_Abstract $object)
 deleteCollection (Mage_Dataflow_Model_Batch_Abstract $object)


Detailed Description

Definition at line 35 of file Abstract.php.


Member Function Documentation

deleteCollection ( Mage_Dataflow_Model_Batch_Abstract object  ) 

Delete current Batch collection

Parameters:
Mage_Dataflow_Model_Batch_Abstract $object
Returns:
Mage_Dataflow_Model_Mysql4_Batch_Abstract

Definition at line 66 of file Abstract.php.

00067     {
00068         if (!$object->getBatchId()) {
00069             return $this;
00070         }
00071 
00072         $this->_getWriteAdapter()->delete($this->getMainTable(),
00073             $this->_getWriteAdapter()->quoteInto('batch_id=?', $object->getBatchId())
00074         );
00075         return $this;
00076     }

getIdCollection ( Mage_Dataflow_Model_Batch_Abstract object  ) 

Retrieve Id collection

Parameters:
Mage_Dataflow_Model_Batch_Abstract $object
Returns:
array

Definition at line 43 of file Abstract.php.

00044     {
00045         if (!$object->getBatchId()) {
00046             return array();
00047         }
00048 
00049         $ids = array();
00050         $select = $this->_getWriteAdapter()->select()
00051             ->from($this->getMainTable(), array($this->getIdFieldName()))
00052             ->where('batch_id=?', $object->getBatchId());
00053         $query = $this->_getWriteAdapter()->query($select);
00054         while ($row = $query->fetch()) {
00055             $ids[] = $row[$this->getIdFieldName()];
00056         }
00057         return $ids;
00058     }


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

Generated on Sat Jul 4 17:24:06 2009 for Magento by  doxygen 1.5.8