org.company.thesandbox.data.spring.dao
Class ProductDaoImplBase

java.lang.Object
  extended by org.springframework.dao.support.DaoSupport
      extended by org.springframework.orm.hibernate3.support.HibernateDaoSupport
          extended by org.company.thesandbox.data.spring.dao.ProductDaoImplBase
All Implemented Interfaces:
ProductDaoBase, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
ProductDaoImpl

public class ProductDaoImplBase
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements ProductDaoBase

Product Data Access Object (DOA) Implementation. Responsible for Creating, Reading, Updating and Deleting Product objects in the database. All database access is done here.

Author:
Generated by Mod4j

Field Summary
 
Fields inherited from class org.springframework.dao.support.DaoSupport
logger
 
Constructor Summary
ProductDaoImplBase()
           
 
Method Summary
 Product add(Product object)
          Adds a new Product to the database
 void delete(Product object)
          Deletes a Product from the database.
 java.util.List<Product> listAllProducts()
          Selects all Products from the database.
 Product retrieve(long id)
          Retrieves a Product by its ID from the database.
 Product update(Product object)
          Stores/Updates the Product in the database.
 
Methods inherited from class org.springframework.orm.hibernate3.support.HibernateDaoSupport
checkDaoConfig, convertHibernateAccessException, createHibernateTemplate, getHibernateTemplate, getSession, getSession, getSessionFactory, releaseSession, setHibernateTemplate, setSessionFactory
 
Methods inherited from class org.springframework.dao.support.DaoSupport
afterPropertiesSet, initDao
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

ProductDaoImplBase

public ProductDaoImplBase()
Method Detail

retrieve

public Product retrieve(long id)
Description copied from interface: ProductDaoBase
Retrieves a Product by its ID from the database.

Specified by:
retrieve in interface ProductDaoBase
Parameters:
id - id of the Product to retrieve.
Returns:
Product retrieved or null when no Product was found.

add

public Product add(Product object)
Description copied from interface: ProductDaoBase
Adds a new Product to the database

Specified by:
add in interface ProductDaoBase
Parameters:
object - the Product to add to the database.
Returns:
the stored Product.

update

public Product update(Product object)
Description copied from interface: ProductDaoBase
Stores/Updates the Product in the database. Inclusive all its posts.

Specified by:
update in interface ProductDaoBase
Parameters:
object - the Product to store/update
Returns:

delete

public void delete(Product object)
Description copied from interface: ProductDaoBase
Deletes a Product from the database.

Specified by:
delete in interface ProductDaoBase
Parameters:
object - the Product to delete

listAllProducts

public java.util.List<Product> listAllProducts()
Description copied from interface: ProductDaoBase
Selects all Products from the database.

Specified by:
listAllProducts in interface ProductDaoBase
Returns:
a List of all Product objects.


Copyright © 2010. All Rights Reserved.