Package com.nelioalves.cursomc.services
Class ProdutoService
- java.lang.Object
-
- com.nelioalves.cursomc.services.ProdutoService
-
@Service public class ProdutoService extends Object
Classe de serviço com regras de negócio para Produtos- Author:
- José Henrique
-
-
Constructor Summary
Constructors Constructor Description ProdutoService()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description Produtofind(Integer id)Procura um Produtoorg.springframework.data.domain.Page<Produto>findDistinctByNomeContainingAndCategoriaIn(String nome, List<Integer> categoriaList, org.springframework.data.domain.Pageable pageable)Procura Produtos e os retornam em um Page
-
-
-
Method Detail
-
find
public Produto find(Integer id)
Procura um Produto- Parameters:
id- Id do Produto a ser procurado- Returns:
- O Produto encontrado
- Throws:
ObjectNotFoundException
-
findDistinctByNomeContainingAndCategoriaIn
public org.springframework.data.domain.Page<Produto> findDistinctByNomeContainingAndCategoriaIn(String nome, List<Integer> categoriaList, org.springframework.data.domain.Pageable pageable)
Procura Produtos e os retornam em um Page- Parameters:
nome- Nome do ProdutocategoriaList- Lista de Categorias a ser pesquisadaspageable- Um Page- Returns:
- Um Page com Produtos
-
-