OrderManager Interface

com.beasys.commerce.ebusiness.order
OrderManager Interface

public interface OrderManager

    extends EJBObject

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.
stereotype SessionBean
homeInterface com.beasys.commerce.ebusiness.order.OrderManagerHome
remoteInterface com.beasys.commerce.ebusiness.order.OrderManager

Related Topics

OrderValue
StateMachine
ScrollableModel


All Superinterfaces
EJBObject, Remote

Method Summary

public Handle
createOrder(OrderPk orderPK, OrderValue orderValue, Quote adjustments)
Creates an order using a previously generated primary key and an order value via a Handle.
public ScrollableModel
findByCustomer(CustomerPk customerPK, int pageSize)
Finds the overValues associated with a customer and returns a scrollable model
public Collection
findByCustomer(CustomerPk customerPK)
Finds the overValues associated with a customer and returns a collection
public ScrollableModel
findByDates(Date startDate, Date endDate, int pageSize)
Finds the overValues associated with a date range and returns a scrollable model
public Collection
findByDates(Date startDate, Date endDate)
Finds the overValues associated with a date range and returns a collection
public OrderValue
findByPK(OrderPk orderPK)
Finds the order value associated with a particular primary key, a basic finder method.
public Collection
findBySKU(String SKU)
Finds the overValues associated with a SKU and returns a collection
public ScrollableModel
findBySKU(String sku, int pageSize)
Finds the overValues associated with a SKU and returns a scrollable model
public ScrollableModel
findByStatus(String status, int pageSize)
Finds the overValues associated with a status and returns a scrollable model
public Collection
findByStatus(String status)
Finds the overValues associated with a status and returns a collection
public String
getOrderStatus(OrderPk orderPK)
Gets the status of an order based on its PK
public String[]
getValidNewStatuses(OrderPk orderPK)
Gets all the valid status an order can move to.
public void
queryOrderAdjusments(OrderPk orderPK, OrderValue orderValue)
this call fills an orderValue with the adjustments that are associated with it.
public void
setOrderStatus(OrderPk orderPK, String status)
Sets an order status
public void
updateOrderDiscounts(OrderPk orderPk, OrderValue orderValue, Quote adjustments)
updates the discounts associated with an order
 
Methods from interface javax.ejb.EJBObject
getEJBHome, getHandle, getPrimaryKey, isIdentical, remove
   

Method Detail

createOrder(OrderPk, OrderValue, Quote) Method

public Handle createOrder(OrderPk orderPK, 
                          OrderValue orderValue, 
                          Quote adjustments)
throws RemoteException
Creates an order using a previously generated primary key and an order value via a Handle.

Returns

the handle over the order entity bean.

Exceptions

RemoteException

findByCustomer(CustomerPk, int) Method

public ScrollableModel findByCustomer(CustomerPk customerPK, 
                                      int pageSize)
throws RemoteException
Finds the overValues associated with a customer and returns a scrollable model

Returns

the ScrollableModel that manages the corresponding Order values

Exceptions

RemoteException

findByCustomer(CustomerPk) Method

public Collection findByCustomer(CustomerPk customerPK)
throws RemoteException
Finds the overValues associated with a customer and returns a collection

Returns

the Collection that manages the corresponding Order values

Exceptions

RemoteException

findByDates(Date, Date, int) Method

public ScrollableModel findByDates(Date startDate, 
                                   Date endDate, 
                                   int pageSize)
throws 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

Exceptions

RemoteException

findByDates(Date, Date) Method

public Collection findByDates(Date startDate, 
                              Date endDate)
throws 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

Exceptions

RemoteException

findByPK(OrderPk) Method

public OrderValue findByPK(OrderPk orderPK)
throws 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.

Exceptions

RemoteException

findBySKU(String) Method

public Collection findBySKU(String SKU)
throws 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

Exceptions

RemoteException

findBySKU(String, int) Method

public ScrollableModel findBySKU(String sku, 
                                 int pageSize)
throws 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

Exceptions

RemoteException

findByStatus(String, int) Method

public ScrollableModel findByStatus(String status, 
                                    int pageSize)
throws 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

Exceptions

RemoteException

findByStatus(String) Method

public Collection findByStatus(String status)
throws 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

Exceptions

RemoteException

getOrderStatus(OrderPk) Method

public String getOrderStatus(OrderPk orderPK)
throws RemoteException
Gets the status of an order based on its PK

Returns

the status as a String

Exceptions

RemoteException

getValidNewStatuses(OrderPk) Method

public String[] getValidNewStatuses(OrderPk orderPK)
throws RemoteException
Gets all the valid status an order can move to.

Returns

a String array, one string per valid new status

Exceptions

RemoteException

queryOrderAdjusments(OrderPk, OrderValue) Method

public void queryOrderAdjusments(OrderPk orderPK, 
                                 OrderValue orderValue)
throws 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

Exceptions

RemoteException

setOrderStatus(OrderPk, String) Method

public void setOrderStatus(OrderPk orderPK, 
                           String status)
throws RemoteException
Sets an order status

Returns

void

Exceptions

RemoteException

updateOrderDiscounts(OrderPk, OrderValue, Quote) Method

public void updateOrderDiscounts(OrderPk orderPk, 
                                 OrderValue orderValue, 
                                 Quote adjustments)
throws RemoteException
updates the discounts associated with an order

Parameters

orderPk
the order primary key.
orderValue
the order value which contains the creation date and the orderline
adjustments
a Quote object containing the adjustments

Exceptions

RemoteException