Proyectos de Subversion Android Microlearning - Inconcert

Rev

| Ultima modificación | Ver Log |

Rev Autor Línea Nro. Línea
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
 
7
import com.cesams.twogetskills.inconcert.entity.Sync;
8
 
9
import java.util.List;
10
 
11
@Dao
12
public interface SyncDao {
13
 
14
    @Query("SELECT * FROM tb_sync LIMIT 20")
15
    List<Sync> selectBatch();
16
 
17
    @Query("SELECT * FROM tb_sync WHERE type = :type LIMIT 1")
18
    Sync selectOneByType(int type);
19
 
20
    @Insert
21
    void insert(Sync sync);
22
 
23
    @Query("DELETE FROM tb_sync WHERE id = :id")
24
    void remove(Long id);
25
 
26
}