Package NTNU.IDATT1002.models
Class GeoLocation
java.lang.Object
NTNU.IDATT1002.models.GeoLocation
@Entity
public class GeoLocation
extends java.lang.Object
Creates table Geolocation
-
Constructor Summary
Constructors Constructor Description GeoLocation()GeoLocation(java.lang.String latitude, java.lang.String longitude)Creates constructor for geolocation that takes in each parameter -
Method Summary
Modifier and Type Method Description java.lang.LonggetGeoLocationId()java.lang.StringgetLatitude()java.lang.StringgetLongitude()booleanhasLatLong()Verify that this geolocation has latitude and longitude different from 0.voidsetLatitude(java.lang.String altitude)voidsetLongitude(java.lang.String longitude)voidsetMetadata(Metadata metadata)java.lang.StringtoString()
-
Constructor Details
-
GeoLocation
public GeoLocation() -
GeoLocation
public GeoLocation(java.lang.String latitude, java.lang.String longitude)Creates constructor for geolocation that takes in each parameter- Parameters:
latitude-longitude-
-
-
Method Details
-
getGeoLocationId
public java.lang.Long getGeoLocationId() -
getLatitude
public java.lang.String getLatitude() -
getLongitude
public java.lang.String getLongitude() -
setLatitude
public void setLatitude(java.lang.String altitude) -
setLongitude
public void setLongitude(java.lang.String longitude) -
setMetadata
-
hasLatLong
public boolean hasLatLong()Verify that this geolocation has latitude and longitude different from 0.- Returns:
- whether latitude and longitude are different from 0.
-
toString
public java.lang.String toString()- Overrides:
toStringin classjava.lang.Object
-