/**
  * @return Model_DB_Speciality_Object
  */
 public function getSpeciality()
 {
     if (is_null($this->_speciality)) {
         $this->_speciality = Model_DB_Speciality_Mapper::get_instance()->find($this->getIdSpecialityFk());
     }
     return $this->_speciality;
 }
 public function __construct($filter = null)
 {
     if (null === $filter) {
         $filter = new Model_Speciality_Filter();
     }
     $this->setFilter($filter);
     $this->setMapper(Model_DB_Speciality_Mapper::get_instance());
 }
 public function dialogAction()
 {
     try {
         $specialityId = $this->getRequestIdSpeciality();
         if ($specialityId == 0) {
             $speciality = new Model_DB_Speciality_Object();
         } else {
             $speciality = Model_DB_Speciality_Mapper::get_instance()->find($specialityId);
         }
         $this->view->assign("speciality", $speciality);
     } catch (Exception $e) {
         echo $e->getMessage();
     }
 }
 public function save()
 {
     Model_DB_Speciality_Mapper::get_instance()->save($this);
 }