/** * Retrieve vacancy list * @returns doctrine collection * @throws DaoException */ public function saveJobVacancy(JobVacancy $jobVacancy) { try { if ($jobVacancy->getId() == '') { $idGenService = new IDGeneratorService(); $idGenService->setEntity($jobVacancy); $jobVacancy->setId($idGenService->getNextID()); } $jobVacancy->save(); return true; } catch (Exception $e) { throw new DaoException($e->getMessage()); } }