public interface ModelRelationRepository extends org.springframework.data.jpa.repository.JpaRepository<ModelRelation,Long>
Modifier and Type | Method and Description |
---|---|
void |
deleteModelRelationsForParentModel(Long parentModelId) |
List<ModelRelation> |
findByChildModelId(Long modelId) |
List<ModelRelation> |
findByChildModelIdAndType(Long modelId,
String type) |
List<ModelRelation> |
findByParentModelId(Long parentModelId) |
List<ModelRelation> |
findByParentModelIdAndType(Long parentModelId,
String type) |
List<Object[]> |
findModelInformationByChildModelId(Long modelId) |
List<Object[]> |
findModelInformationByParentModelId(Long 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") Long parentModelId)
@Query(value="from ModelRelation mr where mr.parentModelId = :parentModelId and mr.type = :type") List<ModelRelation> findByParentModelIdAndType(@Param(value="parentModelId") Long parentModelId, @Param(value="type") String type)
@Query(value="from ModelRelation mr where mr.modelId = :modelId") List<ModelRelation> findByChildModelId(@Param(value="modelId") Long modelId)
@Query(value="from ModelRelation mr where mr.modelId = :modelId and mr.type = :type") List<ModelRelation> findByChildModelIdAndType(@Param(value="modelId") Long 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<Object[]> findModelInformationByParentModelId(@Param(value="parentModelId") Long parentModelId)
@Query(value="select m.id, m.name, m.modelType from ModelRelation mr inner join mr.parentModel m where mr.modelId = :modelId") List<Object[]> findModelInformationByChildModelId(@Param(value="modelId") Long modelId)
@Modifying @Query(value="delete from ModelRelation mr where mr.parentModelId = :parentModelId") void deleteModelRelationsForParentModel(@Param(value="parentModelId") Long parentModelId)
Copyright © 2014–2015 Alfresco. All rights reserved.