Esempio n. 1
0
 private function mergeResidenceObjects(\UR\DB\NewBundle\Entity\Residence $dataMasterResidence, \UR\DB\NewBundle\Entity\Residence $toBeDeletedResidence)
 {
     $dataMasterResidence->setResidenceCountry($this->mergeCountryObject($dataMasterResidence->getResidenceCountry(), $toBeDeletedResidence->getResidenceCountry()));
     $dataMasterResidence->setResidenceTerritory($this->mergeTerritoryObject($dataMasterResidence->getResidenceTerritory(), $toBeDeletedResidence->getResidenceTerritory()));
     $dataMasterResidence->setResidenceLocation($this->mergeLocationObject($dataMasterResidence->getResidenceLocation(), $toBeDeletedResidence->getResidenceLocation()));
     return $dataMasterResidence;
 }
Esempio n. 2
0
 public function matchingResidence(\UR\DB\NewBundle\Entity\Residence $residenceOne, \UR\DB\NewBundle\Entity\Residence $residenceTwo, $allowLessInformation = false)
 {
     $this->LOGGER->debug("Comparing " . $residenceOne . " with " . $residenceTwo);
     if (!$this->compareCountries($residenceOne->getResidenceCountry(), $residenceTwo->getResidenceCountry(), $allowLessInformation)) {
         return false;
     }
     if (!$this->compareTerritories($residenceOne->getResidenceTerritory(), $residenceTwo->getResidenceTerritory(), $allowLessInformation)) {
         return false;
     }
     if (!$this->compareLocations($residenceOne->getResidenceLocation(), $residenceTwo->getResidenceLocation(), $allowLessInformation)) {
         return false;
     }
     return true;
 }