Interface SongRepository

  • All Superinterfaces:
    org.springframework.data.repository.CrudRepository<Song,​java.lang.Integer>, org.springframework.data.repository.Repository<Song,​java.lang.Integer>

    @Repository
    public interface SongRepository
    extends org.springframework.data.repository.CrudRepository<Song,​java.lang.Integer>
    Since:
    : 22-12-2020
    • Method Summary

      All Methods Instance Methods Abstract Methods 
      Modifier and Type Method Description
      java.util.List<Song> findSongByArtist​(java.lang.String artist)  
      Song findSongBySongId​(java.lang.Integer userId)  
      java.util.List<Song> getAllSongs()  
      • Methods inherited from interface org.springframework.data.repository.CrudRepository

        count, delete, deleteAll, deleteAll, deleteById, existsById, findAll, findAllById, findById, save, saveAll
    • Method Detail

      • findSongBySongId

        @Query(value="SELECT * FROM songs WHERE id = ?1",
               nativeQuery=true)
        Song findSongBySongId​(java.lang.Integer userId)
      • getAllSongs

        @Query(value="SELECT * FROM songs",
               nativeQuery=true)
        java.util.List<Song> getAllSongs()
      • findSongByArtist

        @Query(value="SELECT * FROM songs WHERE artist = ?1",
               nativeQuery=true)
        java.util.List<Song> findSongByArtist​(java.lang.String artist)