Documentation Shortcuts

 Library Shortcuts

 Meetings

(Print Friendly Version)
 SSS Data Access Software for SSS Model 

Introduction

The SSS Data Access Software is a collection of java packages whose job is to take the SSS Domain Model and save it to, or retrieve it from, a persistent store. A key feature of our design is that the model software is completely unaware of the data access software. This means that we could implement a new storage mechanism without having an impact on our model or utility software.

Technology

We are using a relational database for persistent storage of our domain model. Rather than write a lot of low level database access code, however, we are employing the object / relational mapping tool Hibernate. We set up Hibernate to work with our model by writing two kinds of XML files: configuration files and mapping files. The configuration files (which end in *.cfg.xml) tell the Hibernate libraries which kind of database we will use, how to connect to the database, and what mapping files will be used. The mapping files (which end in *.hbm.xml) tell the Hibernate libraries which of our model objects to persist, which properties of those objects to persist, and how to go about handling any special data types, such as enumerations.

Our production database is Oracle. However, if we wanted to use a different database, we would have very little work to do, because Hibernate has allowed us to decouple the choice of database from our code that deals with object persistence. As long as the other prospective database has a Java Database Connectivity (JDBC) driver, we can switch to it by changing a few lines in our configuration files. In fact we use a different database, HSQLDB, on our own desktop when testing our software. If you look at the configuration for our database of sources, you can see the HSQLDB configuration just above the (inactive) Oracle configuration.

API Documentation

Thanks to Hibernate, there are surprisingly few classes in our data access layer. Of these, most are in one of two categories: objects that implement the Data Access Object (DAO) software development pattern, or objects that help Hibernate understand how to map some of our data types (mainly enumeration types). An example of the former is HibernateProjectDao. An example of the latter is FrequencyUnitsConverter. The HibernateXxxDao classes are used by our applications to interact with the persistent store. The XxxConverter classes are used only by Hibernate, which knows about these classes because of entries we have made in the *.hbm.xml mapping files.

The application programmers' interface for all DAO classes may be seen by going to the API overview.

Source Location

The source code for the classes of these packages, the test classes written for them, and all other supporting files are held in a subversion repository (user name and password required).

Jar File

The most recent jar files that contain the compiled classes that correspond to this documentation may be found in the DAO Snapshot Repository.

Dependencies

The SSS DAO Software is dependent on both the SSS Model Software and the SSS Utility Software. It is also dependent on some third party software. The full set of dependencies may be found in the pom.xml file that we use in our Maven 2 build process. The most recent of these may be found in the DAO Snapshot Repository.

Modified on Friday, 08-May-2009 08:21:43 MDT