home *** CD-ROM | disk | FTP | other *** search
/ Symantec Visual Cafe for Java 2.5 / symantec-visual-cafe-2.5-database-dev-edition.iso / Extras / ODesign / SetupPSE.exe / data.z / Lookup.java < prev    next >
Encoding:
Java Source  |  1997-04-23  |  545 b   |  29 lines

  1. package COM.odi.demo.rep;
  2.  
  3. /**
  4.  *      <H3>Copyright (C) Object Design Inc. 1996, 1997</H3>
  5.  *
  6.  * Look up the value of root "r1" of the database, and describe
  7.  * this rectangle.
  8.  */
  9.  
  10. import COM.odi.*;
  11.  
  12. public
  13. class Lookup {
  14.     
  15.   public static void main(String argv[]) {
  16.  
  17.     ObjectStore.initialize(null, null);
  18.     
  19.     Database db = Database.open(argv[0], ObjectStore.OPEN_READONLY);
  20.     
  21.     Transaction t = Transaction.begin(ObjectStore.UPDATE) ;
  22.  
  23.     Rectangle rec = (Rectangle)db.getRoot("r1");
  24.     rec.describe();
  25.  
  26.     t.commit();
  27.   }
  28. }
  29.