Package dev.karlkadak.backend.entity
Class WeatherData
java.lang.Object
dev.karlkadak.backend.entity.WeatherData
Class representing a single point of gathered weather data for a single city
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate Double
Air temperature at time of data calculation, Celsius
Null in case of missing valueprivate @NonNull City
The city for which the data is collectedprivate Integer
Humidity at time of data calculation, %
Null in case of missing valueprivate String
Weather state icon code at time of data calculationprivate long
Primary keyprivate long
UNIX timestamp of the data calculation, UTCprivate Double
Wind speed at time of data calculation, meter/sec
Null in case of missing value -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
private long idPrimary key -
city
The city for which the data is collected -
timestamp
private long timestampUNIX timestamp of the data calculation, UTC -
airTemperature
Air temperature at time of data calculation, Celsius
Null in case of missing value -
windSpeed
Wind speed at time of data calculation, meter/sec
Null in case of missing value -
humidity
Humidity at time of data calculation, %
Null in case of missing value -
iconCode
Weather state icon code at time of data calculation
-
-
Constructor Details
-
WeatherData
public WeatherData(@NonNull @NonNull City city, long timestamp, Double airTemperature, Double windSpeed, Integer humidity, String iconCode) Default constructor- Parameters:
city
- The city for which the data is collectedtimestamp
- UNIX timestamp of the data calculation, UTCairTemperature
- Air temperature at time of data calculation, Celsius
Null in case of missing valuewindSpeed
- Wind speed at time of data calculation, meter/sec
Null in case of missing valuehumidity
- Humidity at time of data calculation, %
Null in case of missing valueiconCode
- icon code of the weather condition
-