public interface JpaFilePersistenceService extends FilePersistenceService
FilePersistenceService
to add APIs for entity retrieval in addition to DTO.Modifier and Type | Method and Description |
---|---|
java.util.Optional<FileEntity> |
getFile(@NotBlank(message="File path cannot be blank") java.lang.String file)
Get a reference to the file entity for the given file path string.
|
java.util.Set<FileEntity> |
getFiles(@NotNull java.util.Set<java.lang.String> files)
Get all the file entity references that match the input set of file strings.
|
createFileIfNotExists, deleteUnusedFiles
java.util.Optional<FileEntity> getFile(@NotBlank(message="File path cannot be blank") @NotBlank(message="File path cannot be blank") java.lang.String file)
file
- The path to search forOptional
or Optional.empty()
java.util.Set<FileEntity> getFiles(@NotNull @NotNull java.util.Set<java.lang.String> files)
files
- the file strings to search forfiles
doesn't exist in database the set
returned will consist of all other discovered files. E.G. files
is ("a", "b", "c") and only "b"
and "c" are in the database the returned set will contain "b" and "c". The method won't fail.