Mage_Dataflow_Model_Mysql4_Profile Class Reference

Inheritance diagram for Mage_Dataflow_Model_Mysql4_Profile:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract

List of all members.

Public Member Functions

 isProfileExists ($name, $id=null)

Protected Member Functions

 _construct ()
 _beforeSave (Mage_Core_Model_Abstract $object)


Detailed Description

Definition at line 34 of file Profile.php.


Member Function Documentation

_beforeSave ( Mage_Core_Model_Abstract object  )  [protected]

Perform actions before object save

Parameters:
Varien_Object $object

Reimplemented from Mage_Core_Model_Mysql4_Abstract.

Definition at line 41 of file Profile.php.

00042     {
00043         if (!$object->getCreatedAt()) {
00044             $object->setCreatedAt($this->formatDate(time()));
00045         }
00046         $object->setUpdatedAt($this->formatDate(time()));
00047         parent::_beforeSave($object);
00048     }

_construct (  )  [protected]

Resource initialization

Reimplemented from Mage_Core_Model_Resource_Abstract.

Definition at line 36 of file Profile.php.

00037     {
00038         $this->_init('dataflow/profile', 'profile_id');
00039     }

isProfileExists ( name,
id = null 
)

Definition at line 50 of file Profile.php.

00051     {
00052         $select = $this->_getReadAdapter()->select();
00053         $select
00054             ->from($this->getMainTable(), 'count(*)')
00055             ->where('name = ?', $name);
00056         if ($id)
00057             $select->where("{$this->getIdFieldName()} <> ?", $id);
00058 
00059         return $this->_getReadAdapter()->fetchOne($select);
00060     }


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