11
11
*
12
12
* Copyright (C) OpenMRS, LLC. All Rights Reserved.
13
13
*/
14
+ package com.openmrs.android_sdk.library.dao
14
15
15
- package com .openmrs .android_sdk .library .dao ;
16
-
17
- import java .util .List ;
18
-
19
- import androidx .room .Dao ;
20
- import androidx .room .Insert ;
21
- import androidx .room .Query ;
22
-
23
- import com .openmrs .android_sdk .library .databases .entities .FormResourceEntity ;
16
+ import androidx.room.Dao
17
+ import androidx.room.Insert
18
+ import androidx.room.Query
19
+ import com.openmrs.android_sdk.library.databases.entities.FormResourceEntity
24
20
25
21
/* *
26
22
* The interface Form resource dao.
27
23
*/
28
24
@Dao
29
- public interface FormResourceDAO {
25
+ interface FormResourceDAO {
26
+
30
27
/* *
31
28
* Gets form resource by name.
32
29
*
33
30
* @param name the name
34
31
* @return the form resource by name
35
32
*/
36
33
@Query(" SELECT * FROM forms WHERE name = :name" )
37
- FormResourceEntity getFormResourceByName (String name );
34
+ fun getFormResourceByName (name : String ): FormResourceEntity
38
35
39
36
/* *
40
37
* Gets form resource list.
41
38
*
42
39
* @return the form resource list
43
40
*/
44
41
@Query(" SELECT * FROM forms" )
45
- List < FormResourceEntity > getFormResourceList ();
42
+ fun getFormResourceList (): List < FormResourceEntity >
46
43
47
44
/* *
48
45
* Gets form by uuid.
@@ -51,19 +48,19 @@ public interface FormResourceDAO {
51
48
* @return the form by uuid
52
49
*/
53
50
@Query(" SELECT * FROM forms WHERE uuid = :uuid" )
54
- FormResourceEntity getFormByUuid (String uuid );
51
+ fun getFormByUuid (uuid : String ): FormResourceEntity
55
52
56
53
/* *
57
54
* Delete all forms.
58
55
*/
59
56
@Query(" DELETE FROM forms" )
60
- void deleteAllForms ();
57
+ fun deleteAllForms ()
61
58
62
59
/* *
63
60
* Add form resource.
64
61
*
65
62
* @param formResourceEntity the form resource entity
66
63
*/
67
64
@Insert
68
- void addFormResource (FormResourceEntity formResourceEntity );
69
- }
65
+ fun addFormResource (formResourceEntity : FormResourceEntity )
66
+ }
0 commit comments