Interface PlaylistSongPairRepository

All Superinterfaces:
org.springframework.data.repository.CrudRepository<PlaylistSongPair,UUID>, org.springframework.data.jpa.repository.JpaRepository<PlaylistSongPair,UUID>, org.springframework.data.repository.ListCrudRepository<PlaylistSongPair,UUID>, org.springframework.data.repository.ListPagingAndSortingRepository<PlaylistSongPair,UUID>, org.springframework.data.repository.PagingAndSortingRepository<PlaylistSongPair,UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<PlaylistSongPair>, org.springframework.data.repository.Repository<PlaylistSongPair,UUID>

public interface PlaylistSongPairRepository extends org.springframework.data.jpa.repository.JpaRepository<PlaylistSongPair,UUID>
Repository for PlaylistSongPair entities.
  • Method Summary

    Modifier and Type
    Method
    Description
    void
    Deletes all playlist song pairs for a playlist.
    Finds all playlist song pairs for a playlist.
    Finds all non-deleted playlist song pairs for a playlist, ordered by position.

    Methods inherited from interface org.springframework.data.repository.CrudRepository

    count, delete, deleteAll, deleteAll, deleteAllById, deleteById, existsById, findById, save

    Methods inherited from interface org.springframework.data.jpa.repository.JpaRepository

    deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlush

    Methods inherited from interface org.springframework.data.repository.ListCrudRepository

    findAll, findAllById, saveAll

    Methods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.PagingAndSortingRepository

    findAll

    Methods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor

    count, exists, findAll, findBy, findOne
  • Method Details

    • findAllByPlaylistId

      List<PlaylistSongPair> findAllByPlaylistId(UUID playlistId)
      Finds all playlist song pairs for a playlist.
      Parameters:
      playlistId - The ID of the playlist.
      Returns:
      A list of playlist song pairs.
    • findAllByPlaylistIdAndDeletedAtNotNull

      @Query("select psp from PlaylistSongPair psp\nwhere psp.playlist = :playlist and psp.deletedAt is null\norder by psp.position\n") List<PlaylistSongPair> findAllByPlaylistIdAndDeletedAtNotNull(Playlist playlist)
      Finds all non-deleted playlist song pairs for a playlist, ordered by position.
      Parameters:
      playlist - The playlist.
      Returns:
      A list of playlist song pairs.
    • deleteAllByPlaylistId

      void deleteAllByPlaylistId(UUID playlistId)
      Deletes all playlist song pairs for a playlist.
      Parameters:
      playlistId - The ID of the playlist.