jpl.eda.activity
Class SQLDatabaseRetrieval

java.lang.Object
  extended byjpl.eda.activity.SQLDatabaseRetrieval
All Implemented Interfaces:
Retrieval

public class SQLDatabaseRetrieval
extends java.lang.Object
implements Retrieval

This class enables retrieval of activity incidents from 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.1 $
Author:
S. Hardman

Constructor Summary
SQLDatabaseRetrieval()
          This constructor grabs the necessary system properties for the database connection.
 
Method Summary
static void main(java.lang.String[] argv)
          Execute the SQLDatabaseRetrieval class via the command-line.
 java.util.List retrieve()
          Retrieve the list of activities.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SQLDatabaseRetrieval

public SQLDatabaseRetrieval()
This constructor grabs the necessary system properties for the database connection.

Method Detail

retrieve

public java.util.List retrieve()
                        throws ActivityException
Retrieve the list of activities.

Specified by:
retrieve in interface Retrieval
Returns:
A list of StoredActivity classes.
Throws:
ActivityException - If an error occurs opening or accessing the database.

main

public static void main(java.lang.String[] argv)
Execute the SQLDatabaseRetrieval class via the command-line. The program exits with status 0 on success, 1 on failure.

Parameters:
argv - The command-line arguments.


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