© 2001 BEA Systems, Inc.

com.beasys.commerce.ebusiness.order
Interface OrderManager


public interface OrderManager

The OrderManagerBean is a session bean that isolates the JSP type calls from dealing directly with Order Entity Beans in a piece-meal fashion and improves performance by keeping the calls on the EJB sides.
Its main purpose is to create an Order and to retrieve OrderValue's using a variety of criteria, customerPK, a date range, a SKU, a Status.
The returned objects on those finder methods may be either straight collection with all the orderValue objects filled, or a more sophisticated ScrollableModel which caches the PK and a few orderValues only.
Finally, the OrderManagerBean deals with getting and setting an Order's status, and helps the JSP presentation by providing the only possible statuses an Order can move to.

See Also:
OrderValue, StateMachine, com.beasys.commerce.util.ScrollableModel

Method Summary
 javax.ejb.Handle createOrder(OrderPk orderPK, com.beasys.commerce.ebusiness.order.OrderValue orderValue, Quote adjustments)
          Creates an order using a previously generated primary key and an order value via a Handle.
 java.util.Collection findByCustomer(com.beasys.commerce.ebusiness.customer.CustomerPk customerPK)
          Finds the overValues associated with a customer and returns a collection
 com.beasys.commerce.ebusiness.util.ScrollableModel findByCustomer(com.beasys.commerce.ebusiness.customer.CustomerPk customerPK, int pageSize)
          Finds the overValues associated with a customer and returns a scrollable model
 java.util.Collection findByDates(java.sql.Date startDate, java.sql.Date endDate)
          Finds the overValues associated with a date range and returns a collection
 com.beasys.commerce.ebusiness.util.ScrollableModel findByDates(java.sql.Date startDate, java.sql.Date endDate, int pageSize)
          Finds the overValues associated with a date range and returns a scrollable model
 com.beasys.commerce.ebusiness.order.OrderValue findByPK(OrderPk orderPK)
          Finds the order value associated with a particular primary key, a basic finder method.
 java.util.Collection findBySKU(java.lang.String SKU)
          Finds the overValues associated with a SKU and returns a collection
 com.beasys.commerce.ebusiness.util.ScrollableModel findBySKU(java.lang.String sku, int pageSize)
          Finds the overValues associated with a SKU and returns a scrollable model
 java.util.Collection findByStatus(java.lang.String status)
          Finds the overValues associated with a status and returns a collection
 com.beasys.commerce.ebusiness.util.ScrollableModel findByStatus(java.lang.String status, int pageSize)
          Finds the overValues associated with a status and returns a scrollable model
 java.lang.String getOrderStatus(OrderPk orderPK)
          Gets the status of an order based on its PK
 java.lang.String[] getValidNewStatuses(OrderPk orderPK)
          Gets all the valid status an order can move to.
 void queryOrderAdjusments(OrderPk orderPK, com.beasys.commerce.ebusiness.order.OrderValue orderValue)
          this call fills an orderValue with the adjustments that are associated with it.
 void setOrderStatus(OrderPk orderPK, java.lang.String status)
          Sets an order status
 

Method Detail

createOrder

public javax.ejb.Handle createOrder(OrderPk orderPK,
                                    com.beasys.commerce.ebusiness.order.OrderValue orderValue,
                                    Quote adjustments)
                             throws java.rmi.RemoteException
Creates an order using a previously generated primary key and an order value via a Handle.
Parameters:
orderPK -  
orderValue, - a value object from which to create an order entity
adjustments, - the audit trail to persist with the order.
Returns:
the handle over the order entity bean.

findByPK

public com.beasys.commerce.ebusiness.order.OrderValue findByPK(OrderPk orderPK)
                                                        throws java.rmi.RemoteException
Finds the order value associated with a particular primary key, a basic finder method.
Parameters:
orderPK, - the primary key for an order entity bean.
Returns:
the corresponding order value object.

findByCustomer

public com.beasys.commerce.ebusiness.util.ScrollableModel findByCustomer(com.beasys.commerce.ebusiness.customer.CustomerPk customerPK,
                                                                         int pageSize)
                                                                  throws java.rmi.RemoteException
Finds the overValues associated with a customer and returns a scrollable model
Parameters:
CustomerPk -  
pageSize, - the size of a page of cached order values
Returns:
the ScrollableModel that manages the corresponding Order values

findByCustomer

public java.util.Collection findByCustomer(com.beasys.commerce.ebusiness.customer.CustomerPk customerPK)
                                    throws java.rmi.RemoteException
Finds the overValues associated with a customer and returns a collection
Parameters:
CustomerPk -  
Returns:
the Collection that manages the corresponding Order values

findByStatus

public com.beasys.commerce.ebusiness.util.ScrollableModel findByStatus(java.lang.String status,
                                                                       int pageSize)
                                                                throws java.rmi.RemoteException
Finds the overValues associated with a status and returns a scrollable model
Parameters:
status, - e.g. "Authorized"
pageSize, - the size of a page of cached order values
Returns:
the ScrollableModel that manages the corresponding Order values

findByStatus

public java.util.Collection findByStatus(java.lang.String status)
                                  throws java.rmi.RemoteException
Finds the overValues associated with a status and returns a collection
Parameters:
status, - e.g. "Authorized"
Returns:
the collection that manages the corresponding Order values

findBySKU

public java.util.Collection findBySKU(java.lang.String SKU)
                               throws java.rmi.RemoteException
Finds the overValues associated with a SKU and returns a collection
Parameters:
sku, - e.g. "C94E97"
Returns:
the collection that manages the corresponding Order values

findBySKU

public com.beasys.commerce.ebusiness.util.ScrollableModel findBySKU(java.lang.String sku,
                                                                    int pageSize)
                                                             throws java.rmi.RemoteException
Finds the overValues associated with a SKU and returns a scrollable model
Parameters:
sku, - e.g. "C94E97"
pageSize, - the size of a page of cached order values
Returns:
the ScrollableModel that manages the corresponding Order values

findByDates

public com.beasys.commerce.ebusiness.util.ScrollableModel findByDates(java.sql.Date startDate,
                                                                      java.sql.Date endDate,
                                                                      int pageSize)
                                                               throws java.rmi.RemoteException
Finds the overValues associated with a date range and returns a scrollable model
Parameters:
startDate - of the date range
endDate - of the date range
pageSize, - the size of a page of cached order values
Returns:
the ScrollableModel that manages the corresponding Order values

findByDates

public java.util.Collection findByDates(java.sql.Date startDate,
                                        java.sql.Date endDate)
                                 throws java.rmi.RemoteException
Finds the overValues associated with a date range and returns a collection
Parameters:
startDate - of the date range
endDate - of the date range
Returns:
the collection that manages the corresponding Order values

getOrderStatus

public java.lang.String getOrderStatus(OrderPk orderPK)
                                throws java.rmi.RemoteException
Gets the status of an order based on its PK
Parameters:
orderPK -  
Returns:
the status as a String

setOrderStatus

public void setOrderStatus(OrderPk orderPK,
                           java.lang.String status)
                    throws java.rmi.RemoteException
Sets an order status
Parameters:
orderPK -  
status -  
Returns:
void

getValidNewStatuses

public java.lang.String[] getValidNewStatuses(OrderPk orderPK)
                                       throws java.rmi.RemoteException
Gets all the valid status an order can move to.
Parameters:
orderPK -  
Returns:
a String array, one string per valid new status

queryOrderAdjusments

public void queryOrderAdjusments(OrderPk orderPK,
                                 com.beasys.commerce.ebusiness.order.OrderValue orderValue)
                          throws java.rmi.RemoteException
this call fills an orderValue with the adjustments that are associated with it.
Parameters:
orderPk, - the order primary key.
orderValue, - the order value to fill with adjustments

© 2001 BEA Systems, Inc.

Copyright © 2001 BEA Systems, Inc. All Rights Reserved