diff options
Diffstat (limited to 'app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java')
-rw-r--r-- | app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java new file mode 100644 index 000000000..4d803354f --- /dev/null +++ b/app/src/main/java/it/niedermann/nextcloud/deck/persistence/sync/adapters/db/dao/StackDao.java @@ -0,0 +1,20 @@ +package it.niedermann.nextcloud.deck.persistence.sync.adapters.db.dao; + +import android.arch.lifecycle.LiveData; +import android.arch.persistence.room.Dao; +import android.arch.persistence.room.Query; + +import java.util.List; + +import it.niedermann.nextcloud.deck.model.Stack; + +@Dao +public interface StackDao extends GenericDao<Stack> { + + @Query("SELECT * FROM stack WHERE accountId = :accountId AND boardId = :localBoardId") + LiveData<List<Stack>> getStacksForBoard(final long accountId, final long localBoardId); + + @Query("SELECT * FROM stack WHERE accountId = :accountId and boardId = :localBoardId and id = :remoteId") + LiveData<Stack> getStackByRemoteId(final long accountId, final long localBoardId, final long remoteId); + +}
\ No newline at end of file |