public interface ModelRepository extends org.springframework.data.jpa.repository.JpaRepository<Model,Long>
Modifier and Type | Method and Description |
---|---|
Long |
countByModelTypeAndUser(int modelType,
User user) |
List<Model> |
findModelsByModelTypeAndReferenceId(Integer modelType,
Long referenceId) |
List<Model> |
findModelsByModelTypeAndReferenceId(Integer modelType,
String filter,
Long referenceId) |
List<Model> |
findModelsByModelTypeAndReferenceIdOrNullReferenceId(Integer modelType,
Long referenceId) |
List<Model> |
findModelsByReferenceId(Long referenceId) |
List<Model> |
findModelsCreatedBy(Long createdBy,
Integer modelType,
org.springframework.data.domain.Sort sort) |
List<Model> |
findModelsCreatedBy(Long createdBy,
Integer modelType,
String filter,
org.springframework.data.domain.Sort sort) |
List<Model> |
findModelsSharedBy(Long sharedBy,
Integer modelType,
org.springframework.data.domain.Sort sort) |
List<Model> |
findModelsSharedBy(Long sharedBy,
Integer modelType,
String filter,
org.springframework.data.domain.Sort sort) |
List<ModelShareInfo> |
findModelsSharedWithUser(Long sharedWith,
Integer modelType,
org.springframework.data.domain.Sort sort) |
List<ModelShareInfo> |
findModelsSharedWithUser(Long sharedWith,
Integer modelType,
String filter,
org.springframework.data.domain.Sort sort) |
List<Model> |
findProcessesCreatedBy(Long createdBy,
org.springframework.data.domain.Sort sort) |
List<Model> |
findProcessesCreatedBy(Long createdBy,
String filter,
org.springframework.data.domain.Sort sort) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, flush, getOne, save, saveAndFlush
@Query(value="from Model as model where model.createdBy.id = :user and (model.modelType is null or model.modelType = 0 or model.modelType = 1) and model.referenceId is null") List<Model> findProcessesCreatedBy(@Param(value="user") Long createdBy, org.springframework.data.domain.Sort sort)
@Query(value="from Model as model where model.createdBy.id = :user and (lower(model.name) like :filter or lower(model.description) like :filter) and (model.modelType is null or model.modelType = 0 or model.modelType = 1) and model.referenceId is null") List<Model> findProcessesCreatedBy(@Param(value="user") Long createdBy, @Param(value="filter") String filter, org.springframework.data.domain.Sort sort)
@Query(value="from Model as model where model.createdBy.id = :user and model.modelType = :modelType and model.referenceId is null") List<Model> findModelsCreatedBy(@Param(value="user") Long createdBy, @Param(value="modelType") Integer modelType, org.springframework.data.domain.Sort sort)
@Query(value="from Model as model where model.createdBy.id = :user and (lower(model.name) like :filter or lower(model.description) like :filter) and model.modelType = :modelType and model.referenceId is null") List<Model> findModelsCreatedBy(@Param(value="user") Long createdBy, @Param(value="modelType") Integer modelType, @Param(value="filter") String filter, org.springframework.data.domain.Sort sort)
@Query(value="from Model as model where model.referenceId = :referenceId") List<Model> findModelsByReferenceId(@Param(value="referenceId") Long referenceId)
@Query(value="from Model as model where model.modelType = :modelType and model.referenceId = :referenceId") List<Model> findModelsByModelTypeAndReferenceId(@Param(value="modelType") Integer modelType, @Param(value="referenceId") Long referenceId)
@Query(value="from Model as model where (lower(model.name) like :filter or lower(model.description) like :filter) and model.modelType = :modelType and model.referenceId = :referenceId") List<Model> findModelsByModelTypeAndReferenceId(@Param(value="modelType") Integer modelType, @Param(value="filter") String filter, @Param(value="referenceId") Long referenceId)
@Query(value="from Model as model where model.modelType = :modelType and (model.referenceId = :referenceId or model.referenceId is null)") List<Model> findModelsByModelTypeAndReferenceIdOrNullReferenceId(@Param(value="modelType") Integer modelType, @Param(value="referenceId") Long referenceId)
@Query(value="select pm from Model pm, ModelShareInfo info where pm = info.model and info.sharedBy.id =:user and pm.modelType = :modelType and pm.referenceId is null") List<Model> findModelsSharedBy(@Param(value="user") Long sharedBy, @Param(value="modelType") Integer modelType, org.springframework.data.domain.Sort sort)
@Query(value="select pm from Model pm, ModelShareInfo info where pm = info.model and info.sharedBy.id =:user and (lower(info.model.name) like :filter or lower(info.model.description) like :filter) and pm.modelType = :modelType and pm.referenceId is null") List<Model> findModelsSharedBy(@Param(value="user") Long sharedBy, @Param(value="modelType") Integer modelType, @Param(value="filter") String filter, org.springframework.data.domain.Sort sort)
@Query(value="select info from ModelShareInfo info join fetch info.model where info.user.id =:user and info.model.modelType = :modelType and info.model.referenceId is null") List<ModelShareInfo> findModelsSharedWithUser(@Param(value="user") Long sharedWith, @Param(value="modelType") Integer modelType, org.springframework.data.domain.Sort sort)
@Query(value="select info from ModelShareInfo info join fetch info.model where info.user.id =:user and (lower(info.model.name) like :filter or lower(info.model.description) like :filter) and info.model.modelType = :modelType and info.model.referenceId is null") List<ModelShareInfo> findModelsSharedWithUser(@Param(value="user") Long sharedWith, @Param(value="modelType") Integer modelType, @Param(value="filter") String filter, org.springframework.data.domain.Sort sort)
Copyright © 2014–2015 Alfresco. All rights reserved.