public interface ModelRepository extends org.springframework.data.jpa.repository.JpaRepository<Model,String>
| Modifier and Type | Method and Description |
|---|---|
String |
appDefinitionIdByModelAndUser(String modelId,
String user) |
Long |
countByModelTypeAndUser(int modelType,
String user) |
List<Model> |
findModelsByChildModelId(String modelId) |
List<Model> |
findModelsByKeyAndType(String key,
Integer modelType) |
List<Model> |
findModelsByModelType(Integer modelType) |
List<Model> |
findModelsByModelType(Integer modelType,
String filter) |
List<Model> |
findModelsByParentModelId(String parentModelId) |
List<Model> |
findModelsByParentModelIdAndType(String parentModelId,
Integer modelType) |
List<Model> |
findModelsCreatedBy(String createdBy,
Integer modelType,
org.springframework.data.domain.Sort sort) |
List<Model> |
findModelsCreatedBy(String createdBy,
Integer modelType,
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 = :user and model.modelType = :modelType") List<Model> findModelsCreatedBy(@Param(value="user") String createdBy, @Param(value="modelType") Integer modelType, org.springframework.data.domain.Sort sort)
@Query(value="from Model as model where model.createdBy = :user and (lower(model.name) like :filter or lower(model.description) like :filter) and model.modelType = :modelType") List<Model> findModelsCreatedBy(@Param(value="user") String 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.key = :key and model.modelType = :modelType") List<Model> findModelsByKeyAndType(@Param(value="key") String key, @Param(value="modelType") Integer modelType)
@Query(value="from Model as model where (lower(model.name) like :filter or lower(model.description) like :filter) and model.modelType = :modelType") List<Model> findModelsByModelType(@Param(value="modelType") Integer modelType, @Param(value="filter") String filter)
@Query(value="from Model as model where model.modelType = :modelType") List<Model> findModelsByModelType(@Param(value="modelType") Integer modelType)
@Query(value="select count(m.id) from Model m where m.createdBy = :user and m.modelType = :modelType") Long countByModelTypeAndUser(@Param(value="modelType") int modelType, @Param(value="user") String user)
@Query(value="select m from ModelRelation mr inner join mr.model m where mr.parentModelId = :parentModelId") List<Model> findModelsByParentModelId(@Param(value="parentModelId") String parentModelId)
@Query(value="select m from ModelRelation mr inner join mr.model m where mr.parentModelId = :parentModelId and m.modelType = :modelType") List<Model> findModelsByParentModelIdAndType(@Param(value="parentModelId") String parentModelId, @Param(value="modelType") Integer modelType)
@Query(value="select m.id, m.name, m.modelType from ModelRelation mr inner join mr.parentModel m where mr.modelId = :modelId") List<Model> findModelsByChildModelId(@Param(value="modelId") String modelId)
Copyright © 2017 Alfresco. All rights reserved.