示例#1
0
 /**
  *
  * @param JobCandidateVacancy $candidateVacancy
  * @param <type> $action
  * @return <type>
  */
 public function updateCandidateVacancy(JobCandidateVacancy $candidateVacancy, $action, $userObj)
 {
     $candidateVacancy->setStatus($this->getNextStateForCandidateVacancy($candidateVacancy->getStatus(), $action, $userObj));
     return $this->candidateDao->updateCandidateVacancy($candidateVacancy);
 }
示例#2
0
 /**
  *
  * @param JobCandidateVacancy $candidateVacancy
  * @return <type>
  */
 public function saveCandidateVacancy(JobCandidateVacancy $candidateVacancy)
 {
     try {
         if ($candidateVacancy->getId() == '') {
             $idGenService = new IDGeneratorService();
             $idGenService->setEntity($candidateVacancy);
             $candidateVacancy->setId($idGenService->getNextID());
         }
         $candidateVacancy->save();
         return true;
     } catch (Exception $e) {
         throw new DaoException($e->getMessage());
     }
 }