Interface ChartRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Chart,​Long>, org.springframework.data.jpa.repository.JpaRepository<Chart,​Long>, org.springframework.data.repository.PagingAndSortingRepository<Chart,​Long>, org.springframework.data.repository.query.QueryByExampleExecutor<Chart>, org.springframework.data.repository.Repository<Chart,​Long>

    public interface ChartRepository
    extends org.springframework.data.jpa.repository.JpaRepository<Chart,​Long>
    Spring Data JPA repository for the Chart entity.
    • Method Detail

      • findByOwnerIsCurrentUser

        @Query("select chart from Chart chart where chart.owner.login = :login")
        List<Chart> findByOwnerIsCurrentUser​(@Param("login")
                                             String login)
      • findByOwnerIsCurrentUserOrShared

        @Query("select chart from Chart chart where chart.shared = TRUE or chart.owner.login = :login")
        List<Chart> findByOwnerIsCurrentUserOrShared​(@Param("login")
                                                     String login)
      • findAllWithEagerRelationships

        @Query("select distinct chart from Chart chart left join fetch chart.graphs")
        List<Chart> findAllWithEagerRelationships()
      • findOneWithEagerRelationships

        @Query("select chart from Chart chart left join fetch chart.graphs where chart.id =:id")
        Optional<Chart> findOneWithEagerRelationships​(@Param("id")
                                                      Long id)