Interface UploadRepository
- All Superinterfaces:
org.springframework.data.repository.CrudRepository<Upload,UUID>, org.springframework.data.jpa.repository.JpaRepository<Upload, UUID>, org.springframework.data.repository.ListCrudRepository<Upload, UUID>, org.springframework.data.repository.ListPagingAndSortingRepository<Upload, UUID>, org.springframework.data.repository.PagingAndSortingRepository<Upload, UUID>, org.springframework.data.repository.query.QueryByExampleExecutor<Upload>, org.springframework.data.repository.Repository<Upload, UUID>, org.springframework.data.repository.history.RevisionRepository<Upload, UUID, Long>
-
Method Summary
Modifier and TypeMethodDescriptionfindAllWithContentByIdIn(@NonNull List<UUID> ids) get all uploads with the given ids, including their content, e.g. for downloading as a zip.findByCategory(@NonNull UploadCategory category) findByFilename(String filename) findByHashIn(@NonNull UploadCategory category, @NonNull List<String> hashes) findByIdAndCategory(@NonNull UUID id, @NonNull UploadCategory category) findFirstWithContentByCategoryOrderByLastModifiedDesc(@NonNull UploadCategory category) @NonNull Optional<OffsetDateTime> findLastModifiedById(@NonNull UUID id) findWithContentByCategoryAndFilename(@NonNull UploadCategory category, @NonNull String filename) findWithContentByIdAndCategory(@NonNull UUID id, @NonNull UploadCategory category) 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, findOneMethods inherited from interface org.springframework.data.repository.history.RevisionRepository
findLastChangeRevision, findRevision, findRevisions, findRevisions
-
Method Details
-
findLastModifiedById
@PreAuthorize("permitAll()") @Query("select lastModified from Upload where id = :id") @NonNull Optional<OffsetDateTime> findLastModifiedById(@NonNull UUID id) -
findByIdAndCategory
@PreAuthorize("permitAll()") @NonNull Optional<Upload> findByIdAndCategory(@NonNull UUID id, @NonNull UploadCategory category) -
findWithContentByCategoryAndFilename
@PreAuthorize("permitAll()") @EntityGraph(attributePaths="content") @NonNull Optional<Upload> findWithContentByCategoryAndFilename(@NonNull UploadCategory category, @NonNull String filename) -
findWithContentByIdAndCategory
@PreAuthorize("permitAll()") @EntityGraph(attributePaths="content") @NonNull Optional<Upload> findWithContentByIdAndCategory(@NonNull UUID id, @NonNull UploadCategory category) -
findByCategory
-
findFirstWithContentByCategoryOrderByLastModifiedDesc
@PreAuthorize("permitAll()") @EntityGraph(attributePaths="content") @NonNull Optional<Upload> findFirstWithContentByCategoryOrderByLastModifiedDesc(@NonNull UploadCategory category) -
findByHashIn
@PreAuthorize("permitAll()") @Query("select new org.tailormap.api.repository.UploadMatch(u.id, u.hash) from Upload u where u.category = :category and u.hash in :hashes") List<UploadMatch> findByHashIn(@NonNull UploadCategory category, @NonNull List<String> hashes) -
findByFilename
-
findAllWithContentByIdIn
-