Mage_GoogleBase_Model_Mysql4_Type Class Reference

Inheritance diagram for Mage_GoogleBase_Model_Mysql4_Type:

Mage_Core_Model_Mysql4_Abstract Mage_Core_Model_Resource_Abstract

List of all members.

Public Member Functions

 getTypeIdByAttributeSetId ($attributeSetId, $targetCountry)

Protected Member Functions

 _construct ()


Detailed Description

Definition at line 34 of file Type.php.


Member Function Documentation

_construct (  )  [protected]

Resource initialization

Reimplemented from Mage_Core_Model_Resource_Abstract.

Definition at line 36 of file Type.php.

00037     {
00038         $this->_init('googlebase/types', 'type_id');
00039     }

getTypeIdByAttributeSetId ( attributeSetId,
targetCountry 
)

Return Type ID by Attribute Set Id and target country

Parameters:
int $attributeSetId Attribute Set
string $targetCountry Two-letters country ISO code
Returns:
int

Definition at line 48 of file Type.php.

00049     {
00050         $select = $this->_getReadAdapter()->select()
00051             ->from($this->getMainTable(), 'type_id')
00052             ->where('attribute_set_id=?', $attributeSetId)
00053             ->where('target_country=?', $targetCountry);
00054 
00055         return $this->_getReadAdapter()->fetchOne($select);
00056     }


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

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