use correct import

This commit is contained in:
jacques 2022-03-07 22:08:21 +01:00
parent 615d2f1914
commit bed4186bc3
2 changed files with 32 additions and 28 deletions

View file

@ -1,10 +1,10 @@
package net.foucry.pilldroid;
import android.arch.persistence.root.Database;
import android.arch.persistence.root.RoomDatabase;
import androidx.room.Database;
import androidx.room.RoomDatabase;
import net.foucry.pilldroid.dao.MedicDAO;
import net.foucry.pilldroid.model.Medic;
import net.foucry.pilldroid.models.Medic;
@Database(entities = {Medic.class}, version = 1)

View file

@ -1,32 +1,36 @@
package net.foucry.pilldroid.dao;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Delete;
import android.arch.persistence.room.Insert;
import android.arch.persistence.room.Update;
import androidx.room.Dao;
import androidx.room.Delete;
import androidx.room.Insert;
import androidx.room.Query;
import androidx.room.Update;
import net.foucry.pilldroid.models.Medic;
import android.arch.persistence.room.Query;
import java.util.list;
import java.util.List;
@Dao
public interface MedicDAO {
@Insert
public void insert(Medic... medics);
@Upfdate
public void update(Medic... medics);
void insert(Medic... medics);
@Update
void update(Medic... medics);
@Delete
public void delete(Medic medic);
}
void delete(Medic medic);
@Query("SELECT * FROM medics")
public List<Medic> getMedics();
List<Medic> getMedics();
@Query("SELECT * FROM medics WHERE id = :id")
public Medic getMedicBy(Long id);
Medic getMedicBy(Long id);
@Query("SELECT * FROM medics WHERE cip13 = :cip13")
public Medic getMedicByCIP13(String cip13);
Medic getMedicByCIP13(String cip13);
@Query("SELECT count(*) FROM medics")
public int getMedicCount();
int getMedicCount();
}