/**
  * Create
  *
  * @param array   $data
  * @return unknown
  */
 protected function air_create($data)
 {
     if (!isset($data['org_uuid'])) {
         throw new Rframe_Exception(Rframe::BAD_DATA, "org_uuid required");
     }
     $org = AIR2_Record::find('Organization', $data['org_uuid']);
     if (!$org) {
         $u = $data['org_uuid'];
         throw new Rframe_Exception(Rframe::BAD_DATA, "Invalid org_uuid '{$u}'");
     }
     if (!$this->parent_rec->user_may_write($this->user)) {
         throw new Rframe_Exception(Rframe::BAD_DATA, "You do not appear to have access to modify this Inquiry (Invalid Inquiry authz)");
     }
     $iorg = new InqOrg();
     $iorg->iorg_inq_id = $this->parent_rec->inq_id;
     $iorg->Organization = $org;
     $iorg->mapValue('org_uuid', $iorg->Organization->org_uuid);
     // log activity
     $activity = new InquiryActivity();
     $activity->ia_inq_id = $this->parent_rec->inq_id;
     $activity->ia_actm_id = 49;
     $activity->ia_dtim = air2_date();
     $activity->ia_desc = sprintf('org %s added by {USER}', $org->org_name);
     $this->parent_rec->InquiryActivity[] = $activity;
     return $iorg;
 }