com.sippnex.fileblade.services.UploadRequestService Maven / Gradle / Ivy
package com.sippnex.fileblade.services;
import com.sippnex.fileblade.entities.UploadRequest;
import com.sippnex.fileblade.repositories.UploadRequestRepository;
import org.springframework.stereotype.Service;
import java.util.Optional;
@Service
public class UploadRequestService {
final UploadRequestRepository uploadRequestRepository;
public UploadRequestService(UploadRequestRepository uploadRequestRepository) {
this.uploadRequestRepository = uploadRequestRepository;
}
public UploadRequest save(UploadRequest uploadRequest) {
return this.uploadRequestRepository.save(uploadRequest);
}
public Optional findById(Long id) {
return this.uploadRequestRepository.findById(id);
}
public void delete(UploadRequest uploadRequest) {
this.uploadRequestRepository.delete(uploadRequest);
}
}