catalog.model.dao.hibernate
Class CatalogDaoHibernateImpl

java.lang.Object
  extended byorg.springframework.orm.hibernate.support.HibernateDaoSupport
      extended bycatalog.model.dao.hibernate.CatalogDaoHibernateImpl
All Implemented Interfaces:
CatalogDao, org.springframework.beans.factory.InitializingBean

public class CatalogDaoHibernateImpl
extends org.springframework.orm.hibernate.support.HibernateDaoSupport
implements CatalogDao

The Hibernate implementation of the CatalogDao.

Author:
Derek Y. Shen
See Also:
CatalogDao

Field Summary
 
Fields inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
logger
 
Constructor Summary
CatalogDaoHibernateImpl()
          Default constructor.
 
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.
 
Methods inherited from class org.springframework.orm.hibernate.support.HibernateDaoSupport
afterPropertiesSet, closeSessionIfNecessary, convertHibernateAccessException, getHibernateTemplate, getSession, getSession, getSessionFactory, initDao, setHibernateTemplate, setSessionFactory
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

CatalogDaoHibernateImpl

public CatalogDaoHibernateImpl()
Default constructor.

Method Detail

saveProduct

public Product saveProduct(Product product)
Description copied from interface: CatalogDao
Save the product.

Specified by:
saveProduct in interface CatalogDao
Parameters:
product - the product to be saved
Returns:
the product saved
See Also:
CatalogDao.saveProduct(Product)

getProduct

public Product getProduct(java.lang.String id)
Description copied from interface: CatalogDao
Get product by product id.

Specified by:
getProduct in interface CatalogDao
Parameters:
id - the product id
Returns:
the product associated with the product id
See Also:
CatalogDao.getProduct(String)

updateProduct

public void updateProduct(Product product)
Description copied from interface: CatalogDao
Update product.

Specified by:
updateProduct in interface CatalogDao
Parameters:
product - the product to be updated
See Also:
CatalogDao.updateProduct(Product)

deleteProduct

public void deleteProduct(Product product)
Description copied from interface: CatalogDao
Delete product.

Specified by:
deleteProduct in interface CatalogDao
Parameters:
product - the product to be deleted
See Also:
CatalogDao.deleteProduct(Product)

getAllProducts

public java.util.List getAllProducts()
Description copied from interface: CatalogDao
Get all the products.

Specified by:
getAllProducts in interface CatalogDao
Returns:
a list of all products
See Also:
CatalogDao.getAllProducts()

getCategory

public Category getCategory(java.lang.String id)
Description copied from interface: CatalogDao
Get category by category id.

Specified by:
getCategory in interface CatalogDao
Parameters:
id - The category id
Returns:
the category associated with the category id
See Also:
CatalogDao.getCategory(String)

getAllCategories

public java.util.List getAllCategories()
Description copied from interface: CatalogDao
Get all categories.

Specified by:
getAllCategories in interface CatalogDao
Returns:
a list of all categories
See Also:
CatalogDao.getAllCategories()


Copyright (c) 2004 The JCatalog Project.