com.softslate.commerce.daos.order
Class OrderDAOHibernate

java.lang.Object
  extended by com.softslate.commerce.daos.core.BaseDAO
      extended by com.softslate.commerce.daos.order.OrderDAOHibernate
All Implemented Interfaces:
DAOInterface, OrderDAO

public class OrderDAOHibernate
extends BaseDAO
implements OrderDAO

Generic DAO to manage the sscOrder table of the database.

Author:
David Tobey

Field Summary
(package private) static org.apache.commons.logging.Log log
           
private  Order order
           
 
Constructor Summary
OrderDAOHibernate()
           
 
Method Summary
 void deleteOrder()
           
 void deleteOrder(boolean commit)
           
 int getMaxOrderNumber()
           
 Order getOrder()
           
 void initializeOrder(Order order)
           
 java.lang.Object insertObject(java.lang.Object object, boolean commit)
           
 void insertOrder()
           
 void insertOrder(boolean commit)
           
 void loadFromNumberAndCustomerID()
          Assuming the orderNumber and customerID properties have been set, load the Order object from the database.
 java.lang.Object loadObject(java.lang.Object object)
           
 void loadOrderFromID()
           
 void loadOrderFromNumber()
           
 void loadPreviousOrder()
          Assuming the orderID and customerID properties have been set, load the Order object from the database.
 void loadSavedCart()
          Assuming the orderID and customerID properties have been set, load the Order object from the database.
 void loadSavedCartFromToken()
           
 void setOrder(Order order)
           
 java.lang.Object updateObject(java.lang.Object object, boolean commit)
           
 void updateOrder()
           
 void updateOrder(boolean commit)
           
 
Methods inherited from class com.softslate.commerce.daos.core.BaseDAO
deleteObject, evictCache, formatDateTime, getAppComponents, getAppSettings, getConnection, getDaoFactory, getDAOUtils, getDataSource, getImportExportSQL, getImportExportSqlMap, getNamedQuery, getSettings, getSQL, getSqlMap, initialize, loadAll, loadAll, parseDateTime, setAppComponents, setAppSettings, setConnection, setDaoFactory, setDAOUtils, setDataSource, setImportExportSqlMap, setSettings, 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
deleteObject, getAppComponents, getAppSettings, getConnection, getDaoFactory, getDAOUtils, getDataSource, getSettings, getSqlMap, initialize, loadAll, loadAll, setAppComponents, setAppSettings, setConnection, setDaoFactory, setDAOUtils, setDataSource, setSettings, setSqlMap
 

Field Detail

log

static org.apache.commons.logging.Log log

order

private Order order
Constructor Detail

OrderDAOHibernate

public OrderDAOHibernate()
Method Detail

getOrder

public Order getOrder()
Specified by:
getOrder in interface OrderDAO

setOrder

public void setOrder(Order order)
Specified by:
setOrder in interface OrderDAO

loadOrderFromID

public void loadOrderFromID()
                     throws java.lang.Exception
Specified by:
loadOrderFromID in interface OrderDAO
Throws:
java.lang.Exception

loadOrderFromNumber

public void loadOrderFromNumber()
                         throws java.lang.Exception
Specified by:
loadOrderFromNumber in interface OrderDAO
Throws:
java.lang.Exception

loadObject

public java.lang.Object loadObject(java.lang.Object object)
                            throws java.lang.Exception
Specified by:
loadObject in interface DAOInterface
Overrides:
loadObject in class BaseDAO
Throws:
java.lang.Exception

getMaxOrderNumber

public int getMaxOrderNumber()
                      throws java.lang.Exception
Specified by:
getMaxOrderNumber in interface OrderDAO
Throws:
java.lang.Exception

insertOrder

public void insertOrder()
                 throws DataAccessException
Specified by:
insertOrder in interface OrderDAO
Throws:
DataAccessException

insertOrder

public void insertOrder(boolean commit)
                 throws DataAccessException
Specified by:
insertOrder in interface OrderDAO
Throws:
DataAccessException

insertObject

public java.lang.Object insertObject(java.lang.Object object,
                                     boolean commit)
                              throws java.lang.Exception
Specified by:
insertObject in interface DAOInterface
Overrides:
insertObject in class BaseDAO
Throws:
java.lang.Exception

updateOrder

public void updateOrder()
                 throws java.lang.Exception
Specified by:
updateOrder in interface OrderDAO
Throws:
java.lang.Exception

updateOrder

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

updateObject

public java.lang.Object updateObject(java.lang.Object object,
                                     boolean commit)
                              throws java.lang.Exception
Specified by:
updateObject in interface DAOInterface
Overrides:
updateObject in class BaseDAO
Throws:
java.lang.Exception

loadFromNumberAndCustomerID

public void loadFromNumberAndCustomerID()
                                 throws java.lang.Exception
Description copied from interface: OrderDAO
Assuming the orderNumber and customerID properties have been set, load the Order object from the database.

Specified by:
loadFromNumberAndCustomerID in interface OrderDAO
Throws:
java.lang.Exception

loadSavedCart

public void loadSavedCart()
                   throws java.lang.Exception
Description copied from interface: OrderDAO
Assuming the orderID and customerID properties have been set, load the Order object from the database. Used to pick up saved carts.

Specified by:
loadSavedCart in interface OrderDAO
Throws:
java.lang.Exception

loadSavedCartFromToken

public void loadSavedCartFromToken()
                            throws java.lang.Exception
Specified by:
loadSavedCartFromToken in interface OrderDAO
Throws:
java.lang.Exception

loadPreviousOrder

public void loadPreviousOrder()
                       throws java.lang.Exception
Description copied from interface: OrderDAO
Assuming the orderID and customerID properties have been set, load the Order object from the database. Used to pick up reordered orders.

Specified by:
loadPreviousOrder in interface OrderDAO
Throws:
java.lang.Exception

deleteOrder

public void deleteOrder()
                 throws DataAccessException
Specified by:
deleteOrder in interface OrderDAO
Throws:
DataAccessException

deleteOrder

public void deleteOrder(boolean commit)
                 throws DataAccessException
Specified by:
deleteOrder in interface OrderDAO
Throws:
DataAccessException

initializeOrder

public void initializeOrder(Order order)


Copyright © SoftSlate, LLC 2003–2005