public interface ModelHistoryRepository extends org.springframework.data.jpa.repository.JpaRepository<ModelHistory,Long>
Modifier and Type | Method and Description |
---|---|
List<ModelHistory> |
findByCreatedByAndModelTypeAndRemovalDateIsNull(User createdBy,
Integer modelType) |
List<ModelHistory> |
findByModelIdAndRemovalDateIsNullOrderByVersionDesc(Long modelId) |
List<ModelHistory> |
findByModelIdOrderByVersionDesc(Long modelId) |
List<ModelHistory> |
findModelsSharedWithUser(Long sharedWith,
Integer modelType,
org.springframework.data.domain.Sort sort) |
List<ModelHistory> |
findModelsSharedWithUserOrGroups(Long sharedWith,
List<Long> groups,
Integer modelType,
org.springframework.data.domain.Sort sort) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, flush, getOne, save, saveAndFlush
List<ModelHistory> findByCreatedByAndModelTypeAndRemovalDateIsNull(User createdBy, Integer modelType)
List<ModelHistory> findByModelIdAndRemovalDateIsNullOrderByVersionDesc(Long modelId)
List<ModelHistory> findByModelIdOrderByVersionDesc(Long modelId)
@Query(value="select model from ModelHistory model, ModelShareInfo info left outer join info.group as group where model.modelId = info.model.id and model.modelType = :modelType and (info.user.id =:user or group.id in (:groups))") List<ModelHistory> findModelsSharedWithUserOrGroups(@Param(value="user") Long sharedWith, @Param(value="groups") List<Long> groups, @Param(value="modelType") Integer modelType, org.springframework.data.domain.Sort sort)
@Query(value="select model from ModelHistory model, ModelShareInfo info where model.modelId = info.model.id and model.modelType = :modelType and info.user.id =:user") List<ModelHistory> findModelsSharedWithUser(@Param(value="user") Long sharedWith, @Param(value="modelType") Integer modelType, org.springframework.data.domain.Sort sort)
Copyright © 2014–2015 Alfresco. All rights reserved.