public interface Operations
Typical model is that each client has its own instance of an object that implements Operations. For example the implementation in a client side SQL implementation would have a reference to its own JDBC connection and prepared statements.
Implementations of the execution methods must perform the following:
DECIMAL values are represented as String objects to allow Order Entry to be run on J2ME/CDC/Foundation which does not support BigDecimal.
Modifier and Type | Method and Description |
---|---|
void |
close()
Release any resources.
|
void |
delivery()
Execute a single delivery from the FIFO queue.
|
void |
newOrder(Display display,
java.lang.Object displayData,
short w,
short d,
int c,
int[] items,
short[] quantities,
short[] supplyW)
Execute new order.
|
void |
orderStatus(Display display,
java.lang.Object displayData,
short w,
short d,
int c)
Execute order status by customer identifer.
|
void |
orderStatus(Display display,
java.lang.Object displayData,
short w,
short d,
java.lang.String customerLast)
Execute order status by last name.
|
void |
payment(Display display,
java.lang.Object displayData,
short w,
short d,
short cw,
short cd,
int c,
java.lang.String amount)
Execute payment by customer identifer.
|
void |
payment(Display display,
java.lang.Object displayData,
short w,
short d,
short cw,
short cd,
java.lang.String customerLast,
java.lang.String amount)
Execute payment by last name.
|
void |
scheduleDelivery(Display display,
java.lang.Object displayData,
short w,
short carrier)
Queue a delivery request.
|
void |
stockLevel(Display display,
java.lang.Object displayData,
short w,
short d,
int threshold)
Execute stock level.
|
void stockLevel(Display display, java.lang.Object displayData, short w, short d, int threshold) throws java.lang.Exception
display
- Where to display the results, if null results are not
displayed.displayData
- Any client specific display information, such as servlet
context.w
- Warehouse for transactiond
- District for transactionthreshold
- Threshold for transaction.java.lang.Exception
Display.displayStockLevel(Object, short, short, int, int)
void orderStatus(Display display, java.lang.Object displayData, short w, short d, java.lang.String customerLast) throws java.lang.Exception
display
- Where to display the results, if null results are not
displayed.displayData
- Any client specific display information, such as servlet
context.w
- Warehouse identifierd
- District identifiercustomerLast
- Customer's last name.java.lang.Exception
void orderStatus(Display display, java.lang.Object displayData, short w, short d, int c) throws java.lang.Exception
display
- Where to display the results, if null results are not
displayed.displayData
- Any client specific display information, such as servlet
context.w
- Warehouse identifierd
- District identifierc
- Customer identifer.java.lang.Exception
void payment(Display display, java.lang.Object displayData, short w, short d, short cw, short cd, java.lang.String customerLast, java.lang.String amount) throws java.lang.Exception
display
- Where to display the results, if null results are not
displayed.displayData
- Any client specific display information, such as servlet
context.w
- Home warehouse identifierd
- Home district identifiercw
- Customer warehouse identifiercd
- Customer district identifiercustomerLast
- Customer's last name.amount
- Payment amountjava.lang.Exception
void payment(Display display, java.lang.Object displayData, short w, short d, short cw, short cd, int c, java.lang.String amount) throws java.lang.Exception
display
- Where to display the results, if null results are not
displayed.displayData
- Any client specific display information, such as servlet
context.w
- Home warehouse identifierd
- Home district identifiercw
- Customer warehouse identifiercd
- Customer district identifierc
- Customer identifer.amount
- Payment amountjava.lang.Exception
void newOrder(Display display, java.lang.Object displayData, short w, short d, int c, int[] items, short[] quantities, short[] supplyW) throws java.lang.Exception
Assumption is that items.length == quanties.length == supplyW.length.
display
- Where to display the results, if null results are not
displayed.displayData
- Client specific display information, such as servlet
context.w
- Warehouse identifierd
- District identifierc
- Customer identifieritems
- array of item numbersquantities
- quanties for each itemsupplyW
- Supply warehouse for each item.java.lang.Exception
void scheduleDelivery(Display display, java.lang.Object displayData, short w, short carrier) throws java.lang.Exception
The implementation of Operations is responsible for managing the FIFO queue of requests, which could be in a flat file, the database or memory etc.
display
- Where to display the results, if null results are not
displayed.displayData
- Any client specific display information, such as servlet
context.w
- Warehouse identifiercarrier
- Carrier identifierjava.lang.Exception
void delivery() throws java.lang.Exception
java.lang.Exception
void close() throws java.lang.Exception
java.lang.Exception
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.