public class SQLDatabaseStorage extends 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:
org.apache.oodt.commons.activity.SQLDatabaseStorage.driver
org.apache.oodt.commons.activity.SQLDatabaseStorage.url
org.apache.oodt.commons.activity.SQLDatabaseStorage.user
org.apache.oodt.commons.activity.SQLDatabaseStorage.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 |
---|
SQLDatabaseStorage()
Constructor given no arguments.
|
Modifier and Type | Method and Description |
---|---|
static String |
escapeSingleQuote(String inputString)
This method will escape any single quotes found in the input string and
return the escaped string.
|
void |
finalize()
This method closes the database connection.
|
void |
store(String id,
List incidents)
This method stores the list of incidents for the activity in the database
table named "incidents".
|
public SQLDatabaseStorage()
public void store(String id, List incidents)
public void finalize() throws Throwable
public static String escapeSingleQuote(String inputString)
inputString
- The string to be escaped.Copyright © 1999–2017 Apache OODT. All rights reserved.