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. --- .../SubscribedSubredditDao.java | 27 ---------------------- 1 file changed, 27 deletions(-) delete mode 100644 app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java (limited to 'app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java') diff --git a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java b/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java deleted file mode 100644 index 6ddaf835..00000000 --- a/app/src/main/java/SubscribedSubredditDatabase/SubscribedSubredditDao.java +++ /dev/null @@ -1,27 +0,0 @@ -package SubscribedSubredditDatabase; - -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 SubscribedSubredditDao { - @Insert(onConflict = OnConflictStrategy.REPLACE) - void insert(SubscribedSubredditData subscribedSubredditData); - - @Query("DELETE FROM subscribed_subreddits") - void deleteAllSubscribedSubreddits(); - - @Query("SELECT * from subscribed_subreddits WHERE username = :accountName ORDER BY name COLLATE NOCASE ASC") - LiveData> getAllSubscribedSubreddits(String accountName); - - @Query("SELECT * from subscribed_subreddits WHERE name = :subredditName AND username = :accountName COLLATE NOCASE LIMIT 1") - SubscribedSubredditData getSubscribedSubreddit(String subredditName, String accountName); - - @Query("DELETE FROM subscribed_subreddits WHERE name = :subredditName AND username = :accountName") - void deleteSubscribedSubreddit(String subredditName, String accountName); -} -- cgit v1.2.3