public interface ModelRelationRepository extends org.springframework.data.jpa.repository.JpaRepository<ModelRelation,Long>
| Modifier and Type | Method and Description |
|---|---|
void |
deleteModelRelationsForParentModel(String parentModelId) |
List<ModelRelation> |
findByChildModelId(String modelId) |
List<ModelRelation> |
findByChildModelIdAndType(String modelId,
String type) |
List<ModelRelation> |
findByParentModelId(String parentModelId) |
List<ModelRelation> |
findByParentModelIdAndType(String parentModelId,
String type) |
List<ModelInformation> |
findModelInformationByChildModelId(String modelId) |
List<ModelInformation> |
findModelInformationByParentModelId(String parentModelId) |
deleteAllInBatch, deleteInBatch, findAll, findAll, findAll, flush, getOne, save, saveAndFlush@Query(value="from ModelRelation mr where mr.parentModelId = :parentModelId") List<ModelRelation> findByParentModelId(@Param(value="parentModelId") String parentModelId)
@Query(value="from ModelRelation mr where mr.parentModelId = :parentModelId and mr.type = :type") List<ModelRelation> findByParentModelIdAndType(@Param(value="parentModelId") String parentModelId, @Param(value="type") String type)
@Query(value="from ModelRelation mr where mr.modelId = :modelId") List<ModelRelation> findByChildModelId(@Param(value="modelId") String modelId)
@Query(value="from ModelRelation mr where mr.modelId = :modelId and mr.type = :type") List<ModelRelation> findByChildModelIdAndType(@Param(value="modelId") String modelId, @Param(value="type") String type)
@Query(value="select m.id, m.name, m.modelType from ModelRelation mr inner join mr.model m where mr.parentModelId = :parentModelId") List<ModelInformation> findModelInformationByParentModelId(@Param(value="parentModelId") String parentModelId)
@Query(value="select m.id, m.name, m.modelType from ModelRelation mr inner join mr.parentModel m where mr.modelId = :modelId") List<ModelInformation> findModelInformationByChildModelId(@Param(value="modelId") String modelId)
@Modifying
@Query(value="delete from ModelRelation mr where mr.parentModelId = :parentModelId")
void deleteModelRelationsForParentModel(@Param(value="parentModelId")
String parentModelId)
Copyright © 2017 Alfresco. All rights reserved.