/**
  * @param Job $job
  *
  * @return Model;
  */
 public function entityToModel(Job $job)
 {
     $model = new Model();
     $model->setId($job->getId())->setCode($job->getCode())->setTitle($job->getTitle())->setActive($job->isActive());
     if ($this->isModeFull()) {
         $model->setStartTime($job->getStartTime())->setEndTime($job->getEndTime())->setDuration($job->getDuration());
     }
     return $model;
 }
 /**
  * {@inheritDoc}
  */
 public function getId()
 {
     if ($this->__isInitialized__ === false) {
         return (int) parent::getId();
     }
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());
     return parent::getId();
 }
 /**
  * Creates a form to delete a Job entity.
  *
  * @param Job $job The Job entity
  *
  * @return \Symfony\Component\Form\Form The form
  */
 private function createDeleteForm(Job $job)
 {
     return $this->createFormBuilder()->setAction($this->generateUrl('job_delete', array('id' => $job->getId())))->setMethod('DELETE')->getForm();
 }