⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 catalogservice.java

📁 少有的JSf+Spring+Hibernate的网上购物车,适合要用jsf做项目的同仁参考
💻 JAVA
字号:
/*
 * JCatalog Project
 */
package catalog.model.service;

import java.util.List;
//
import catalog.model.businessobject.Product;
import catalog.model.businessobject.Category;
import catalog.model.exception.CatalogException;

/**
 * The catalog business service interface.
 * <p>
 * This class contains catalog management related businss logic.
 * 
 * @author <a href="mailto:derek_shen@hotmail.com">Derek Y. Shen</a>
 */
public interface CatalogService {
	/**
	 * Save the product.
	 * 
	 * @param product the product to be saved
	 * @return the product saved
	 * @throws CatalogException
	 */
	public Product saveProduct(Product product) throws CatalogException;

	/**
	 * Update product.
	 * 
	 * @param product the product to be updated
	 * @throws CatalogException
	 */
	public void updateProduct(Product product) throws CatalogException;
	
	/**
	 * Delete product.
	 * 
	 * @param product the product to be deleted
	 * @throws CatalogException
	 */
	public void deleteProduct(Product product) throws CatalogException;
	
	/**
	 * Get product by product id.
	 * @param productId the product id
	 * @return the product associated with the product id
	 * @throws CatalogException
	 */
	public Product getProduct(String productId) throws CatalogException;
	
	/**
	 * Get category by id.
	 * 
	 * @param categoryId the category id
	 * @return the category associated with the category id
	 * @throws CatalogException
	 */
	public Category getCategory(String categoryId) throws CatalogException;
	
	/**
	 * Get all products.
	 * 
	 * @return a list with all products
	 * @throws CatalogException
	 */
	public List getAllProducts() throws CatalogException;
	
	/**
	 * Get all categories.
	 * 
	 * @return a list with all categories
	 * @throws CatalogException
	 */
	public List getAllCategories() throws CatalogException;
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -