Class IdentityDAOImpl
java.lang.Object
org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<IdentityEntity,Long>
org.exoplatform.social.core.jpa.storage.dao.jpa.IdentityDAOImpl
- All Implemented Interfaces:
org.exoplatform.commons.api.persistence.GenericDAO<IdentityEntity,,Long> IdentityDAO
public class IdentityDAOImpl
extends org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<IdentityEntity,Long>
implements IdentityDAO
-
Nested Class Summary
Nested ClassesModifier and TypeClassDescriptionclassstatic class -
Field Summary
Fields inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
modelClass -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionlongcountIdentityByProvider(String providerId) create(IdentityEntity entity) org.exoplatform.commons.utils.ListAccess<Map.Entry<IdentityEntity, ConnectionEntity>> findAllIdentitiesWithConnections(long identityId, String sortField, String sortDirection) findByProviderAndRemoteId(String providerId, String remoteId) findIdByProviderAndRemoteId(String providerId, String remoteId) org.exoplatform.commons.utils.ListAccess<IdentityEntity> findIdentities(ExtendProfileFilter filter) findIdentitiesByIDs(List<Long> ids) getAllIds(int offset, int limit) getAllIdsByProvider(String providerId, int offset, int limit) getAllIdsByProviderSorted(String providerId, String sortField, String sortDirection, boolean isEnabled, String userType, Boolean isConnected, String enrollmentStatus, List<String> remoteIds, List<String> groupIds, String membershipType, boolean includeInheritedMemberships, long offset, long limit) intgetAllIdsCountByProvider(String providerId, String userType, Boolean isConnected, boolean isEnabled, String enrollmentStatus, List<String> remoteIds, List<String> groupIds, String membershipType, boolean includeInheritedMemberships) getEnabledRemoteIdsAfter(String providerId, boolean internalsOnly, String afterRemoteId, int limit) <T> List<T> getFromOracleDB(jakarta.persistence.TypedQuery<T> query, List<Long> ids) in ORACLE, maximum number of expressions in a list is 1000.getIdentityIdsByProviderSorted(String providerId, String sortField, String sortDirection, boolean isEnabled, String userType, Boolean isConnected, String enrollmentStatus, List<String> remoteIds, List<String> groupIds, String membershipType, boolean includeInheritedMemberships, long offset, long limit) getIdsByProviderAfterId(String providerId, long lastId, int limit) voidhardDeleteIdentity(long identityId) delete definitely an identityvoidsetAsDeleted(long identityId) set the DELETED flag to trueMethods inherited from class org.exoplatform.commons.persistence.impl.GenericDAOJPAImpl
count, createAll, delete, deleteAll, deleteAll, find, findAll, getEntityManager, getHibernateDialect, isMSSQLDialect, isOrcaleDialect, update, updateAllMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods inherited from interface org.exoplatform.commons.api.persistence.GenericDAO
count, createAll, delete, deleteAll, deleteAll, find, findAll, update, updateAllMethods inherited from interface org.exoplatform.social.core.jpa.storage.dao.IdentityDAO
getAllIdsByProviderSorted, getAllIdsByProviderSorted, getAllIdsByProviderSorted, getAllIdsCountByProvider, getAllIdsCountByProvider, getAllIdsCountByProvider, getIdentityIdsByProviderSorted, getIdentityIdsByProviderSorted, getIdentityIdsByProviderSorted
-
Constructor Details
-
IdentityDAOImpl
public IdentityDAOImpl()
-
-
Method Details
-
create
- Specified by:
createin interfaceorg.exoplatform.commons.api.persistence.GenericDAO<IdentityEntity,Long> - Overrides:
createin classorg.exoplatform.commons.persistence.impl.GenericDAOJPAImpl<IdentityEntity,Long>
-
findByProviderAndRemoteId
- Specified by:
findByProviderAndRemoteIdin interfaceIdentityDAO
-
findIdByProviderAndRemoteId
- Specified by:
findIdByProviderAndRemoteIdin interfaceIdentityDAO
-
countIdentityByProvider
- Specified by:
countIdentityByProviderin interfaceIdentityDAO
-
getAllIds
- Specified by:
getAllIdsin interfaceIdentityDAO
-
getAllIdsByProvider
- Specified by:
getAllIdsByProviderin interfaceIdentityDAO
-
getEnabledRemoteIdsAfter
public List<String> getEnabledRemoteIdsAfter(String providerId, boolean internalsOnly, String afterRemoteId, int limit) - Specified by:
getEnabledRemoteIdsAfterin interfaceIdentityDAO- Parameters:
providerId- the identity providerinternalsOnly- whether the identities marked external are left outafterRemoteId- the remote id after which the list starts, excluded, or null to start from the first onelimit- the maximum number of remote ids returned, 0 for all- Returns:
- the remote ids of the enabled, non-deleted identities of a provider, in ascending remote id order — keyset iteration over the provider's unique remote ids
-
getIdsByProviderAfterId
- Specified by:
getIdsByProviderAfterIdin interfaceIdentityDAO- Returns:
- the non-deleted identity ids of a provider strictly greater than lastId, disabled ones included, in ascending id order — keyset iteration that never skips a row even when identities are soft-deleted while iterating
-
findAllIdentitiesWithConnections
public org.exoplatform.commons.utils.ListAccess<Map.Entry<IdentityEntity,ConnectionEntity>> findAllIdentitiesWithConnections(long identityId, String sortField, String sortDirection) - Specified by:
findAllIdentitiesWithConnectionsin interfaceIdentityDAO
-
findIdentities
public org.exoplatform.commons.utils.ListAccess<IdentityEntity> findIdentities(ExtendProfileFilter filter) - Specified by:
findIdentitiesin interfaceIdentityDAO
-
getAllIdsByProviderSorted
public List<String> getAllIdsByProviderSorted(String providerId, String sortField, String sortDirection, boolean isEnabled, String userType, Boolean isConnected, String enrollmentStatus, List<String> remoteIds, List<String> groupIds, String membershipType, boolean includeInheritedMemberships, long offset, long limit) - Specified by:
getAllIdsByProviderSortedin interfaceIdentityDAO
-
getIdentityIdsByProviderSorted
public List<Long> getIdentityIdsByProviderSorted(String providerId, String sortField, String sortDirection, boolean isEnabled, String userType, Boolean isConnected, String enrollmentStatus, List<String> remoteIds, List<String> groupIds, String membershipType, boolean includeInheritedMemberships, long offset, long limit) - Specified by:
getIdentityIdsByProviderSortedin interfaceIdentityDAO
-
getAllIdsCountByProvider
public int getAllIdsCountByProvider(String providerId, String userType, Boolean isConnected, boolean isEnabled, String enrollmentStatus, List<String> remoteIds, List<String> groupIds, String membershipType, boolean includeInheritedMemberships) - Specified by:
getAllIdsCountByProviderin interfaceIdentityDAO
-
setAsDeleted
public void setAsDeleted(long identityId) Description copied from interface:IdentityDAOset the DELETED flag to true- Specified by:
setAsDeletedin interfaceIdentityDAO- Parameters:
identityId- the identity Id
-
hardDeleteIdentity
public void hardDeleteIdentity(long identityId) Description copied from interface:IdentityDAOdelete definitely an identity- Specified by:
hardDeleteIdentityin interfaceIdentityDAO- Parameters:
identityId- the identity Id
-
findIdentitiesByIDs
-
getFromOracleDB
in ORACLE, maximum number of expressions in a list is 1000. so we need to send more than one request if the number of ids is more than 1000 (1000 ids per request).- Type Parameters:
T- This is the type parameter- Parameters:
query- The query.ids- The ids of users.- Returns:
-