From fc908199f136acd2a5030e5085f024857cd2cfb5 Mon Sep 17 00:00:00 2001 From: Bryson Steck Date: Sat, 8 May 2021 14:58:18 -0600 Subject: changed api and package name --- .../wiimmfiwatcher/database/FriendCodeDao.java | 30 ++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java (limited to 'app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java') diff --git a/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java new file mode 100644 index 0000000..24e8762 --- /dev/null +++ b/app/src/main/java/me/brysonsteck/wiimmfiwatcher/database/FriendCodeDao.java @@ -0,0 +1,30 @@ +package me.brysonsteck.wiimmfiwatcher.database; + +import androidx.room.Dao; +import androidx.room.Delete; +import androidx.room.Insert; +import androidx.room.Query; +import androidx.room.Update; + +import java.util.List; + +import me.brysonsteck.wiimmfiwatcher.model.FriendCode; + +@Dao +public interface FriendCodeDao { + + @Query("SELECT * FROM friendcode") + public List getAll(); + +// @Query("SELECT * FROM friendcodeobj") +// public FriendCodeObj findByCode(String friendCode); + + @Insert + public void insert(FriendCode friendCode); + + @Update + public void update(FriendCode friendCode); + + @Delete + public void delete(FriendCode friendCode); +} -- cgit v1.2.3