Package htwb.ai.controller.repo
Interface PlaylistRepository
-
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Playlist,java.lang.Integer>
,org.springframework.data.repository.Repository<Playlist,java.lang.Integer>
@Repository public interface PlaylistRepository extends org.springframework.data.repository.CrudRepository<Playlist,java.lang.Integer>
- Since:
- : 22-12-2020
-
-
Method Summary
All Methods Instance Methods Abstract Methods Modifier and Type Method Description java.util.List<Playlist>
getAllByOwnerId(java.lang.String user)
java.util.List<Playlist>
getAllPublicByOwnerId(java.lang.String user)
Playlist
getPlaylistById(java.lang.Integer id)
-
-
-
Method Detail
-
getAllByOwnerId
@Query(value="SELECT * FROM playlists WHERE owner = ?1", nativeQuery=true) java.util.List<Playlist> getAllByOwnerId(java.lang.String user)
-
getAllPublicByOwnerId
@Query(value="SELECT * FROM playlists WHERE owner = ?1 AND is_private = FALSE", nativeQuery=true) java.util.List<Playlist> getAllPublicByOwnerId(java.lang.String user)
-
getPlaylistById
@Query(value="SELECT * FROM playlists WHERE id = ?1", nativeQuery=true) Playlist getPlaylistById(java.lang.Integer id)
-
-