/**
  * {@inheritDoc}
  */
 public function getId()
 {
     if ($this->__isInitialized__ === false) {
         return (int) parent::getId();
     }
     $this->__initializer__ && $this->__initializer__->__invoke($this, 'getId', array());
     return parent::getId();
 }
 /**
  * Prepare the mobile device for persist.
  * 
  * @param \Vlreleases\UserBundle\Entity\MobileDevice $mobileDevice
  * 
  * @return boolean
  */
 public function register($mobileDevice)
 {
     if (!$mobileDevice->getId()) {
         $mobileDevice->setCreatedDate(new \DateTime());
     }
     $mobileDevice->setLastModifiedDate(new \DateTime());
     $mobileDevice->setAvailable(1);
     $mobileDevice->setCreatedBy($this->getCurrentUser());
     $this->save($mobileDevice);
 }