1 package org.springframework.samples.jpetstore.domain.logic; 2 3 import java.util.List ; 4 5 import org.springframework.samples.jpetstore.domain.Account; 6 import org.springframework.samples.jpetstore.domain.Category; 7 import org.springframework.samples.jpetstore.domain.Item; 8 import org.springframework.samples.jpetstore.domain.Order; 9 import org.springframework.samples.jpetstore.domain.Product; 10 11 17 public interface PetStoreFacade { 18 19 Account getAccount(String username); 20 21 Account getAccount(String username, String password); 22 23 void insertAccount(Account account); 24 25 void updateAccount(Account account); 26 27 List getUsernameList(); 28 29 30 List getCategoryList(); 31 32 Category getCategory(String categoryId); 33 34 35 List getProductListByCategory(String categoryId); 36 37 List searchProductList(String keywords); 38 39 Product getProduct(String productId); 40 41 42 List getItemListByProduct(String productId); 43 44 Item getItem(String itemId); 45 46 boolean isItemInStock(String itemId); 47 48 49 void insertOrder(Order order); 50 51 Order getOrder(int orderId); 52 53 List getOrdersByUsername(String username); 54 55 } 56 | Popular Tags |