Main Page   Namespace List   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members  

sosc::BatchTool Class Reference

Inheritance diagram for sosc::BatchTool:

sosc::DbTool List of all members.

Public Methods

 BatchTool (String prefix, String className, String url, String userName, String password) throws Exception
 BatchTool (String prefix, Connection connection) throws Exception
String getSchemaSQL (String dbType) throws Exception
void dropSchema (String dbType) throws Exception
void createSchema (String dbType) throws Exception
int createProfile (String name) throws Exception
int getProfileId (String name) throws Exception
int createBatch (String profile) throws Exception
void addIntContents (int batch, ResultSet r) throws Exception
void addIntContents (String query) throws Exception
void addVarcharContents (String query) throws Exception
void addContentArguments () throws Exception
ResultSet getContentArguments (int batchId) throws Exception
ResultSet getBatchContents (int batch) throws Exception
ResultSet batchSummary (int profileId) throws Exception

Public Attributes

String CONTENTARGUMENTS = "_PREFIX__B_atchContentArguments"
String CONTENTS = "_PREFIX__B_atchContents"
String BATCHES = "_PREFIX__B_atches"
String PROFILES = "_PREFIX__B_atchProfiles"

Static Public Attributes

final String MSSQL

Private Methods

void setPrefix (String prefix) throws Exception

Private Attributes

String prefix = null

Constructor & Destructor Documentation

sosc::BatchTool::BatchTool String    prefix,
String    className,
String    url,
String    userName,
String    password
throws Exception [inline]
 

Definition at line 73 of file BatchTool.java.

References sosc::BatchTool::prefix, and sosc::BatchTool::setPrefix().

sosc::BatchTool::BatchTool String    prefix,
Connection    connection
throws Exception [inline]
 

Definition at line 81 of file BatchTool.java.

References sosc::DbTool::connection, sosc::BatchTool::prefix, and sosc::BatchTool::setPrefix().


Member Function Documentation

void sosc::BatchTool::addContentArguments   throws Exception [inline]
 

Definition at line 243 of file BatchTool.java.

void sosc::BatchTool::addIntContents String    query throws Exception [inline]
 

Parameters:
query  Should be SQL suitable for appending after " insert into batchContents (batch,i) ". The caller will have to take care to aquire the appropriate batchId that is returned from createBatch().

Definition at line 227 of file BatchTool.java.

References sosc::BatchTool::CONTENTS, sosc::DbTool::query(), and sosc::DbTool::update().

void sosc::BatchTool::addIntContents int    batch,
ResultSet    r
throws Exception [inline]
 

Definition at line 186 of file BatchTool.java.

References sosc::BatchTool::CONTENTARGUMENTS, sosc::BatchTool::CONTENTS, sosc::BatchTool::getBatchContents(), sosc::DbTool::quote(), sosc::DbTool::toMap(), and sosc::DbTool::update().

void sosc::BatchTool::addVarcharContents String    query throws Exception [inline]
 

Parameters:
query  Should be SQL suitable for appending after " insert into batchContents (batch,v) ". The caller will have to take care to aquire the appropriate batchId that is returned from createBatch().

Definition at line 236 of file BatchTool.java.

References sosc::BatchTool::CONTENTS, sosc::DbTool::query(), and sosc::DbTool::update().

ResultSet sosc::BatchTool::batchSummary int    profileId throws Exception [inline]
 

Definition at line 314 of file BatchTool.java.

References sosc::BatchTool::BATCHES, sosc::BatchTool::CONTENTS, and sosc::DbTool::query().

int sosc::BatchTool::createBatch String    profile throws Exception [inline]
 

Definition at line 177 of file BatchTool.java.

References sosc::BatchTool::BATCHES, sosc::DbTool::getInt(), sosc::BatchTool::getProfileId(), and sosc::DbTool::update().

int sosc::BatchTool::createProfile String    name throws Exception [inline]
 

Definition at line 144 of file BatchTool.java.

References sosc::BatchTool::getProfileId(), sosc::BatchTool::PROFILES, sosc::DbTool::quote(), and sosc::DbTool::update().

void sosc::BatchTool::createSchema String    dbType throws Exception [inline]
 

Definition at line 137 of file BatchTool.java.

References sosc::BatchTool::getSchemaSQL(), and sosc::DbTool::update().

void sosc::BatchTool::dropSchema String    dbType throws Exception [inline]
 

Definition at line 119 of file BatchTool.java.

References sosc::BatchTool::BATCHES, sosc::BatchTool::CONTENTARGUMENTS, sosc::BatchTool::CONTENTS, sosc::BatchTool::PROFILES, and sosc::DbTool::update().

ResultSet sosc::BatchTool::getBatchContents int    batch throws Exception [inline]
 

Returns all of the batch contents. Entries that have been killed are not included.

Definition at line 307 of file BatchTool.java.

References sosc::BatchTool::CONTENTS, and sosc::DbTool::query().

Referenced by sosc::BatchTool::addIntContents().

ResultSet sosc::BatchTool::getContentArguments int    batchId throws Exception [inline]
 

Returns 1 row for each of the items that are in the specified batch. Each row has N columns, where N is the

Any members of the batch that have been killed are suppressed (killed = 1)

Definition at line 252 of file BatchTool.java.

References sosc::BatchTool::CONTENTARGUMENTS, sosc::BatchTool::CONTENTS, sosc::DbTool::query(), and sosc::DbTool::rowCount().

int sosc::BatchTool::getProfileId String    name throws Exception [inline]
 

Definition at line 166 of file BatchTool.java.

References sosc::BatchTool::PROFILES, sosc::DbTool::query(), sosc::DbTool::quote(), and sosc::DbTool::rowCount().

Referenced by sosc::BatchTool::createBatch(), and sosc::BatchTool::createProfile().

String sosc::BatchTool::getSchemaSQL String    dbType throws Exception [inline]
 

Definition at line 104 of file BatchTool.java.

References sosc::BatchTool::BATCHES, sosc::BatchTool::CONTENTARGUMENTS, sosc::BatchTool::CONTENTS, sosc::BatchTool::MSSQL, and sosc::BatchTool::PROFILES.

Referenced by sosc::BatchTool::createSchema().

void sosc::BatchTool::setPrefix String    prefix throws Exception [inline, private]
 

Definition at line 89 of file BatchTool.java.

References sosc::BatchTool::BATCHES, sosc::BatchTool::CONTENTARGUMENTS, sosc::BatchTool::CONTENTS, sosc::BatchTool::prefix, and sosc::BatchTool::PROFILES.

Referenced by sosc::BatchTool::BatchTool().


Member Data Documentation

String sosc::BatchTool::BATCHES = "_PREFIX__B_atches"
 

Definition at line 33 of file BatchTool.java.

Referenced by sosc::BatchTool::batchSummary(), sosc::BatchTool::createBatch(), sosc::BatchTool::dropSchema(), sosc::BatchTool::getSchemaSQL(), and sosc::BatchTool::setPrefix().

String sosc::BatchTool::CONTENTARGUMENTS = "_PREFIX__B_atchContentArguments"
 

Definition at line 31 of file BatchTool.java.

Referenced by sosc::BatchTool::addIntContents(), sosc::BatchTool::dropSchema(), sosc::BatchTool::getContentArguments(), sosc::BatchTool::getSchemaSQL(), and sosc::BatchTool::setPrefix().

String sosc::BatchTool::CONTENTS = "_PREFIX__B_atchContents"
 

Definition at line 32 of file BatchTool.java.

Referenced by sosc::BatchTool::addIntContents(), sosc::BatchTool::addVarcharContents(), sosc::BatchTool::batchSummary(), sosc::BatchTool::dropSchema(), sosc::BatchTool::getBatchContents(), sosc::BatchTool::getContentArguments(), sosc::BatchTool::getSchemaSQL(), and sosc::BatchTool::setPrefix().

final String sosc::BatchTool::MSSQL [static]
 

Initial value:

 
                " create table _PROFILES_ ( \n" +
                "       id int primary key identity, \n" +
                "       name varchar(100) \n" +
                " ); \n" +
                " create table _BATCHES_ ( \n" +
                "       id int primary key identity, \n" +
                "       profile int foreign key references _PROFILES_(id), \n" +
                "       created datetime default getdate(), \n" +
                "   status varchar(20) not null default 'review' \n" +
                " ); \n" +
                " create table _CONTENTS_ ( \n" +
                "       id int primary key identity, \n" +
                "       batch int foreign key references _BATCHES_(id), \n" +
                "       i int, \n" +
                "   v varchar(1000), \n" +
                "               killed bit default 0 \n" +
                " ); \n" +
                " create table _CONTENTARGUMENTS_ ( \n" +
                "       id int primary key identity, \n" +
                "       content int foreign key references _CONTENTS_(id), \n" +
                "   k varchar(100), \n" +
                "   v varchar(1000) \n" +
                " ); \n"

Definition at line 39 of file BatchTool.java.

Referenced by sosc::BatchTool::getSchemaSQL().

String sosc::BatchTool::prefix = null [private]
 

Definition at line 68 of file BatchTool.java.

Referenced by sosc::BatchTool::BatchTool(), and sosc::BatchTool::setPrefix().

String sosc::BatchTool::PROFILES = "_PREFIX__B_atchProfiles"
 

Definition at line 34 of file BatchTool.java.

Referenced by sosc::BatchTool::createProfile(), sosc::BatchTool::dropSchema(), sosc::BatchTool::getProfileId(), sosc::BatchTool::getSchemaSQL(), and sosc::BatchTool::setPrefix().


The documentation for this class was generated from the following file:
Generated on Mon Jul 14 17:19:21 2003 for SOSC by doxygen1.2.15