src/main/java/com/property/manager/data/service/PropertyService.java
public ResponseEntity<?> addProperty(ArrayList<PropertyDTO> propertyDTOs, ClientEntity clientEntity) {
        try {
            geoService.setPropertiesCoordinates(propertyDTOs);
        } catch (Exception ex) {
            LOGGER.error("addProperty", ex);
            return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
        }

        Collection<PropertyEntity> propertyEntities = propertyMapper.toEntities(propertyDTOs);
        propertyEntities.forEach(propertyEntity -> propertyEntity.setClientEntity(clientEntity));
        propertyEntities = propertyRepository.saveAll(propertyEntities);
        return new ResponseEntity<>(propertyMapper.toDTOs(propertyEntities), HttpStatus.OK);
    }
/**
     * Sets properties coordinates and saves in database
     *
     * @param propertyDTOs
     * @return ResponseEntity object, with status code and object
     */
Sets properties coordinates and saves in database
@param propertyDTOs
@return ResponseEntity object, with status code and object
Sets properties coordinates and saves in database @param propertyDTOs @return ResponseEntity object with status code and object
public ResponseEntity<?> addProperty(ArrayList<PropertyDTO> propertyDTOs, ClientEntity clientEntity) {
        try {
            geoService.setPropertiesCoordinates(propertyDTOs);
        } catch (Exception ex) {
            LOGGER.error("addProperty", ex);
            return new ResponseEntity<>(HttpStatus.INTERNAL_SERVER_ERROR);
        }
        Collection<PropertyEntity> propertyEntities = propertyMapper.toEntities(propertyDTOs);
        propertyEntities.forEach(propertyEntity -> propertyEntity.setClientEntity(clientEntity));
        propertyEntities = propertyRepository.saveAll(propertyEntities);
        return new ResponseEntity<>(propertyMapper.toDTOs(propertyEntities), HttpStatus.OK);
    }
public ResponseEntity < ? > addProperty ( ArrayList < PropertyDTO > propertyDTOs , ClientEntity clientEntity ) { try { geoService . setPropertiesCoordinates ( propertyDTOs ) ; } catch ( Exception ex ) { LOGGER . error ( "addProperty" , ex ) ; return new ResponseEntity < > ( HttpStatus . INTERNAL_SERVER_ERROR ) ; } Collection < PropertyEntity > propertyEntities = propertyMapper . toEntities ( propertyDTOs ) ; propertyEntities . forEach ( propertyEntity -> propertyEntity . setClientEntity ( clientEntity ) ) ; propertyEntities = propertyRepository . saveAll ( propertyEntities ) ; return new ResponseEntity < > ( propertyMapper . toDTOs ( propertyEntities ) , HttpStatus . OK ) ; }
Sets properties coordinates and saves in database
 @param propertyDTOs
 @return ResponseEntity object, with status code and object
Sets properties coordinates and saves in database @param propertyDTOs @return ResponseEntity object with status code and object