Mage_Dataflow_Model_Mysql4_Import Class Reference

Inheritance diagram for Mage_Dataflow_Model_Mysql4_Import:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract

List of all members.

Public Member Functions

 select ($sessionId)
 loadBySessionId ($sessionId, $min=0, $max=100)
 loadTotalBySessionId ($sessionId)
 loadById ($importId)

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 35 of file Import.php.


Member Function Documentation

_construct (  )  [protected]

Resource initialization

Reimplemented from Mage_Core_Model_Resource_Abstract.

Definition at line 38 of file Import.php.

00039     {
00040         $this->_init('dataflow/import', 'import_id');
00041     }

loadById ( importId  ) 

Definition at line 74 of file Import.php.

00075     {
00076         $read = $this->_getReadAdapter();
00077         $select = $read->select()->from($this->getTable('dataflow/import'),'*')
00078             ->where('status=?', 0)
00079             ->where('import_id=?', $importId);
00080         return $read->fetchRow($select);
00081     }

loadBySessionId ( sessionId,
min = 0,
max = 100 
)

Definition at line 51 of file Import.php.

00052     {
00053         if (!is_numeric($min) || !is_numeric($max)) {
00054             return array();
00055         }
00056         $read = $this->_getReadAdapter();
00057         $select = $read->select()->from($this->getTable('dataflow/import'), '*')
00058             ->where('import_id between '.(int)$min.' and '.(int)$max)
00059             ->where('status=?', '0')
00060             ->where('session_id=?', $sessionId);
00061         return $read->fetchAll($select);
00062     }

loadTotalBySessionId ( sessionId  ) 

Definition at line 64 of file Import.php.

00065     {
00066         $read = $this->_getReadAdapter();
00067         $select = $read->select()->from($this->getTable('dataflow/import'),
00068         array('max'=>'max(import_id)','min'=>'min(import_id)', 'cnt'=>'count(*)'))
00069             ->where('status=?', '0')
00070             ->where('session_id=?', $sessionId);
00071         return $read->fetchRow($select);
00072     }

select ( sessionId  ) 

Definition at line 43 of file Import.php.

00044     {
00045         return $this->_getReadAdapter()->select()
00046             ->from($this->getMainTable())
00047             ->where('session_id=?', $sessionId)
00048             ->where('status=?', 0);
00049     }


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