Welcome to mirror list, hosted at ThFree Co, Russian Federation.

NoteDao.java « dao « persistence « notes « owncloud « niedermann « it « java « main « src « app - github.com/stefan-niedermann/nextcloud-notes.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
blob: 213fe9c738b5627dcf348c869aeb9ccc08e0e9ce (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
package it.niedermann.owncloud.notes.persistence.dao;

import androidx.room.Dao;
import androidx.room.Insert;
import androidx.room.Query;

import it.niedermann.owncloud.notes.persistence.entity.NoteEntity;
import it.niedermann.owncloud.notes.shared.model.DBStatus;

@Dao
public interface NoteDao {

    @Query("DELETE FROM noteentity WHERE id = :id and status= :forceDBStatus")
    void deleteByCardId(long id, DBStatus forceDBStatus);

    @Query("UPDATE noteentity SET scrollY = :scrollY WHERE id = :id")
    void updateScrollY(long id, int scrollY);

    @Insert
    long addNote(NoteEntity noteEntity);

    @Query("UPDATE noteentity SET status = :status WHERE id = :id")
    void updateStatus(long id, DBStatus status);
}