public function save()
 {
     $setting = new Gpf_Db_Setting();
     try {
         $setting->getSetting($this->getName(), $this->getAccountId());
         $this->setPrimaryKeyValue($setting->getPrimaryKeyValue());
         $this->update();
     } catch (Gpf_DbEngine_NoRowException $e) {
         $this->insert();
     } catch (Gpf_Settings_UnknownSettingException $e) {
         $this->insert();
     }
 }
 public static function getSetting($name, $accountId = null)
 {
     $setting = new Gpf_Db_Setting();
     return $setting->getSetting($name, $accountId);
 }