1 package hu.user.mcvodsync.db.repository;
3 import hu.user.mcvodsync.db.PlaylistSync;
4 import hu.user.mcvodsync.db.SyncType;
5 import org.springframework.data.jpa.repository.JpaRepository;
6 import org.springframework.data.jpa.repository.Query;
10 public interface PlaylistSyncRepository extends JpaRepository<PlaylistSync, Long> {
12 long countBySyncType(SyncType syncType);
14 List<PlaylistSync> findAllByName(String name);
16 @Query("SELECT p.id FROM PlaylistSync p WHERE p.exportedSuccess IS NULL ORDER BY p.created")
17 List<Long> queryIdsForExport();
19 List<PlaylistSync> findAllByIdInOrderByCreated(List<Long> id);