public interface ModelShareInfoRepository extends org.springframework.data.jpa.repository.JpaRepository<ModelShareInfo,Long>
Modifier and Type | Method and Description |
---|---|
void |
connectSharedModelsByEmail(String email,
User user)
Connects all models that are shared by email-address matching the address of the given user.
|
void |
deleteInBatchByModelId(Long modelId) |
ModelShareInfo |
findByModelIdAndGroupId(Long modelId,
Long groupId) |
ModelShareInfo |
findByModelIdAndId(Long modelId,
Long id) |
ModelShareInfo |
findByModelIdAndId(Long modelId,
String id) |
ModelShareInfo |
findByModelIdAndUserId(Long modelId,
Long userId) |
List<ModelShareInfo> |
findByModelIdOrderByShareDateAsc(Long modelId,
org.springframework.data.domain.Pageable paging) |
List<ModelShareInfo> |
findByModelIdWithUserId(Long modelId,
Long userId) |
List<ModelShareInfo> |
findByModelIdWithUserIdOrGroups(Long modelId,
Long userId,
List<Long> groupIds) |
List<ModelShareInfo> |
findByUserIdOrderByShareDateAsc(Long userId,
org.springframework.data.domain.Pageable paging) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, flush, getOne, save, saveAndFlush
List<ModelShareInfo> findByUserIdOrderByShareDateAsc(Long userId, org.springframework.data.domain.Pageable paging)
List<ModelShareInfo> findByModelIdOrderByShareDateAsc(Long modelId, org.springframework.data.domain.Pageable paging)
@Query(value="select info from ModelShareInfo info left outer join info.group as group where info.model.id =:modelId and (info.user.id =:userId or group.id in (:groupIds))") List<ModelShareInfo> findByModelIdWithUserIdOrGroups(@Param(value="modelId") Long modelId, @Param(value="userId") Long userId, @Param(value="groupIds") List<Long> groupIds)
@Query(value="select info from ModelShareInfo info where info.model.id =:modelId and info.user.id =:userId") List<ModelShareInfo> findByModelIdWithUserId(@Param(value="modelId") Long modelId, @Param(value="userId") Long userId)
ModelShareInfo findByModelIdAndUserId(Long modelId, Long userId)
ModelShareInfo findByModelIdAndGroupId(Long modelId, Long groupId)
ModelShareInfo findByModelIdAndId(Long modelId, Long id)
ModelShareInfo findByModelIdAndId(Long modelId, String id)
@Modifying @Query(value="delete from ModelShareInfo info where info.model.id = ?") void deleteInBatchByModelId(Long modelId)
@Modifying @Query(value="update ModelShareInfo info set info.email = null, info.user = :user where info.email = :email") void connectSharedModelsByEmail(@Param(value="email") String email, @Param(value="user") User user)
Copyright © 2014–2015 Alfresco. All rights reserved.