|
|
@ -49,24 +49,23 @@ public interface DaoIdentity {
|
|
|
|
" ORDER BY name COLLATE NOCASE")
|
|
|
|
" ORDER BY name COLLATE NOCASE")
|
|
|
|
List<EntityIdentity> getIdentities(long account);
|
|
|
|
List<EntityIdentity> getIdentities(long account);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT * FROM identity" +
|
|
|
|
|
|
|
|
" WHERE account = :account" +
|
|
|
|
|
|
|
|
" AND email = :email COLLATE NOCASE")
|
|
|
|
|
|
|
|
List<EntityIdentity> getIdentities(long account, String email);
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT identity.* FROM identity" +
|
|
|
|
@Query("SELECT identity.* FROM identity" +
|
|
|
|
" JOIN account ON account.id = identity.account" +
|
|
|
|
" JOIN account ON account.id = identity.account" +
|
|
|
|
" WHERE identity.account = :account" +
|
|
|
|
" WHERE identity.account = :account" +
|
|
|
|
" AND identity.synchronize AND account.synchronize")
|
|
|
|
" AND identity.synchronize AND account.synchronize")
|
|
|
|
List<EntityIdentity> getSynchronizingIdentities(long account);
|
|
|
|
List<EntityIdentity> getSynchronizingIdentities(long account);
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT * FROM identity WHERE id = :id")
|
|
|
|
|
|
|
|
EntityIdentity getIdentity(long id);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT * FROM identity" +
|
|
|
|
|
|
|
|
" WHERE account = :account AND email = :email COLLATE NOCASE" +
|
|
|
|
|
|
|
|
" ORDER BY CASE WHEN synchronize THEN 0 ELSE 1 END" +
|
|
|
|
|
|
|
|
" LIMIT 1")
|
|
|
|
|
|
|
|
EntityIdentity getIdentity(long account, String email);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT COUNT(*) FROM identity WHERE synchronize")
|
|
|
|
@Query("SELECT COUNT(*) FROM identity WHERE synchronize")
|
|
|
|
int getSynchronizingIdentityCount();
|
|
|
|
int getSynchronizingIdentityCount();
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
@Query("SELECT * FROM identity WHERE id = :id")
|
|
|
|
|
|
|
|
EntityIdentity getIdentity(long id);
|
|
|
|
|
|
|
|
|
|
|
|
@Insert
|
|
|
|
@Insert
|
|
|
|
long insertIdentity(EntityIdentity identity);
|
|
|
|
long insertIdentity(EntityIdentity identity);
|
|
|
|
|
|
|
|
|
|
|
|