From 3227e43fc4bc914f8bde1d06017ae16ced3fe278 Mon Sep 17 00:00:00 2001 From: Alex Ning Date: Sun, 29 Sep 2019 09:49:30 +0800 Subject: Change project structures. --- .../SubscribedUserDatabase/SubscribedUserDao.java | 27 ---------------------- 1 file changed, 27 deletions(-) delete mode 100644 app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java (limited to 'app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java') diff --git a/app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java b/app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java deleted file mode 100644 index 513a1ea4..00000000 --- a/app/src/main/java/SubscribedUserDatabase/SubscribedUserDao.java +++ /dev/null @@ -1,27 +0,0 @@ -package SubscribedUserDatabase; - -import androidx.lifecycle.LiveData; -import androidx.room.Dao; -import androidx.room.Insert; -import androidx.room.OnConflictStrategy; -import androidx.room.Query; - -import java.util.List; - -@Dao -public interface SubscribedUserDao { - @Insert(onConflict = OnConflictStrategy.REPLACE) - void insert(SubscribedUserData subscribedUserData); - - @Query("DELETE FROM subscribed_users") - void deleteAllSubscribedUsers(); - - @Query("SELECT * FROM subscribed_users WHERE username = :accountName ORDER BY name COLLATE NOCASE ASC") - LiveData> getAllSubscribedUsers(String accountName); - - @Query("SELECT * FROM subscribed_users WHERE name = :name AND username = :accountName COLLATE NOCASE LIMIT 1") - SubscribedUserData getSubscribedUser(String name, String accountName); - - @Query("DELETE FROM subscribed_users WHERE name = :name AND username = :accountName") - void deleteSubscribedUser(String name, String accountName); -} -- cgit v1.2.3