public class SQLDatabaseRetrieval extends 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:
org.apache.oodt.commons.activity.SQLDatabaseRetrieval.driver
org.apache.oodt.commons.activity.SQLDatabaseRetrieval.url
org.apache.oodt.commons.activity.SQLDatabaseRetrieval.user
org.apache.oodt.commons.activity.SQLDatabaseRetrieval.password
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))
Constructor and Description |
---|
SQLDatabaseRetrieval()
This constructor grabs the necessary system properties for the database connection.
|
Modifier and Type | Method and Description |
---|---|
static void |
main(String[] argv)
Execute the SQLDatabaseRetrieval class via the command-line.
|
List |
retrieve()
Retrieve the list of activities.
|
public SQLDatabaseRetrieval()
public List retrieve() throws ActivityException
retrieve
in interface Retrieval
StoredActivity
classes.ActivityException
- If an error occurs opening or accessing the database.public static void main(String[] argv)
argv
- The command-line arguments.Copyright © 1999–2017 Apache OODT. All rights reserved.