Last change
on this file since 10737 was 10737, checked in by kjdon, 19 years ago |
Java Wrapper for GDBM, from Martin Pool. Original website gone, so added it all in here. I have modified the Makefiles to work in greenstone, and on macs, and added windows makefiles
|
-
Property svn:keywords
set to
Author Date Id Revision
|
File size:
759 bytes
|
Line | |
---|
1 | /*
|
---|
2 | * (C) Pharos IP Pty Ltd 1997
|
---|
3 | */
|
---|
4 |
|
---|
5 | package au.com.pharos.dbinterface.vf;
|
---|
6 |
|
---|
7 | import java.util.Date;
|
---|
8 |
|
---|
9 | import au.com.pharos.gdbm.GdbmFile;
|
---|
10 |
|
---|
11 | import au.com.pharos.packing;
|
---|
12 |
|
---|
13 | import au.com.pharos.dbinterface.vf;
|
---|
14 |
|
---|
15 | public class VFDbInterface {
|
---|
16 |
|
---|
17 | /* The Order database */
|
---|
18 | private String orderDB = "/fn/data/Orders.gdbm";
|
---|
19 |
|
---|
20 | /* The Stock database */
|
---|
21 | private String stockDB = "/fn/data/Stock.gdbm";
|
---|
22 |
|
---|
23 | /* Initialisation. Nothing needs to happen yet. */
|
---|
24 | public VFDbInterface()
|
---|
25 | {
|
---|
26 | ;
|
---|
27 | }
|
---|
28 |
|
---|
29 | /* Submit an order to the database */
|
---|
30 | public void submitOrder(VFOrder order)
|
---|
31 | {
|
---|
32 | GdbmFile db = new GdbmFile(orderDB);
|
---|
33 | db.setKeyPacking(new StringPacking());
|
---|
34 | db.setValuePacking(new QuotedVectorPacking());
|
---|
35 |
|
---|
36 | Vector details = order.toVectorString();
|
---|
37 |
|
---|
Note:
See
TracBrowser
for help on using the repository browser.