Interface TopicRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<Topic,Long>, FindTopicRepository, org.springframework.data.repository.Repository<Topic,Long>

public interface TopicRepository extends org.springframework.data.repository.CrudRepository<Topic,Long>, FindTopicRepository
Author:
etienne-sf
  • Method Details

    • findByBoardId

      @Query("select t from Topic t where t.boardId= ?1") List<Topic> findByBoardId(Long boardId)
    • findByBoardIdAndSince

      @Query("select t from Topic t where t.boardId= ?1 and t.date >= ?2") List<Topic> findByBoardIdAndSince(Long boardId, Date since)
    • findByBoardName

      @Query(value=" select t.* from Topic t join Board b on t.board_id = b.id where b.name = ?1", nativeQuery=true) List<Topic> findByBoardName(String name)
      An example of a native query that could be used for some particular case
      Parameters:
      name -
      Returns:
    • findByIds

      @Query("select t from Topic t where id in ?1") List<Topic> findByIds(List<Long> ids)
      The query for the BatchLoader