db-derby-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Apache Wiki <wikidi...@apache.org>
Subject [Db-derby Wiki] Update of "DatabaseManager" by DonaldMcLean
Date Fri, 28 Apr 2006 18:56:45 GMT
Dear Wiki user,

You have subscribed to a wiki page or wiki category on "Db-derby Wiki" for change notification.

The following page has been changed by DonaldMcLean:

  Derby and Hibernate are each very large packages full of power and fraught with complexities.
When I first started working with them, I desperately wanted a very simple mechanism that
would handle the basic drudgery so that I could concentrate on writing my application. The
led me to the creation of a fairly small class (208 lines) that did everything that I needed.
  === Example ===
+ Using a DatabaseManager is fairly simple.
+ {{{
+         File dbFile = new File("PropertySetTest");
+         DBUtilities.deleteAnyFile(dbFile);
+         DatabaseManager dbm = new DatabaseManager(dbFile);
+         Session session = dbm.getMainSession();
+ }}}
+ This is an example from a test class. It deletes the database at the beginning of the test
so that 1) the database will be created with the latest schema and 2) the database will start
at a known state (empty).

View raw message