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>

public interface UploadRepository extends org.springframework.data.jpa.repository.JpaRepository<Upload,UUID>
  • Method Details

    • findLastModifiedById

      @PreAuthorize("permitAll()") @NonNull @Query("select lastModified from Upload where id = :id") Optional<OffsetDateTime> findLastModifiedById(@NonNull UUID id)
    • findByIdAndCategory

      @PreAuthorize("permitAll()") @NonNull Optional<Upload> findByIdAndCategory(@NonNull UUID id, @NonNull String category)
    • findWithContentByIdAndCategory

      @PreAuthorize("permitAll()") @NonNull @EntityGraph(attributePaths="content") Optional<Upload> findWithContentByIdAndCategory(@NonNull UUID id, @NonNull String category)
    • findByCategory

      @PreAuthorize("permitAll()") List<Upload> findByCategory(String category)
    • findFirstWithContentByCategoryOrderByLastModifiedDesc

      @PreAuthorize("permitAll()") @NonNull @EntityGraph(attributePaths="content") Optional<Upload> findFirstWithContentByCategoryOrderByLastModifiedDesc(@NonNull String 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 String category, @NonNull List<String> hashes)
    • findByFilename

      @PreAuthorize("permitAll()") List<Upload> findByFilename(String filename)