Class UserFileRepositoryService

java.lang.Object
formflow.library.data.UserFileRepositoryService

@Service public class UserFileRepositoryService extends Object
Service to retrieve and store UploadedFile objects in the database.
  • Constructor Details

    • UserFileRepositoryService

      public UserFileRepositoryService(UserFileRepository repository)
  • Method Details

    • save

      public UserFile save(UserFile userFile)
      Saves the UploadedFile in the database.
      Parameters:
      userFile - the uploadedFile to save, not null
      Returns:
      UUID of the file
    • findById

      public Optional<UserFile> findById(UUID id)
      Searches for a particular UserFile by its id
      Parameters:
      id - UUID of the UserFile to look for, not null
      Returns:
      Optional containing UserFile if found, else empty
    • deleteById

      public void deleteById(UUID id)
      Removes a particular UserFile based on passed in id
      Parameters:
      id - UUID of UserFile to remove, not null
    • findAllBySubmission

      public List<UserFile> findAllBySubmission(Submission submission)
    • countBySubmission

      public long countBySubmission(Submission submission)