class FavoritePlaceWithLocationMapper extends AbstractConverter<FavoritePlace, PlaceByBoundsDto> {

    @Override
    public PlaceByBoundsDto convert(FavoritePlace entity) {
        PlaceByBoundsDto placeByBoundsDto = new PlaceByBoundsDto();
        placeByBoundsDto.setId(entity.getId());
        placeByBoundsDto.setName(entity.getName());
        LocationDto location = new LocationDto();
        location.setId(entity.getPlace().getLocation().getId());
        location.setLng(entity.getPlace().getLocation().getLng());
        location.setLat(entity.getPlace().getLocation().getLat());
        location.setAddress(entity.getPlace().getLocation().getAddress());
        placeByBoundsDto.setLocation(location);
        return placeByBoundsDto;
    }

}