Esempio n. 1
0
 /**
  * Compare $this attributes and $otherEntity attributes (except quantity), and return true if they are identical
  * 
  * @param type $otherEntity
  */
 public function equals(Stock $otherEntity)
 {
     if ($this->getBestBeforeDate() == $otherEntity->getBestBeforeDate() && $this->getExpiryDate() == $otherEntity->getExpiryDate() && $this->getLot() == $otherEntity->getLot() && $this->getObjectId() == $otherEntity->getObjectId() && $this->getObjectType() == $otherEntity->getObjectType() && $this->getPresentation() == $otherEntity->getPresentation() && $this->getProduct() == $otherEntity->getProduct() && $this->getSn() == $otherEntity->getSn()) {
         return true;
     } else {
         return false;
     }
 }