blob: 291124a5d7ec5c52d9698ec5c8027c0517135ba6 (
plain)
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
|
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.User;
@Dao
public interface UserDao extends GenericDao<User> {
@Query("SELECT * FROM user WHERE accountId = :accountId")
LiveData<List<User>> getUsersForAccount(final long accountId);
@Query("SELECT * FROM user WHERE accountId = :accountId and id = :remoteId")
LiveData<User> getUsersByRemoteId(final long accountId, final long remoteId);
@Query("SELECT * FROM user WHERE accountId = :accountId and id = :remoteId")
User getUserByRemoteIdDirectly(final long accountId, final long remoteId);
@Query("SELECT * FROM user WHERE accountId = :accountId and uid = :uid")
User getUserByUidDirectly(final long accountId, final String uid);
@Query("SELECT * FROM user WHERE localId IN (:assignedUserIDs)")
List<User> getUsersById(List<Long> assignedUserIDs);
}
|