public interface UserRepository extends org.springframework.data.jpa.repository.JpaRepository<User,Long>
Modifier and Type | Method and Description |
---|---|
void |
changeLastUpdateValue(Long id,
Date lastUpdate) |
Long |
countUsersForGroup(Long groupId) |
Long |
countUsersForGroup(Long groupId,
String filter) |
User |
findByEmail(String email) |
User |
findByEmailFetchGroups(String email) |
List<String> |
findUserEmailsForGroup(Long groupId,
org.springframework.data.domain.Pageable pageable) |
List<Long> |
findUserIdsForGroup(Long groupId,
org.springframework.data.domain.Pageable pageable) |
List<User> |
findUsersForGroup(Long groupId,
org.springframework.data.domain.Pageable pageable) |
List<User> |
findUsersForGroup(Long groupId,
String filter,
org.springframework.data.domain.Pageable pageable) |
List<User> |
findUsersSharedWithRecently(Long userId,
org.springframework.data.domain.Pageable paging) |
List<User> |
findUsersSharedWithRecentlyExcludeModel(Long userId,
Long excludeModelId,
org.springframework.data.domain.Pageable paging) |
Long |
getUserCount() |
Long |
getUserCountByUserIdAndLastUpdateDate(Long userId,
Date lastUpdate) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, flush, getOne, save, saveAndFlush
@Query(value="select u from User u left join fetch u.groups where u.email = :email") User findByEmailFetchGroups(@Param(value="email") String email)
@Query(value="select count(u.id) from User u") Long getUserCount()
@Query(value="select count(u.id) from User u where u.id = :userId and lastUpdate = :lastUpdate") Long getUserCountByUserIdAndLastUpdateDate(@Param(value="userId") Long userId, @Param(value="lastUpdate") Date lastUpdate)
@Query(value="select distinct share.user from ModelShareInfo share where share.sharedBy.id = :userId") List<User> findUsersSharedWithRecently(@Param(value="userId") Long userId, org.springframework.data.domain.Pageable paging)
@Query(value="select distinct share.user from ModelShareInfo share where share.sharedBy.id = :userId and share.model.id != :excludeModelId") List<User> findUsersSharedWithRecentlyExcludeModel(@Param(value="userId") Long userId, @Param(value="excludeModelId") Long excludeModelId, org.springframework.data.domain.Pageable paging)
@Query(value="select u from Group g inner join g.users u where g.id = :groupId") List<User> findUsersForGroup(@Param(value="groupId") Long groupId, org.springframework.data.domain.Pageable pageable)
@Query(value="select u.id from Group g inner join g.users u where g.id = :groupId") List<Long> findUserIdsForGroup(@Param(value="groupId") Long groupId, org.springframework.data.domain.Pageable pageable)
@Query(value="select u.email from Group g inner join g.users u where g.id = :groupId") List<String> findUserEmailsForGroup(@Param(value="groupId") Long groupId, org.springframework.data.domain.Pageable pageable)
@Query(value="select count(u.id) from Group g inner join g.users u where g.id = :groupId") Long countUsersForGroup(@Param(value="groupId") Long groupId)
@Query(value="select u from Group g inner join g.users u where g.id = :groupId and (lower(u.firstName) like %:filter% or lower(u.lastName) like %:filter% or lower(u.email) like %:filter%)") List<User> findUsersForGroup(@Param(value="groupId") Long groupId, @Param(value="filter") String filter, org.springframework.data.domain.Pageable pageable)
@Query(value="select count(u.id) from Group g inner join g.users u where g.id = :groupId and (lower(u.firstName) like %:filter% or lower(u.lastName) like %:filter% or lower(u.email) like %:filter%)") Long countUsersForGroup(@Param(value="groupId") Long groupId, @Param(value="filter") String filter)
Copyright © 2014–2015 Alfresco. All rights reserved.