-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathStepsDao.java
More file actions
31 lines (22 loc) · 864 Bytes
/
StepsDao.java
File metadata and controls
31 lines (22 loc) · 864 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
package com.lodoss.data.local.dao;
import android.arch.persistence.room.Dao;
import android.arch.persistence.room.Query;
import android.arch.persistence.room.Transaction;
import com.lodoss.data.entity.step.PeopleStep;
import com.lodoss.data.entity.step.StepEntity;
import java.util.List;
import io.reactivex.Single;
@Dao
public interface StepsDao extends BaseDao<StepEntity> {
@Query("SELECT * FROM steps WHERE " +
"is_new_item = 1")
Single<List<StepEntity>> getNewSteps();
@Query("SELECT * FROM steps WHERE " +
"is_new_item = 0 AND sync_count > 0")
Single<List<StepEntity>> getModifiedSteps();
@Transaction
@Query("SELECT * FROM steps WHERE " +
"round_id = :roundId AND " +
"step_number = :stepNumber")
Single<PeopleStep> getPeopleStepByRound(String roundId, int stepNumber);
}