/**
  * Set value to attribute. If attribute doesn't exist, create new.
  *
  * @param $commissionTypeId
  * @param $name
  *
  * @return unknown_type
  */
 public function setCommissionTypeAttributeValue($commissionTypeId, $name, $value) {
     try {
         $commTypeAttr = $this->getCommissionTypeAttribute($commissionTypeId, $name);
     } catch (Gpf_DbEngine_NoRowException $e) {
         $commTypeAttr = new Pap_Db_CommissionTypeAttribute();
         $commTypeAttr->setCommissionTypeId($commissionTypeId);
         $commTypeAttr->setName($name);
         $commTypeAttr->insert();
     }
     $commTypeAttr->setValue($value);
     $commTypeAttr->update(array(self::VALUE));
 }