Proyectos de Subversion Android Microlearning - Nuevo Interface

Rev

Rev 1 | Rev 24 | Ir a la última revisión | Mostrar el archivo completo | | | Autoría | Ultima modificación | Ver Log |

Rev 1 Rev 19
Línea 11... Línea 11...
11
import com.cesams.twogetskills.room.ResultTotalInt;
11
import com.cesams.twogetskills.room.ResultTotalInt;
Línea 12... Línea 12...
12
 
12
 
13
@Dao
13
@Dao
Línea -... Línea 14...
-
 
14
public interface ProgressDao {
-
 
15
 
Línea -... Línea 16...
-
 
16
    @Query("SELECT COUNT(*) AS count FROM tb_progress where topic_uuid = :topicUuid AND type = 's' AND completed = 1 AND user_uuid = :userUuid")
-
 
17
    ResultCount getCountSlidesCompletedByTopicUuidAndUserUuid(String topicUuid, String userUuid);
Línea 14... Línea 18...
14
public interface ProgressDao {
18
 
15
 
19
    @Query("SELECT COUNT(*) AS count FROM tb_progress where topic_uuid = :topicUuid AND type = 'c' AND completed = 1 AND user_uuid = :userUuid")
Línea 16... Línea 20...
16
 
20
    ResultCount getCountCapsulesCompletedByTopicUuidAndUserUuid(String topicUuid, String userUuid);
17
 
21
 
Línea 18... Línea 22...
18
    @Query("SELECT COUNT(*) AS count FROM tb_progress where topic_uuid = :topicUuid AND type = 's' AND completed = 1")
22
    @Query("SELECT  COUNT(*) AS count FROM tb_progress where topic_uuid = :topicUuid AND type = 'c' AND completed = 1 AND user_uuid = :userUuid AND returning_after_completed = 0")
19
    ResultCount getCountSlidesCompletedByTopicUuid(String topicUuid);
23
    ResultCount getCountCapsulesCompletedWithoutReturningByTopicUuidAndUserUuid(String topicUuid, String userUuid);
Línea 20... Línea 24...
20
 
24
 
21
    @Query("SELECT COUNT(*) AS count FROM tb_progress where topic_uuid = :topicUuid AND type = 'c' AND completed = 1")
25
    @Query("SELECT SUM(returning_after_completed) AS total  FROM tb_progress where topic_uuid = :topicUuid AND user_uuid = :userUuid AND type = 'c' AND completed = 1 AND returning_after_completed > 0")
Línea 22... Línea 26...
22
    ResultCount getCountCapsulesCompletedByTopicUuid(String topicUuid);
26
    ResultTotalInt getCountCapsulesCompletedWithReturningByTopicUuidAndUserUuid(String topicUuid, String userUuid);
Línea 55... Línea 59...
55
    void update(Progress progress);
59
    void update(Progress progress);
Línea 56... Línea 60...
56
 
60
 
57
    @Query("DELETE FROM tb_progress WHERE id = :id")
61
    @Query("DELETE FROM tb_progress WHERE id = :id")
Línea 58... Línea 62...
58
    void remove(int id);
62
    void remove(int id);
59
 
63
 
Línea 60... Línea 64...
60
    @Query("DELETE FROM tb_progress WHERE user_uuid = :userUuid")
64
    @Query("DELETE FROM tb_progress WHERE user_uuid != :userUuid")
61
    void removeAllUserUuidNotEqual(String userUuid);
65
    void removeAllUserUuidNotEqual(String userUuid);