private function mergeEducationObjects(\UR\DB\NewBundle\Entity\Education $dataMasterEducation, \UR\DB\NewBundle\Entity\Education $toBeDeletedEducation)
 {
     $dataMasterEducation->setLabel($this->mergeStrings($dataMasterEducation->getLabel(), $toBeDeletedEducation->getLabel()));
     $dataMasterEducation->setCountry($this->mergeCountryObject($dataMasterEducation->getCountry(), $toBeDeletedEducation->getCountry()));
     $dataMasterEducation->setTerritory($this->mergeTerritoryObject($dataMasterEducation->getTerritory(), $toBeDeletedEducation->getTerritory()));
     $dataMasterEducation->setLocation($this->mergeLocationObject($dataMasterEducation->getLocation(), $toBeDeletedEducation->getLocation()));
     $dataMasterEducation->setFromDate($this->mergeDateReference($dataMasterEducation->getFromDate(), $toBeDeletedEducation->getFromDate()));
     $dataMasterEducation->setToDate($this->mergeDateReference($dataMasterEducation->getToDate(), $toBeDeletedEducation->getToDate()));
     $dataMasterEducation->setProvenDate($this->mergeDateReference($dataMasterEducation->getProvenDate(), $toBeDeletedEducation->getProvenDate()));
     $dataMasterEducation->setComment($this->mergeStrings($dataMasterEducation->getComment(), $toBeDeletedEducation->getComment()));
     $dataMasterEducation->setGraduationLabel($this->mergeStrings($dataMasterEducation->getGraduationLabel(), $toBeDeletedEducation->getGraduationLabel()));
     $dataMasterEducation->setGraduationDate($this->mergeDateReference($dataMasterEducation->getGraduationDate(), $toBeDeletedEducation->getGraduationDate()));
     $dataMasterEducation->setGraduationLocation($this->mergeLocationObject($dataMasterEducation->getGraduationLocation(), $toBeDeletedEducation->getGraduationLocation()));
     $toBeDeletedEducation->setFromDate(null);
     $toBeDeletedEducation->setProvenDate(null);
     $toBeDeletedEducation->setToDate(null);
     $toBeDeletedEducation->setGraduationDate(null);
     return $dataMasterEducation;
 }
 public function matchingEducation(\UR\DB\NewBundle\Entity\Education $educationOne, \UR\DB\NewBundle\Entity\Education $educationTwo, $allowLessInformation = false)
 {
     $this->LOGGER->debug("Comparing " . $educationOne . " with " . $educationTwo);
     if (!$this->compareStrings($educationOne->getLabel(), $educationTwo->getLabel(), $allowLessInformation)) {
         return false;
     }
     if (!$this->compareCountries($educationOne->getCountry(), $educationTwo->getCountry(), $allowLessInformation)) {
         return false;
     }
     if (!$this->compareTerritories($educationOne->getTerritory(), $educationTwo->getTerritory(), $allowLessInformation)) {
         return false;
     }
     if (!$this->compareLocations($educationOne->getLocation(), $educationTwo->getLocation(), $allowLessInformation)) {
         return false;
     }
     if ($this->unmatchedArrays($educationOne->getFromDate(), $educationTwo->getFromDate(), "date", $allowLessInformation)) {
         return false;
     }
     if ($this->unmatchedArrays($educationOne->getToDate(), $educationTwo->getToDate(), "date", $allowLessInformation)) {
         return false;
     }
     if ($this->unmatchedArrays($educationOne->getProvenDate(), $educationTwo->getProvenDate(), "date", $allowLessInformation)) {
         return false;
     }
     if (!$this->compareStrings($educationOne->getGraduationLabel(), $educationTwo->getGraduationLabel(), $allowLessInformation)) {
         return false;
     }
     if (!$this->compareLocations($educationOne->getGraduationLocation(), $educationTwo->getGraduationLocation(), $allowLessInformation)) {
         return false;
     }
     if ($this->unmatchedArrays($educationOne->getGraduationDate(), $educationTwo->getGraduationDate(), "date")) {
         if (!$allowLessInformation || $this->checkIfOneValueContainsMoreInformation($educationOne->getGraduationDate(), $educationTwo->getGraduationDate())) {
             return false;
         }
     }
     return true;
 }