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

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.CustomerDaoImplBase
All Implemented Interfaces:
CustomerDaoBase, org.springframework.beans.factory.InitializingBean
Direct Known Subclasses:
CustomerDaoImpl

public class CustomerDaoImplBase
extends org.springframework.orm.hibernate3.support.HibernateDaoSupport
implements CustomerDaoBase

Customer Data Access Object (DOA) Implementation. Responsible for Creating, Reading, Updating and Deleting Customer 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
CustomerDaoImplBase()
           
 
Method Summary
 Customer add(Customer object)
          Adds a new Customer to the database
 void delete(Customer object)
          Deletes a Customer from the database.
 java.util.List<Customer> listAllCustomers()
          Selects all Customers from the database.
 Customer retrieve(long id)
          Retrieves a Customer by its ID from the database.
 Customer update(Customer object)
          Stores/Updates the Customer 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

CustomerDaoImplBase

public CustomerDaoImplBase()
Method Detail

retrieve

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

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

add

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

Specified by:
add in interface CustomerDaoBase
Parameters:
object - the Customer to add to the database.
Returns:
the stored Customer.

update

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

Specified by:
update in interface CustomerDaoBase
Parameters:
object - the Customer to store/update
Returns:

delete

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

Specified by:
delete in interface CustomerDaoBase
Parameters:
object - the Customer to delete

listAllCustomers

public java.util.List<Customer> listAllCustomers()
Description copied from interface: CustomerDaoBase
Selects all Customers from the database.

Specified by:
listAllCustomers in interface CustomerDaoBase
Returns:
a List of all Customer objects.


Copyright © 2010. All Rights Reserved.