Interface WatchedFileEntityRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<WatchedFileEntity,,Long> org.springframework.data.jpa.repository.JpaRepository<WatchedFileEntity,,Long> org.springframework.data.repository.ListCrudRepository<WatchedFileEntity,,Long> org.springframework.data.repository.ListPagingAndSortingRepository<WatchedFileEntity,,Long> org.springframework.data.repository.PagingAndSortingRepository<WatchedFileEntity,,Long> org.springframework.data.repository.query.QueryByExampleExecutor<WatchedFileEntity>,org.springframework.data.repository.Repository<WatchedFileEntity,Long>
public interface WatchedFileEntityRepository
extends org.springframework.data.jpa.repository.JpaRepository<WatchedFileEntity,Long>
-
Method Summary
Modifier and TypeMethodDescriptionintcountByFolderLabel(boolean pickUpDirs, boolean pickUpFiles, String folderLabel) intcountByFolderLabel(String folderLabel) voiddeleteByHashPath(Set<String> detectedHashPath) voiddeleteFolderLabelsNotInSet(Set<String> folderLabelToKeep) getAllHashPathByFolderLabel(String folderLabel) getByHashPath(Set<String> hashPath) getLostedByHashPath(Set<String> detectedHashPath, boolean pickUpDirs, boolean pickUpFiles, String folderLabel) getLostedForEmptyDir(boolean pickUpDirs, boolean pickUpFiles, String folderLabel) 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
-
getByHashPath
@Query("SELECT w FROM WatchedFileEntity w WHERE w.hashPath IN :hashPath") Set<WatchedFileEntity> getByHashPath(Set<String> hashPath) -
getLostedByHashPath
@Query("SELECT w FROM WatchedFileEntity w\nWHERE w.markedAsDone = false\nAND ((w.directory = true AND :pickUpDirs = true) OR (w.directory = false AND :pickUpFiles = true))\nAND w.hashPath NOT IN :detectedHashPath\nAND w.folderLabel = :folderLabel\n") Set<WatchedFileEntity> getLostedByHashPath(Set<String> detectedHashPath, boolean pickUpDirs, boolean pickUpFiles, String folderLabel) -
getLostedForEmptyDir
@Query("SELECT w FROM WatchedFileEntity w\nWHERE w.markedAsDone = false\nAND ((w.directory = true AND :pickUpDirs = true) OR (w.directory = false AND :pickUpFiles = true))\nAND w.folderLabel = :folderLabel\n") Set<WatchedFileEntity> getLostedForEmptyDir(boolean pickUpDirs, boolean pickUpFiles, String folderLabel) -
getAllHashPathByFolderLabel
-
deleteByHashPath
-
countByFolderLabel
@Query("SELECT COUNT(w) FROM WatchedFileEntity w WHERE w.folderLabel = :folderLabel") int countByFolderLabel(String folderLabel) -
countByFolderLabel
@Query("SELECT COUNT(w) FROM WatchedFileEntity w\nWHERE ((w.directory = true AND :pickUpDirs = true) OR (w.directory = false AND :pickUpFiles = true))\nAND w.folderLabel = :folderLabel\n") int countByFolderLabel(boolean pickUpDirs, boolean pickUpFiles, String folderLabel) -
deleteFolderLabelsNotInSet
-