1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17 package org.apache.logging.log4j.catalog.jpa.service;
18
19 import org.apache.logging.log4j.catalog.jpa.model.ProductModel;
20
21 import java.util.List;
22 import java.util.Optional;
23
24 public interface ProductService {
25 List<ProductModel> getProducts(int startPage, int itemsPerPage, String sortColumn, String direction);
26 List<ProductModel> getProducts(String catalogId, int startPage, int itemsPerPage, String sortColumn,
27 String direction);
28 List<ProductModel> getProducts();
29 List<ProductModel> getProducts(String catalogId);
30 Optional<ProductModel> getProduct(Long productId);
31 Optional<ProductModel> getProduct(String catalogId, String name);
32 ProductModel saveProduct(ProductModel product);
33 void deleteProduct(Long productId);
34 }