com.softslate.commerce.daos.customer
Class CustomerDAOBasic

java.lang.Object
  extended bycom.softslate.commerce.daos.core.BaseDAO
      extended bycom.softslate.commerce.daos.customer.CustomerDAOBasic
All Implemented Interfaces:
CustomerDAO, DAOInterface

public class CustomerDAOBasic
extends BaseDAO
implements CustomerDAO

Generic DAO to manage the npcCustomer table of the database.

Author:
David Tobey

Field Summary
private  Customer customer
           
(package private) static org.apache.commons.logging.Log log
           
 
Fields inherited from class com.softslate.commerce.daos.core.BaseDAO
 
Constructor Summary
CustomerDAOBasic()
           
 
Method Summary
 void deleteCustomer()
           
 void deleteCustomer(boolean commit)
           
 Customer getCustomer()
           
 int getMaxCustomerID()
           
 int getUserNameCount()
           
 int getUserNameCount(boolean commit)
           
 void insertCustomer()
           
 void insertCustomer(boolean commit)
           
 java.util.Collection loadAddressCollection()
          Populate a collection of CustomerAddress objects, one for each of the addresses associated with this customer.
 void loadCustomerFromID()
           
 void loadFromUserName()
          Assuming the userName property has been set, queries the database for a customer record that matches.
 void loadFromUserNameAndPassword()
          Assuming the userName and password properties have been set, queries the database for a customer record that matches.
 java.util.Collection loadOrderHistory()
          Populate a collection of Order objects, one for each order in this customer's order history.
 void setCustomer(Customer customer)
           
 void updateCustomer()
           
 void updateCustomer(boolean commit)
           
 void updateCustomerNoPassword()
           
 void updateCustomerNoPassword(boolean commit)
           
 
Methods inherited from class com.softslate.commerce.daos.core.BaseDAO
formatDateTime, getConnection, getDaoFactory, getDataSource, getSettingsBean, getSQL, getSqlMap, initialize, parseDateTime, setConnection, setDaoFactory, setDataSource, setSettingsBean, setSqlMap
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface com.softslate.commerce.daos.core.DAOInterface
getConnection, getDaoFactory, getDataSource, getSettingsBean, getSqlMap, initialize, setConnection, setDaoFactory, setDataSource, setSettingsBean, setSqlMap
 

Field Detail

log

static org.apache.commons.logging.Log log

customer

private Customer customer
Constructor Detail

CustomerDAOBasic

public CustomerDAOBasic()
Method Detail

getCustomer

public Customer getCustomer()
Specified by:
getCustomer in interface CustomerDAO

setCustomer

public void setCustomer(Customer customer)
Specified by:
setCustomer in interface CustomerDAO

loadCustomerFromID

public void loadCustomerFromID()
                        throws java.lang.Exception
Specified by:
loadCustomerFromID in interface CustomerDAO
Throws:
java.lang.Exception

getMaxCustomerID

public int getMaxCustomerID()
                     throws java.lang.Exception
Specified by:
getMaxCustomerID in interface CustomerDAO
Throws:
java.lang.Exception

getUserNameCount

public int getUserNameCount()
                     throws java.lang.Exception
Specified by:
getUserNameCount in interface CustomerDAO
Throws:
java.lang.Exception

getUserNameCount

public int getUserNameCount(boolean commit)
                     throws java.lang.Exception
Specified by:
getUserNameCount in interface CustomerDAO
Throws:
java.lang.Exception

insertCustomer

public void insertCustomer()
                    throws java.lang.Exception
Specified by:
insertCustomer in interface CustomerDAO
Throws:
java.lang.Exception

insertCustomer

public void insertCustomer(boolean commit)
                    throws java.lang.Exception
Specified by:
insertCustomer in interface CustomerDAO
Throws:
java.lang.Exception

updateCustomerNoPassword

public void updateCustomerNoPassword()
                              throws java.lang.Exception
Specified by:
updateCustomerNoPassword in interface CustomerDAO
Throws:
java.lang.Exception

updateCustomerNoPassword

public void updateCustomerNoPassword(boolean commit)
                              throws java.lang.Exception
Specified by:
updateCustomerNoPassword in interface CustomerDAO
Throws:
java.lang.Exception

updateCustomer

public void updateCustomer()
                    throws java.lang.Exception
Specified by:
updateCustomer in interface CustomerDAO
Throws:
java.lang.Exception

updateCustomer

public void updateCustomer(boolean commit)
                    throws java.lang.Exception
Specified by:
updateCustomer in interface CustomerDAO
Throws:
java.lang.Exception

loadFromUserName

public void loadFromUserName()
                      throws java.lang.Exception
Assuming the userName property has been set, queries the database for a customer record that matches.

Specified by:
loadFromUserName in interface CustomerDAO
Throws:
java.lang.Exception

loadFromUserNameAndPassword

public void loadFromUserNameAndPassword()
                                 throws java.lang.Exception
Assuming the userName and password properties have been set, queries the database for a customer record that matches.

Specified by:
loadFromUserNameAndPassword in interface CustomerDAO
Throws:
java.lang.Exception

loadAddressCollection

public java.util.Collection loadAddressCollection()
                                           throws java.lang.Exception
Populate a collection of CustomerAddress objects, one for each of the addresses associated with this customer.

Specified by:
loadAddressCollection in interface CustomerDAO
Throws:
java.lang.Exception

loadOrderHistory

public java.util.Collection loadOrderHistory()
                                      throws java.lang.Exception
Populate a collection of Order objects, one for each order in this customer's order history.

Specified by:
loadOrderHistory in interface CustomerDAO
Throws:
java.lang.Exception

deleteCustomer

public void deleteCustomer()
                    throws java.lang.Exception
Specified by:
deleteCustomer in interface CustomerDAO
Throws:
java.lang.Exception

deleteCustomer

public void deleteCustomer(boolean commit)
                    throws java.lang.Exception
Specified by:
deleteCustomer in interface CustomerDAO
Throws:
java.lang.Exception


Copyright © SoftSlate, Inc. 2003–2005