Interface PlaylistRepository

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

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

    Modifier and Type
    Method
    Description
    Counts the number of playlists created between two timestamps.
    Finds the most recently created playlist.

    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

    • countByCreatedAtBetween

      @Async CompletableFuture<Long> countByCreatedAtBetween(Instant after, Instant before)
      Counts the number of playlists created between two timestamps.
      Parameters:
      after - The start timestamp.
      before - The end timestamp.
      Returns:
      A completable future containing the number of playlists.
    • findTopByOrderByCreatedAt

      Playlist findTopByOrderByCreatedAt()
      Finds the most recently created playlist.
      Returns:
      The playlist.