Package dev.karlkadak.backend.entity
Class City
java.lang.Object
dev.karlkadak.backend.entity.City
Class representing a single city for weather data collection
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate @NonNull CoordinatePair
Specifies the geographical location of the cityprivate String
Country code of the location, used for flag image generationprivate long
Primary keyprivate boolean
Specifies if weather data collection for the city is enabledprivate @NonNull String
The human-readable name of the city -
Constructor Summary
Constructors -
Method Summary
-
Field Details
-
id
private long idPrimary key -
name
The human-readable name of the city -
importingData
private boolean importingDataSpecifies if weather data collection for the city is enabled -
coordinatePair
Specifies the geographical location of the city -
countryCode
Country code of the location, used for flag image generation
-
-
Constructor Details
-
City
public City(@NonNull @NonNull String name, @NonNull @NonNull Double latitude, @NonNull @NonNull Double longitude, String countryCode) Default constructor using coordinate values, setsimportingData
field toTRUE
- Parameters:
name
- The human-readable name of the citylatitude
- Geographical latitude of the citylongitude
- Geographical longitude of the city
-