catalog.model.dao
Interface CatalogDao

All Known Implementing Classes:
CatalogDaoHibernateImpl

public interface CatalogDao

Catalog DAO interface.

This class contains catalog management related data access logic.

Author:
Derek Y. Shen

Method Summary
 void deleteProduct(Product product)
          Delete product.
 java.util.List getAllCategories()
          Get all categories.
 java.util.List getAllProducts()
          Get all the products.
 Category getCategory(java.lang.String id)
          Get category by category id.
 Product getProduct(java.lang.String id)
          Get product by product id.
 Product saveProduct(Product product)
          Save the product.
 void updateProduct(Product product)
          Update product.
 

Method Detail

saveProduct

public Product saveProduct(Product product)
Save the product.

Parameters:
product - the product to be saved
Returns:
the product saved

getProduct

public Product getProduct(java.lang.String id)
Get product by product id.

Parameters:
id - the product id
Returns:
the product associated with the product id

updateProduct

public void updateProduct(Product product)
Update product.

Parameters:
product - the product to be updated

deleteProduct

public void deleteProduct(Product product)
Delete product.

Parameters:
product - the product to be deleted

getAllProducts

public java.util.List getAllProducts()
Get all the products.

Returns:
a list of all products

getCategory

public Category getCategory(java.lang.String id)
Get category by category id.

Parameters:
id - The category id
Returns:
the category associated with the category id

getAllCategories

public java.util.List getAllCategories()
Get all categories.

Returns:
a list of all categories


Copyright (c) 2004 The JCatalog Project.