Package org.localify.repositories
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 TypeMethodDescriptioncountByCreatedAtBetween(Instant after, Instant before) 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, saveMethods inherited from interface org.springframework.data.jpa.repository.JpaRepository
deleteAllByIdInBatch, deleteAllInBatch, deleteAllInBatch, deleteInBatch, findAll, findAll, flush, getById, getOne, getReferenceById, saveAllAndFlush, saveAndFlushMethods inherited from interface org.springframework.data.repository.ListCrudRepository
findAll, findAllById, saveAllMethods inherited from interface org.springframework.data.repository.ListPagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.PagingAndSortingRepository
findAllMethods inherited from interface org.springframework.data.repository.query.QueryByExampleExecutor
count, exists, findAll, findBy, findOne
-
Method Details
-
countByCreatedAtBetween
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.
-