|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--jcs.xml.order.DoOrder
A client command line interpreter to demonstrate and test the
OrderXml class (a subclass of the JXml
class.
| Method Summary | |
static void |
main(java.lang.String[] args)
Interprets the "action" (-A) parameter to perform various calls of the OrderXml class. |
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
| Method Detail |
public static void main(java.lang.String[] args)
OrderXml class.
Parameters (not all of the parameters are used with each action):
server identification. See below.
For a description of the server parameter (-S),
see the method jcs.util.ExecSql.connectTo.
Actions:
Example:
java jcs.xml.order.DoOrder -I Order.xml -A updateheader -CID 123 \
-CNAME "Acme Applied" -DATE "99/07/04" -O Order-updateheader.xml
Example:
java jcs.xml.order.DoOrder -I Order.xml -A updateitem -INUM 2 \
-IID 963 -INAME "Curved Cover Caps" -QUANT 17 -UNIT 12 -O Order-updateitem.xml
Example:
java jcs.xml.order.DoOrder -I Order.xml -A deleteitem -INUM 2 \
-O Order-updateitem.xml
Example:
java jcs.xml.order.DoOrder -I Order.xml -A appenditem \
-IID 369 -INAME "Capped Curved Covers" -QUANT 71 -UNIT 12
create table customers
(customer_id varchar(5) not null unique,
customer_name varchar(50) not null)
create table orders
(customer_id varchar(5) not null,
order_date datetime not null,
item_id varchar(5) not null,
quantity int not null)
create table items
(item_id varchar(5) unique,
item_name varchar(20),
unit smallint)
insert into customers values("123", "Acme Alpha")
insert into orders values ("123", "2001/05/07", "987", 5)
insert into orders values ("123", "2001/05/07", "654", 3)
insert into orders values ("123", "2001/05/07", "579", 1)
insert into items values ("987", "Widget", 1)
insert into items values ("654", "Medium Connecter", 12)
insert into items values ("579", "Type 3 clasp", 1)
Example:
java jcs.xml.order.DoOrder -A sql2order -CID 123 -DATE "99/07/04
-O order-generated.xml -S server"
The sql2order action joins the above tables, selects the rows
with the given customer_id and order_date,
and returns an XML "Order" document with that data.
args - a string array with the command line arguments
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||