jpl.eda.activity
Class SQLDatabaseStorage

java.lang.Object
  extended byjpl.eda.activity.SQLDatabaseStorage
All Implemented Interfaces:
Storage

public class SQLDatabaseStorage
extends java.lang.Object
implements Storage

This class enables storage of activity incidents in just about any database management system. It should support MySQL, PostgreSQL, Oracle and Sybase.

This class uses the following properties:

This class expects the following table to exist in the target database (data types will vary depending on the vendor):

      create table incidents (
         activityID varchar(32) not null,
         className varchar(255) not null,
         occurTime bigint not null default 0,
         detail text null,
         primary key (activityID, className, occurTime))
                

Version:
$Revision: 1.2 $
Author:
S. Hardman

Constructor Summary
SQLDatabaseStorage()
          Constructor given no arguments.
 
Method Summary
 void finalize()
          This method closes the database connection.
 void store(java.lang.String id, java.util.List incidents)
          This method stores the list of incidents for the activity in the database table named "incidents".
 
Methods inherited from class java.lang.Object
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLDatabaseStorage

public SQLDatabaseStorage()
Constructor given no arguments. This constructor grabs the necessary system properties and opens the database connection based on the property values.

Method Detail

store

public void store(java.lang.String id,
                  java.util.List incidents)
This method stores the list of incidents for the activity in the database table named "incidents".

Specified by:
store in interface Storage
Parameters:
id - The activity identifier.
incidents - A list of Incident.

finalize

public void finalize()
              throws java.lang.Throwable
This method closes the database connection.

Throws:
java.lang.Throwable - If something goes wrong.


Copyright © 1999-2005 NASA Jet Propulsion Laboratory, California Institute of Technology. All Rights Reserved.