Class OrderGatewayDAOHibernate
java.lang.Object
com.softslate.commerce.daos.core.BaseDAO
com.softslate.commerce.daos.core.BaseAdminGatewayDAOHibernate
com.softslate.commerce.daos.order.OrderGatewayDAOHibernate
- All Implemented Interfaces:
DAOInterface,OrderGatewayDAO
public class OrderGatewayDAOHibernate
extends BaseAdminGatewayDAOHibernate
implements OrderGatewayDAO
Generic DAO that runs miscellaneous queries related to orders.
- Author:
- David Tobey
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoiddeactivateProducts(boolean commit, Collection productsToDeactivate) voiddecrementSKUs(boolean commit, Collection skusToDecrement) intdeleteIncompleteOrders(boolean commit, Map parameters) protected intdeleteIncompleteOrdersWhileIncrementingInventory(boolean commit, Map parameters) intdeleteOrderDiscounts(boolean commit, int orderID) editDeleteOrders(Map parameters, BusinessObjectFactory bof) getDiscountsBySkuIDs(Collection skuIDs) getGlobalDiscounts(Collection couponCodes) getPreviousOrderTotal(int customerID) getProductInfoFromCodes(String[] productCodeArray) getTimesUsedByCustomer(int discountID, int customerID) voidIncrements all the SKUs associated with the order items in a given order by the quantity of the item.voidincrementSKUs(boolean commit, OrderItem orderItem) voidinsertOrderAndDelivery(Order order, OrderDelivery orderDelivery) voidinsertOrderNumber(OrderNumber orderNumber, boolean commit) loadAbandonedCartOrders(String startDate, String endDate, String prevOrdersDate) loadCompletedOrdersByDateRange(String startDate, String endDate, Collection<String> ignoreStatuses) loadCompletedOrdersByLastModifiedAndStatuses(String startDate, String endDate, Collection<String> currentStatuses) loadExport(String startDate, String endDate, boolean allOrders, int firstID, int lastID) loadGiftCertificates(Collection couponCodes) loadIncompleteOrdersWithPayments(Map parameters) intloadMonthlySalesReport(String startDate, String endDate) loadOrdersAndCount(Map parameters) loadSalesByProductReport(String startDate, String endDate, Integer[] productIDs) loadShippingDiscounts(Collection couponCodes) loadStatesAndCountries(StatesAndCountries statesAndCountries) voidmarkOrderComplete(Order order, Map parameters) postChangedItemEvent(Object item, Map parameters, BusinessObjectFactory bof) postChangingItemEvent(Object item, Map parameters, BusinessObjectFactory bof) org.hibernate.CriteriaprocessCommonCriteria(org.hibernate.Criteria crit, Map parameters) voidprocessOrderComplete(Order order, Map parameters) voidprocessOrderItems(User user, Collection newOrderItems, Map parameters) voidremoveOrderItem(Order order, OrderDelivery orderDelivery, OrderItem orderItem) voidupdateOrderAndDelivery(boolean commit, Order order, OrderDelivery orderDelivery) Methods inherited from class com.softslate.commerce.daos.core.BaseAdminGatewayDAOHibernate
editDeleteAssignments, editDeleteItems, incomingPropertiesByIndex, loadItems, loadItemsAndCount, loadItemsCount, loadItemsFromIDs, setPropertiesDynamicallyMethods 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, updateObjectMethods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, waitMethods 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
-
-
Constructor Details
-
OrderGatewayDAOHibernate
public OrderGatewayDAOHibernate()
-
-
Method Details
-
loadStatesAndCountries
public StatesAndCountries loadStatesAndCountries(StatesAndCountries statesAndCountries) throws DataAccessException - Specified by:
loadStatesAndCountriesin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
loadDashboardStatistics
- Specified by:
loadDashboardStatisticsin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
loadIncompleteOrdersStatistics
- Specified by:
loadIncompleteOrdersStatisticsin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
deleteIncompleteOrders
- Specified by:
deleteIncompleteOrdersin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
deleteIncompleteOrdersWhileIncrementingInventory
protected int deleteIncompleteOrdersWhileIncrementingInventory(boolean commit, Map parameters) throws DataAccessException - Throws:
DataAccessException
-
insertOrderAndDelivery
- Specified by:
insertOrderAndDeliveryin interfaceOrderGatewayDAO- Throws:
Exception
-
getProductInfoFromCodes
- Specified by:
getProductInfoFromCodesin interfaceOrderGatewayDAO- Throws:
Exception
-
processOrderItems
- Specified by:
processOrderItemsin interfaceOrderGatewayDAO- Throws:
Exception
-
decrementSKUs
- Throws:
Exception
-
incrementSKUs
- Throws:
Exception
-
incrementOrderSKUs
Increments all the SKUs associated with the order items in a given order by the quantity of the item. Used to refresh the SKU inventory levels when incomplete orders are deleted, if the inventory decrement behavior is set to decrement upon adding items to the cart.- Parameters:
o- TheOrderbeing processed.- Throws:
Exception
-
deactivateProducts
- Throws:
Exception
-
removeOrderItem
public void removeOrderItem(Order order, OrderDelivery orderDelivery, OrderItem orderItem) throws Exception - Specified by:
removeOrderItemin interfaceOrderGatewayDAO- Throws:
Exception
-
updateOrderAndDelivery
public void updateOrderAndDelivery(boolean commit, Order order, OrderDelivery orderDelivery) throws Exception - Specified by:
updateOrderAndDeliveryin interfaceOrderGatewayDAO- Throws:
Exception
-
loadOrdersAndCount
- Specified by:
loadOrdersAndCountin interfaceOrderGatewayDAO- Throws:
Exception
-
editDeleteOrders
- Specified by:
editDeleteOrdersin interfaceOrderGatewayDAO- Throws:
Exception
-
processCommonCriteria
- Overrides:
processCommonCriteriain classBaseAdminGatewayDAOHibernate
-
postChangingItemEvent
public Map postChangingItemEvent(Object item, Map parameters, BusinessObjectFactory bof) throws Exception - Overrides:
postChangingItemEventin classBaseAdminGatewayDAOHibernate- Throws:
Exception
-
postChangedItemEvent
public Map postChangedItemEvent(Object item, Map parameters, BusinessObjectFactory bof) throws Exception - Overrides:
postChangedItemEventin classBaseAdminGatewayDAOHibernate- Throws:
Exception
-
processOrderComplete
- Specified by:
processOrderCompletein interfaceOrderGatewayDAO- Throws:
Exception
-
insertOrderNumber
- Specified by:
insertOrderNumberin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
markOrderComplete
- Specified by:
markOrderCompletein interfaceOrderGatewayDAO- Throws:
Exception
-
deleteOrderDiscounts
- Specified by:
deleteOrderDiscountsin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
getDiscountsBySkuIDs
- Specified by:
getDiscountsBySkuIDsin interfaceOrderGatewayDAO- Throws:
Exception
-
getPreviousOrderTotal
- Specified by:
getPreviousOrderTotalin interfaceOrderGatewayDAO- Throws:
Exception
-
getTimesUsedByCustomer
- Specified by:
getTimesUsedByCustomerin interfaceOrderGatewayDAO- Throws:
Exception
-
getGlobalDiscounts
- Specified by:
getGlobalDiscountsin interfaceOrderGatewayDAO- Throws:
Exception
-
getGlobalDiscounts
- Specified by:
getGlobalDiscountsin interfaceOrderGatewayDAO- Throws:
Exception
-
loadShippingDiscounts
- Throws:
Exception
-
loadShippingDiscounts
- Specified by:
loadShippingDiscountsin interfaceOrderGatewayDAO- Throws:
Exception
-
loadGiftCertificates
- Specified by:
loadGiftCertificatesin interfaceOrderGatewayDAO- Throws:
Exception
-
loadExport
public Collection loadExport(String startDate, String endDate, boolean allOrders, int firstID, int lastID) throws Exception - Specified by:
loadExportin interfaceOrderGatewayDAO- Throws:
Exception
-
loadSalesByProductReport
public Collection loadSalesByProductReport(String startDate, String endDate, Integer[] productIDs) throws DataAccessException - Specified by:
loadSalesByProductReportin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
loadMonthlySalesReport
public Collection loadMonthlySalesReport(String startDate, String endDate) throws DataAccessException - Specified by:
loadMonthlySalesReportin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
loadMaxOrderID
- Specified by:
loadMaxOrderIDin interfaceOrderGatewayDAO- Throws:
Exception
-
loadIncompleteOrdersWithPayments
- Specified by:
loadIncompleteOrdersWithPaymentsin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
loadCompletedOrdersByDateRange
public Collection<Order> loadCompletedOrdersByDateRange(String startDate, String endDate, Collection<String> ignoreStatuses) throws DataAccessException - Specified by:
loadCompletedOrdersByDateRangein interfaceOrderGatewayDAO- Throws:
DataAccessException
-
loadAbandonedCartOrders
public Collection<Order> loadAbandonedCartOrders(String startDate, String endDate, String prevOrdersDate) throws DataAccessException - Specified by:
loadAbandonedCartOrdersin interfaceOrderGatewayDAO- Throws:
DataAccessException
-
loadCompletedOrdersByLastModifiedAndStatuses
public Collection<Order> loadCompletedOrdersByLastModifiedAndStatuses(String startDate, String endDate, Collection<String> currentStatuses) throws DataAccessException - Specified by:
loadCompletedOrdersByLastModifiedAndStatusesin interfaceOrderGatewayDAO- Throws:
DataAccessException
-