net.sf.oness.order.model.facade
Interface OrderFacadeDelegate

All Known Implementing Classes:
OrderSpringFacadeDelegate

public interface OrderFacadeDelegate

Facade that models the service of order management

Version:
$Revision: 1.10 $
Author:
Carlos Sanchez

Method Summary
 DeliveryDocketWithParty createDeliveryDocket(DeliveryDocket deliveryDocket, java.util.Map item)
          Create a delivery docket.
 DeliveryDocketWithParty createDeliveryDocketItems(java.util.Map deliveryDocketItems, java.lang.Long deliveryDocketId)
          Add delivery docket items to a delivery docket.
 void createInvoices(java.util.Collection deliveryDocketIds)
          Create invoices.
 OrderWithParty createOrder(Order order)
          Create an order.
 OrderWithParty createOrderItem(OrderItem orderItem, java.lang.Long orderId)
          Add an order item to an order.
 OrderWithParty createOrderItems(java.util.Collection orderItems, java.lang.Long orderId)
          Add order items to an order.
 void deleteDeliveryDocket(java.lang.Long id)
          Delete a delivery docket
 void deleteOrder(java.lang.Long id)
          Delete an order
 net.sf.oness.common.model.util.PaginatedList findDeliveryDocket(DeliveryDocket deliveryDocket, int firstElement, int maxElements)
          Find delivery dockets
 DeliveryDocketWithParty findDeliveryDocketWithDetails(java.lang.Long id)
          Find a delivery docket.
 net.sf.oness.common.model.util.PaginatedList findInvoice(Invoice invoice, int firstElement, int maxElements)
          Find invoices
 InvoiceWithParty findInvoiceWithDetails(java.lang.Long id)
          Find an invoice.
 net.sf.oness.common.model.util.PaginatedList findOrder(Order order, int firstElement, int maxElements)
          Find orders
 OrderWithParty findOrderWithDetails(java.lang.Long id)
          Find an order.
 DeliveryDocketWithParty updateDeliveryDocket(DeliveryDocket deliveryDocket, java.util.Collection items)
          Update a delivery docket.
 OrderWithParty updateOrder(Order order, java.util.Collection items)
          Update an order.
 

Method Detail

findOrderWithDetails

public OrderWithParty findOrderWithDetails(java.lang.Long id)
Find an order.

Parameters:
id -
Returns:
The order with items
Throws:
org.springframework.dao.DataAccessException

createOrder

public OrderWithParty createOrder(Order order)
Create an order.

Parameters:
order -
Returns:
The order created
Throws:
org.springframework.dao.DataAccessException

updateOrder

public OrderWithParty updateOrder(Order order,
                                  java.util.Collection items)
Update an order.

Parameters:
order -
items -
Returns:
The order updated
Throws:
org.springframework.dao.DataAccessException

findOrder

public net.sf.oness.common.model.util.PaginatedList findOrder(Order order,
                                                              int firstElement,
                                                              int maxElements)
Find orders

Parameters:
order -
firstElement -
maxElements -
Returns:
List of OrderWithParty objects
Throws:
org.springframework.dao.DataAccessException

deleteOrder

public void deleteOrder(java.lang.Long id)
Delete an order

Parameters:
id -
Throws:
org.springframework.dao.DataRetrievalFailureException
org.springframework.dao.DataAccessException

createOrderItem

public OrderWithParty createOrderItem(OrderItem orderItem,
                                      java.lang.Long orderId)
Add an order item to an order. If the product is already in the order the quantity is added.

Parameters:
orderItem -
orderId -
Returns:
The order updated
Throws:
org.springframework.dao.DataAccessException

createOrderItems

public OrderWithParty createOrderItems(java.util.Collection orderItems,
                                       java.lang.Long orderId)
Add order items to an order. If the product is already in the order the quantity is added.

Parameters:
orderItems - Can't contain two items of the same product.
orderId -
Returns:
The order updated
Throws:
org.springframework.dao.DataAccessException

createDeliveryDocket

public DeliveryDocketWithParty createDeliveryDocket(DeliveryDocket deliveryDocket,
                                                    java.util.Map item)
Create a delivery docket.

Parameters:
deliveryDocket -
Returns:
The deliveryDocket created
Throws:
org.springframework.dao.DataAccessException

findDeliveryDocketWithDetails

public DeliveryDocketWithParty findDeliveryDocketWithDetails(java.lang.Long id)
Find a delivery docket.

Parameters:
id -
Returns:
The deliveryDocket with items
Throws:
org.springframework.dao.DataAccessException

createDeliveryDocketItems

public DeliveryDocketWithParty createDeliveryDocketItems(java.util.Map deliveryDocketItems,
                                                         java.lang.Long deliveryDocketId)
Add delivery docket items to a delivery docket.

Parameters:
deliveryDocketItems - orderItem id as key and deliveryDocket as value
deliveryDocketId -
Returns:
The delivery docket updated
Throws:
org.springframework.dao.DataAccessException

findDeliveryDocket

public net.sf.oness.common.model.util.PaginatedList findDeliveryDocket(DeliveryDocket deliveryDocket,
                                                                       int firstElement,
                                                                       int maxElements)
Find delivery dockets

Parameters:
deliveryDocket -
firstElement -
maxElements -
Returns:
List of DeliveryDocketWithParty objects
Throws:
org.springframework.dao.DataAccessException

updateDeliveryDocket

public DeliveryDocketWithParty updateDeliveryDocket(DeliveryDocket deliveryDocket,
                                                    java.util.Collection items)
Update a delivery docket.

Parameters:
deliveryDocket -
items -
Returns:
The deliveryDocket updated
Throws:
org.springframework.dao.DataAccessException

deleteDeliveryDocket

public void deleteDeliveryDocket(java.lang.Long id)
Delete a delivery docket

Parameters:
id -
Throws:
org.springframework.dao.DataRetrievalFailureException
org.springframework.dao.DataAccessException

createInvoices

public void createInvoices(java.util.Collection deliveryDocketIds)
Create invoices.

Parameters:
deliveryDocketIds -
Throws:
org.springframework.dao.DataAccessException

findInvoiceWithDetails

public InvoiceWithParty findInvoiceWithDetails(java.lang.Long id)
Find an invoice.

Parameters:
id -
Returns:
The invoice with items
Throws:
org.springframework.dao.DataAccessException

findInvoice

public net.sf.oness.common.model.util.PaginatedList findInvoice(Invoice invoice,
                                                                int firstElement,
                                                                int maxElements)
Find invoices

Parameters:
invoice -
firstElement -
maxElements -
Returns:
List of InvoiceWithParty objects
Throws:
org.springframework.dao.DataAccessException


Copyright © 2003-2005 ONess Project. All Rights Reserved.