1 |
gabriel |
1 |
package com.cesams.twogetskills.inconcert.dao;
|
|
|
2 |
|
|
|
3 |
import androidx.room.Dao;
|
|
|
4 |
import androidx.room.Insert;
|
|
|
5 |
import androidx.room.Query;
|
|
|
6 |
import androidx.room.Update;
|
|
|
7 |
|
|
|
8 |
import com.cesams.twogetskills.inconcert.entity.NotificationCenter;
|
|
|
9 |
import com.cesams.twogetskills.inconcert.room.ResultCount;
|
|
|
10 |
|
|
|
11 |
import java.util.List;
|
|
|
12 |
|
|
|
13 |
@Dao
|
|
|
14 |
public interface NotificationCenterDao {
|
|
|
15 |
|
|
|
16 |
@Query("SELECT COUNT(*) AS count FROM tb_notification")
|
|
|
17 |
ResultCount getCountNotification();
|
|
|
18 |
|
|
|
19 |
@Query("SELECT * FROM tb_notification")
|
|
|
20 |
List<NotificationCenter> selectAllNotification();
|
|
|
21 |
|
|
|
22 |
@Query("SELECT * FROM tb_notification WHERE id = :id LIMIT 1")
|
|
|
23 |
NotificationCenter selectNotificationByUuid(String id);
|
|
|
24 |
|
|
|
25 |
@Insert
|
|
|
26 |
void insert(NotificationCenter notificationCenter);
|
|
|
27 |
|
|
|
28 |
@Update
|
|
|
29 |
void update(NotificationCenter notificationCenter);
|
|
|
30 |
|
|
|
31 |
@Query("DELETE FROM tb_notification WHERE id = :id")
|
|
|
32 |
void removeNotificationByUuid(String id);
|
|
|
33 |
|
|
|
34 |
@Query("DELETE FROM tb_notification")
|
|
|
35 |
void removeAllnotifications();
|
|
|
36 |
|
|
|
37 |
}
|