60 lines
1.3 KiB
Java
60 lines
1.3 KiB
Java
package at.fhj.airkoality.model;
|
|
|
|
import android.arch.persistence.room.ColumnInfo;
|
|
import android.arch.persistence.room.Entity;
|
|
import android.arch.persistence.room.PrimaryKey;
|
|
import android.support.annotation.NonNull;
|
|
|
|
@Entity(tableName = "location")
|
|
public class Location {
|
|
|
|
@PrimaryKey
|
|
@NonNull
|
|
@ColumnInfo(name= "location")
|
|
private String location;
|
|
@ColumnInfo(name= "city")
|
|
private String city;
|
|
@ColumnInfo(name= "country")
|
|
private String country;
|
|
|
|
|
|
public Location(String location, String city, String country) {
|
|
this.location = location;
|
|
this.city = city;
|
|
this.country = country;
|
|
}
|
|
|
|
public String getLocation() {
|
|
return location;
|
|
}
|
|
|
|
public void setLocation(String location) {
|
|
this.location = location;
|
|
}
|
|
|
|
public String getCity() {
|
|
return city;
|
|
}
|
|
|
|
public void setCity(String city) {
|
|
this.city = city;
|
|
}
|
|
|
|
public String getCountry() {
|
|
return country;
|
|
}
|
|
|
|
public void setCountry(String county) {
|
|
this.country = county;
|
|
}
|
|
|
|
@Override
|
|
public String toString() {
|
|
return "Location{" +
|
|
"location='" + location + '\'' +
|
|
", city='" + city + '\'' +
|
|
", county='" + country + '\'' +
|
|
'}';
|
|
}
|
|
}
|