Class CustomerDAOHibernate
java.lang.Object
com.softslate.commerce.daos.core.BaseDAO
com.softslate.commerce.daos.customer.CustomerDAOHibernate
- All Implemented Interfaces:
DAOInterface
,CustomerDAO
Generic DAO to manage the
sscCustomer
table of the database.- Author:
- David Tobey
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionvoid
void
deleteCustomer
(boolean commit) int
int
getUserNameCount
(boolean commit) void
void
insertCustomer
(boolean commit) Populate a collection ofCustomerAddress
objects, one for each of the addresses associated with this customer.void
void
Populate a collection ofCustomerWishList
objects, one for each of the wish lists associated with this customer.Populate a collection of Maps for each file available for the customer to download.void
Assuming the autoLoginToken has been set, queries the database for a customer record that matches.void
Assuming the userName property has been set, queries the database for a customer record that matches.void
Assuming the userName and password properties have been set, queries the database for a customer record that matches.Populate a collection ofOrder
objects, one for each order in this customer's order history.Return a collection ofOrder
objects, one for each cart this customer has saved.void
setCustomer
(Customer customer) void
void
updateCustomer
(boolean commit) void
updateCustomer
(boolean commit, boolean forcePassword) Methods inherited from class com.softslate.commerce.daos.core.BaseDAO
deleteObject, doWorkToSetConnection, editAssignment, evictCache, formatDateTime, getAppComponents, getAppSettings, getConnection, getDaoFactory, getDAOUtils, getDataSource, getImportExportSQL, getImportExportSqlMap, getInjector, getNamedQuery, getSettings, getSQL, getSqlMap, initialize, insertObject, loadAll, loadAll, loadObject, parseDateTime, setAppComponents, setAppSettings, setConnection, setDaoFactory, setDAOUtils, setDataSource, setImportExportSqlMap, setInjector, setSettings, setSqlMap, updateObject
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
deleteObject, formatDateTime, getAppComponents, getAppSettings, getConnection, getDaoFactory, getDAOUtils, getDataSource, getInjector, getSettings, getSqlMap, initialize, insertObject, loadAll, loadAll, loadObject, parseDateTime, setAppComponents, setAppSettings, setConnection, setDaoFactory, setDAOUtils, setDataSource, setInjector, setSettings, setSqlMap, updateObject
-
Field Details
-
log
static org.apache.commons.logging.Log log -
customer
-
-
Constructor Details
-
CustomerDAOHibernate
public CustomerDAOHibernate()
-
-
Method Details
-
getCustomer
- Specified by:
getCustomer
in interfaceCustomerDAO
-
setCustomer
- Specified by:
setCustomer
in interfaceCustomerDAO
-
loadCustomerFromID
- Specified by:
loadCustomerFromID
in interfaceCustomerDAO
- Throws:
Exception
-
loadPasswordByID
- Throws:
DataAccessException
-
getUserNameCount
- Specified by:
getUserNameCount
in interfaceCustomerDAO
- Throws:
Exception
-
getUserNameCount
- Specified by:
getUserNameCount
in interfaceCustomerDAO
- Throws:
Exception
-
insertCustomer
- Specified by:
insertCustomer
in interfaceCustomerDAO
- Throws:
DataAccessException
-
insertCustomer
- Specified by:
insertCustomer
in interfaceCustomerDAO
- Throws:
DataAccessException
-
updateCustomer
- Specified by:
updateCustomer
in interfaceCustomerDAO
- Throws:
DataAccessException
-
updateCustomer
- Specified by:
updateCustomer
in interfaceCustomerDAO
- Throws:
DataAccessException
-
updateCustomer
- Specified by:
updateCustomer
in interfaceCustomerDAO
- Throws:
DataAccessException
-
loadFromUserName
Assuming the userName property has been set, queries the database for a customer record that matches.- Specified by:
loadFromUserName
in interfaceCustomerDAO
- Throws:
Exception
-
loadFromUserNameAndPassword
Assuming the userName and password properties have been set, queries the database for a customer record that matches.- Specified by:
loadFromUserNameAndPassword
in interfaceCustomerDAO
- Throws:
Exception
-
loadFromAutoLoginToken
Assuming the autoLoginToken has been set, queries the database for a customer record that matches.- Specified by:
loadFromAutoLoginToken
in interfaceCustomerDAO
- Throws:
Exception
-
loadAddressCollection
Populate a collection ofCustomerAddress
objects, one for each of the addresses associated with this customer.- Specified by:
loadAddressCollection
in interfaceCustomerDAO
- Throws:
Exception
-
loadCustomerWishLists
Populate a collection ofCustomerWishList
objects, one for each of the wish lists associated with this customer.- Specified by:
loadCustomerWishLists
in interfaceCustomerDAO
- Throws:
Exception
-
loadOrderHistory
Populate a collection ofOrder
objects, one for each order in this customer's order history.- Specified by:
loadOrderHistory
in interfaceCustomerDAO
- Throws:
Exception
-
loadDownloadFiles
Description copied from interface:CustomerDAO
Populate a collection of Maps for each file available for the customer to download.- Specified by:
loadDownloadFiles
in interfaceCustomerDAO
- Throws:
Exception
-
loadSavedCarts
Return a collection ofOrder
objects, one for each cart this customer has saved.- Specified by:
loadSavedCarts
in interfaceCustomerDAO
- Throws:
Exception
-
deleteCustomer
- Specified by:
deleteCustomer
in interfaceCustomerDAO
- Throws:
DataAccessException
-
deleteCustomer
- Specified by:
deleteCustomer
in interfaceCustomerDAO
- Throws:
DataAccessException
-
loadCustomerByPasswordToken
- Specified by:
loadCustomerByPasswordToken
in interfaceCustomerDAO
- Throws:
Exception
-