Class WeatherData
java.lang.Object
gr.unipi.weather_app.model.WeatherData
Represents weather data for a specific city, including temperature, humidity,
wind speed, UV index, weather description, and a timestamp.
This class is mapped to the "weather_data" table in the "public" schema using JPA annotations.
Lombok is used to reduce boilerplate code for getters, setters, and constructors.
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate String
The name of the city for which the weather data is recorded.private int
The humidity percentage.private int
The unique identifier for the weather data record.private int
The temperature in degrees Celsius.private LocalDateTime
The timestamp when the weather data was recorded.private int
The UV index, representing the intensity of ultraviolet radiation.private String
A brief textual description of the weather conditions.private int
The wind speed in kilometers per hour. -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
private int idThe unique identifier for the weather data record. It is auto-generated and cannot be modified after creation. -
city
The name of the city for which the weather data is recorded. It cannot be null and has a maximum length of 50 characters. -
temperature
private int temperatureThe temperature in degrees Celsius. It cannot be null. -
humidity
private int humidityThe humidity percentage. It cannot be null. -
windSpeed
private int windSpeedThe wind speed in kilometers per hour. It cannot be null. -
uvIndex
private int uvIndexThe UV index, representing the intensity of ultraviolet radiation. It cannot be null. -
weather_description
A brief textual description of the weather conditions. It cannot be null. -
timestamp
The timestamp when the weather data was recorded. It cannot be null.
-
-
Constructor Details
-
WeatherData
public WeatherData()
-
-
Method Details
-
toString
-