Class MeteoDTO

java.lang.Object
fr.utc.miage.sporttrack.dto.MeteoDTO

public class MeteoDTO extends Object
Data Transfer Object (DTO) representing weather (meteorological) data retrieved from an external weather API within the SportTrack application.

This DTO carries the weather information for a given location, including a validity flag and an informational message indicating whether the data was successfully fetched.

Author:
SportTrack Team
  • Constructor Details

    • MeteoDTO

      public MeteoDTO()
  • Method Details

    • getCity

      public String getCity()
      Returns the city name for the weather data.
      Returns:
      the city name
    • setCity

      public void setCity(String city)
      Sets the city name for the weather data.
      Parameters:
      city - the city name to assign
    • getCountry

      public String getCountry()
      Returns the country for the weather data.
      Returns:
      the country code or name
    • setCountry

      public void setCountry(String country)
      Sets the country for the weather data.
      Parameters:
      country - the country code or name to assign
    • getWeatherCode

      public Integer getWeatherCode()
      Returns the WMO weather code.
      Returns:
      the weather code, or null if unavailable
    • setWeatherCode

      public void setWeatherCode(Integer weatherCode)
      Sets the WMO weather code.
      Parameters:
      weatherCode - the weather code to assign
    • getPrecipitationSum

      public Double getPrecipitationSum()
      Returns the total precipitation sum.
      Returns:
      the precipitation in millimetres
    • setPrecipitationSum

      public void setPrecipitationSum(Double precipitationSum)
      Sets the total precipitation sum.
      Parameters:
      precipitationSum - the precipitation in millimetres to assign
    • isValid

      public boolean isValid()
      Returns whether the weather data is valid.
      Returns:
      true if the data was successfully retrieved, false otherwise
    • setValid

      public void setValid(boolean valid)
      Sets whether the weather data is valid.
      Parameters:
      valid - true if valid, false otherwise
    • getMessage

      public String getMessage()
      Returns the informational message about the weather data retrieval.
      Returns:
      the result message
    • setMessage

      public void setMessage(String message)
      Sets the informational message about the weather data retrieval.
      Parameters:
      message - the result message to assign