added location dao and repository
This commit is contained in:
@@ -1,15 +1,33 @@
|
||||
package com.a1.nextlocation.data;
|
||||
|
||||
import androidx.annotation.NonNull;
|
||||
import androidx.room.Entity;
|
||||
import androidx.room.PrimaryKey;
|
||||
|
||||
import org.jetbrains.annotations.NotNull;
|
||||
|
||||
@Entity(tableName = "location")
|
||||
public class Location {
|
||||
|
||||
@PrimaryKey
|
||||
@NonNull
|
||||
private String name;
|
||||
|
||||
private String coordinates;
|
||||
private String description;
|
||||
|
||||
public Location(@NotNull String name, String coordinates, String description) {
|
||||
this.name = name;
|
||||
this.coordinates = coordinates;
|
||||
this.description = description;
|
||||
}
|
||||
|
||||
@NotNull
|
||||
public String getName() {
|
||||
return name;
|
||||
}
|
||||
|
||||
public void setName(String name) {
|
||||
public void setName(@NotNull String name) {
|
||||
this.name = name;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user