Loading src/main/java/org/etsi/osl/tmf/gam673/mapper/MapperUtils.java +0 −20 Original line number Diff line number Diff line Loading @@ -30,30 +30,10 @@ public class MapperUtils { for(GeographicSubAddress n : newGeographicAddress.getGeographicSubAddresses()){ if(n.getUuid()==null){ existingGeographicAddress.addGeographicSubAddress(n); }else { for (GeographicSubAddress oldGeographicSubAddress : existingGeographicAddress.geographicSubAddresses()){ if (n.getUuid().equals(oldGeographicSubAddress.getUuid())){ GeographicSubAddress geographicSubAddress = geographicSubAddressMap(n, oldGeographicSubAddress); } } } } } return existingGeographicAddress; } public static GeographicSubAddress geographicSubAddressMap(GeographicSubAddress newGeographicSubAddress, GeographicSubAddress existingGeographicSubAddress){ if(newGeographicSubAddress.getSubAddressType()!=null) existingGeographicSubAddress.setSubAddressType(newGeographicSubAddress.getSubAddressType()); if(newGeographicSubAddress.getName()!=null) existingGeographicSubAddress.setName(newGeographicSubAddress.getName()); if(newGeographicSubAddress.getBuildingName()!=null) existingGeographicSubAddress.setBuildingName(newGeographicSubAddress.getBuildingName()); if(newGeographicSubAddress.getLevelNumber()!=null) existingGeographicSubAddress.setLevelNumber(newGeographicSubAddress.getLevelNumber()); if(newGeographicSubAddress.getLevelType()!=null) existingGeographicSubAddress.setLevelType(newGeographicSubAddress.getLevelType()); if(newGeographicSubAddress.getPrivateStreetName()!=null) existingGeographicSubAddress.setPrivateStreetName(newGeographicSubAddress.getPrivateStreetName()); if(newGeographicSubAddress.getPrivateStreetNumber()!=null) existingGeographicSubAddress.setPrivateStreetNumber(newGeographicSubAddress.getPrivateStreetNumber()); if(newGeographicSubAddress.getSubUnitNumber()!=null) existingGeographicSubAddress.setSubUnitNumber(newGeographicSubAddress.getSubUnitNumber()); if(newGeographicSubAddress.getSubUnitType()!=null) existingGeographicSubAddress.setSubUnitType(newGeographicSubAddress.getSubUnitType()); return existingGeographicSubAddress; } } Loading
src/main/java/org/etsi/osl/tmf/gam673/mapper/MapperUtils.java +0 −20 Original line number Diff line number Diff line Loading @@ -30,30 +30,10 @@ public class MapperUtils { for(GeographicSubAddress n : newGeographicAddress.getGeographicSubAddresses()){ if(n.getUuid()==null){ existingGeographicAddress.addGeographicSubAddress(n); }else { for (GeographicSubAddress oldGeographicSubAddress : existingGeographicAddress.geographicSubAddresses()){ if (n.getUuid().equals(oldGeographicSubAddress.getUuid())){ GeographicSubAddress geographicSubAddress = geographicSubAddressMap(n, oldGeographicSubAddress); } } } } } return existingGeographicAddress; } public static GeographicSubAddress geographicSubAddressMap(GeographicSubAddress newGeographicSubAddress, GeographicSubAddress existingGeographicSubAddress){ if(newGeographicSubAddress.getSubAddressType()!=null) existingGeographicSubAddress.setSubAddressType(newGeographicSubAddress.getSubAddressType()); if(newGeographicSubAddress.getName()!=null) existingGeographicSubAddress.setName(newGeographicSubAddress.getName()); if(newGeographicSubAddress.getBuildingName()!=null) existingGeographicSubAddress.setBuildingName(newGeographicSubAddress.getBuildingName()); if(newGeographicSubAddress.getLevelNumber()!=null) existingGeographicSubAddress.setLevelNumber(newGeographicSubAddress.getLevelNumber()); if(newGeographicSubAddress.getLevelType()!=null) existingGeographicSubAddress.setLevelType(newGeographicSubAddress.getLevelType()); if(newGeographicSubAddress.getPrivateStreetName()!=null) existingGeographicSubAddress.setPrivateStreetName(newGeographicSubAddress.getPrivateStreetName()); if(newGeographicSubAddress.getPrivateStreetNumber()!=null) existingGeographicSubAddress.setPrivateStreetNumber(newGeographicSubAddress.getPrivateStreetNumber()); if(newGeographicSubAddress.getSubUnitNumber()!=null) existingGeographicSubAddress.setSubUnitNumber(newGeographicSubAddress.getSubUnitNumber()); if(newGeographicSubAddress.getSubUnitType()!=null) existingGeographicSubAddress.setSubUnitType(newGeographicSubAddress.getSubUnitType()); return existingGeographicSubAddress; } }