1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20 package org.exoplatform.social.core.jpa.storage.dao;
21
22 import org.exoplatform.commons.api.persistence.GenericDAO;
23 import org.exoplatform.commons.utils.ListAccess;
24 import org.exoplatform.social.core.jpa.search.ExtendProfileFilter;
25 import org.exoplatform.social.core.jpa.storage.entity.ConnectionEntity;
26 import org.exoplatform.social.core.jpa.storage.entity.IdentityEntity;
27
28 import java.util.List;
29 import java.util.Map;
30
31
32
33
34 public interface IdentityDAO extends GenericDAO<IdentityEntity, Long> {
35 IdentityEntity findByProviderAndRemoteId(String providerId, String remoteId);
36 long countIdentityByProvider(String providerId);
37
38 ListAccess<IdentityEntity> findIdentities(ExtendProfileFilter filter);
39
40 List<Long> getAllIds(int offset, int limit);
41
42 List<Long> getAllIdsByProvider(String providerId, int offset, int limit);
43 ListAccess<Map.Entry<IdentityEntity, ConnectionEntity>> findAllIdentitiesWithConnections(long identityId, String sortField, char firstChar);
44
45
46
47
48
49 void setAsDeleted(long identityId);
50
51
52
53
54
55 void hardDeleteIdentity(long identityId);
56
57
58
59
60
61
62
63
64
65
66
67 List<String> getAllIdsByProviderSorted(String providerId, String sortField, char firstChar, long offset, long limit);
68 }