All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.github.saphyra.randwo.storedobject.service.save.SaveObjectService Maven / Gradle / Ivy

There is a newer version: 1.1.0
Show newest version
package com.github.saphyra.randwo.storedobject.service.save;

import org.springframework.stereotype.Service;

import com.github.saphyra.randwo.storedobject.domain.StoreObjectRequest;
import com.github.saphyra.randwo.storedobject.repository.StoredObjectDao;
import lombok.RequiredArgsConstructor;

@Service
@RequiredArgsConstructor
public class SaveObjectService {
    private final StoredObjectDao storedObjectDao;
    private final StoredObjectFactory storedObjectFactory;
    private final StoreObjectRequestValidator storeObjectRequestValidator;

    public void save(StoreObjectRequest request) {
        storeObjectRequestValidator.validate(request);

        storedObjectDao.save(storedObjectFactory.create(request));
    }
}




© 2015 - 2024 Weber Informatics LLC | Privacy Policy