/**
  * Sets property product based on object or identifier
  *
  * @param integer|\Abra\Cadabra\Domain\Model\Product $product
  * @throws \Abra\Cadabra\Exception
  */
 protected function setProduct($product)
 {
     $obj = new self::$productModel();
     if (!$product instanceof $obj && !is_integer($product)) {
         throw new \Abra\Cadabra\Exception('Property "product" must be an instance of ' . self::$productModel . ' or an integer.', 1455030395);
     } elseif (is_integer($product)) {
         $this->product = $this->productRepository->findByIdentifier($product);
         if (!$this->product instanceof $obj) {
             throw new \Abra\Cadabra\Exception('Product could not be fetched from database.', 1455102729);
         }
     } else {
         $this->product = $product;
     }
 }