Interface OrderDao

All Known Implementing Classes:
OrderDaoImpl

public interface OrderDao
  • Method Details

    • readOrderById

      Order readOrderById(Long orderId)
    • readOrderByIdIgnoreCache

      Order readOrderByIdIgnoreCache(Long orderId)
    • readOrdersByIds

      List<Order> readOrdersByIds(List<Long> orderIds)
    • readBatchOrders

      List<Order> readBatchOrders(int start, int pageSize, List<OrderStatus> statuses)
      Reads a batch list of orders from the DB. The status is optional and can be null. If no status is provided, then all order will be read. Otherwise, only orders with that status will be read.
      Parameters:
      start -
      pageSize -
      statuses -
      Returns:
    • readBatchOrdersFromLastID

      List<Order> readBatchOrdersFromLastID(Long lastID, int pageSize, List<OrderStatus> statuses)
      Reads a batch list of orders from the DB starting at the ID passed in. The lookup sorts by ID so the proper starting point will be used. The status is optional and can be null. If no status is provided, then all order will be read. Otherwise, only orders with that status will be read.
      Parameters:
      lastID -
      pageSize -
      statuses -
      Returns:
    • readOrderById

      Order readOrderById(Long orderId, boolean refresh)
    • readOrderByExternalId

      Order readOrderByExternalId(String orderExternalId)
    • readOrdersForCustomer

      List<Order> readOrdersForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer, OrderStatus orderStatus)
    • readOrdersForCustomer

      List<Order> readOrdersForCustomer(Long id)
    • readNamedOrderForCustomer

      Order readNamedOrderForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer, String name)
    • readCartForCustomer

      Order readCartForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
    • save

      Order save(Order order)
    • delete

      void delete(Order order)
    • submitOrder

      Order submitOrder(Order cartOrder)
    • create

      Order create()
    • refresh

      void refresh(Order order)
    • createNewCartForCustomer

      Order createNewCartForCustomer(org.broadleafcommerce.profile.core.domain.Customer customer)
    • readOrderByOrderNumber

      Order readOrderByOrderNumber(String orderNumber)
    • readOrdersByDateRange

      List<Order> readOrdersByDateRange(Date startDate, Date endDate)
    • readOrdersOlderThanDaysCount

      List<Order> readOrdersOlderThanDaysCount(Integer daysCount, Integer batchSize)
    • readOrdersForCustomersInDateRange

      List<Order> readOrdersForCustomersInDateRange(List<Long> customerIds, Date startDate, Date endDate)
    • updatePrices

      Order updatePrices(Order order)
    • acquireLock

      boolean acquireLock(Order order)
      This method will attempt to update the OrderLock object table for the given order to mark it as locked, provided the OrderLock record for the given order was not already locked. It will return true or false depending on whether or not the lock was able to be acquired.
      Parameters:
      order -
      Returns:
      true if the lock was acquired, false otherwise
    • releaseLock

      boolean releaseLock(Order order)
      Releases the lock for the given order. Note that this method will release the lock for the order whether or not the caller was the current owner of the lock. As such, callers of this method should take care to ensure they hold the lock before attempting to release it.
      Parameters:
      order -
      Returns:
      true if the lock was successfully released, false otherwise
    • readOrdersByEmail

      List<Order> readOrdersByEmail(String email)
    • readNumberOfOrders

      Long readNumberOfOrders()