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 CoordinatePairSpecifies the geographical location of the cityprivate StringCountry code of the location, used for flag image generationprivate longPrimary keyprivate booleanSpecifies if weather data collection for the city is enabledprivate @NonNull StringThe 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, setsimportingDatafield toTRUE- Parameters:
name- The human-readable name of the citylatitude- Geographical latitude of the citylongitude- Geographical longitude of the city
-