Created
March 19, 2021 01:53
-
-
Save srdelarosa/777579e094ee2e8189b36f82f1b105cf to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
package com.newhorizons.takeitnow.products.domain.service; | |
import com.newhorizons.takeitnow.products.application.mainmodule.dto.ProductDto; | |
import com.newhorizons.takeitnow.products.application.mainmodule.service.IProductService; | |
import com.newhorizons.takeitnow.products.domain.repository.IProductRepository; | |
import org.springframework.beans.factory.annotation.Autowired; | |
import org.springframework.stereotype.Service; | |
import java.util.List; | |
import java.util.Optional; | |
@Service | |
public class ProductService implements IProductService { | |
@Autowired | |
private IProductRepository productRepository; | |
public List<ProductDto> getAll() { | |
return productRepository.getAll(); | |
} | |
public Optional<ProductDto> getProduct(long productId) { | |
return productRepository.getProduct(productId); | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment