Ejemplo n.º 1
0
 /**
  *
  * @param LeaveType $leaveType
  * @return boolean
  */
 public function saveLeaveType(LeaveType $leaveType)
 {
     try {
         if ($leaveType->getLeaveTypeId() == '') {
             $idGenService = new IDGeneratorService();
             $idGenService->setEntity($leaveType);
             $leaveType->setLeaveTypeId($idGenService->getNextID());
         }
         $leaveType->save();
         return true;
     } catch (Exception $e) {
         $this->getLogger()->error("Exception in saveLeaveType:" . $e);
         throw new DaoException($e->getMessage());
     }
 }