com.ibm.dse.services.jdbc
Class Db2StoreSchemaGenerator

java.lang.Object
  |
  +--com.ibm.dse.services.jdbc.Db2StoreSchemaGenerator

public class Db2StoreSchemaGenerator
extends java.lang.Object


Field Summary
static java.lang.String catalogName
          Deprecated. Keeps the store catalog name
protected static java.sql.Connection databaseConnection
          Deprecated. Keeps the connection to the database that will be used by the Db2StoreSchemaGenerator
static java.lang.String schemaName
          Deprecated. Keeps the store schema name
 
Constructor Summary
Db2StoreSchemaGenerator()
          Deprecated. This constructor creates a Db2StoreSchemaGenerator object.
 
Method Summary
static void connect(java.lang.String aDatabaseURL)
          Deprecated. Connects to the database with the URL aDatabaseURL.
static void connect(java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword)
          Deprecated. Connects to the Database with the URL aDatabaseURL using the user identification aUser and password aPassword.
static void disconnect()
          Deprecated. Closes the Database connection.
static Vector generateSGML(java.lang.String aSchemaName, java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword)
          Deprecated. Called by the SGML editor tool if the information to create the store format definition is to be retrieved from the database.
static Vector generateSGML(java.lang.String aSchemaName, java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword, java.lang.String aJDBCDriverName)
          Deprecated. Called by the SGML editor tool if the information to create the store format definition is to be retrieved from the database.
 void generateTable(java.lang.String aTableName, java.lang.String aTableDefinition)
          Deprecated. Generates the store table in the selected database with aTableName name.
 void generateTable(java.lang.String aSchemaName, java.lang.String aTableName, java.lang.String aTableDefinition)
          Deprecated. Generates the store table in the selected database with aTableName name.
static java.lang.String getCatalogName()
          Deprecated. Returns the catalogName attribute value.
protected static DatabaseResultSetMetaData getMetaData(java.lang.String aTableName)
          Deprecated. Returns the DatabaseResultSetMetaData associated with a Store Table.
static java.lang.String getSchemaName()
          Deprecated. Returns the schemaName attribute value.
static void setCatalogName(java.lang.String s)
          Deprecated. Sets the catalogName attribute to the string provided as argument.
static void setSchemaName(java.lang.String s)
          Deprecated. Sets the schemaName attribute to the string provided as an argument.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

databaseConnection

protected static java.sql.Connection databaseConnection
Deprecated. 
Keeps the connection to the database that will be used by the Db2StoreSchemaGenerator

schemaName

public static java.lang.String schemaName
Deprecated. 
Keeps the store schema name

catalogName

public static java.lang.String catalogName
Deprecated. 
Keeps the store catalog name
Constructor Detail

Db2StoreSchemaGenerator

public Db2StoreSchemaGenerator()
Deprecated. 
This constructor creates a Db2StoreSchemaGenerator object.
Method Detail

connect

public static void connect(java.lang.String aDatabaseURL)
                    throws DSEInternalErrorException,
                           DSEInvalidRequestException,
                           DSESQLException
Deprecated. 
Connects to the database with the URL aDatabaseURL. Eventually, the database requests a user identification and a password or raises an exception if those parameters are mandatory for requesting a connection.
Parameters:
aDatabaseURL - java.lang.String, the database URL
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

connect

public static void connect(java.lang.String aDatabaseURL,
                           java.lang.String aUser,
                           java.lang.String aPassword)
                    throws DSESQLException,
                           DSEInvalidRequestException,
                           DSEInternalErrorException
Deprecated. 
Connects to the Database with the URL aDatabaseURL using the user identification aUser and password aPassword.
Parameters:
aDatabaseURL - the java.lang.String, the database URL
aUser - java.lang.String, the user identification
aPassword - java.lang.String, the user password
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

disconnect

public static void disconnect()
                       throws DSESQLException
Deprecated. 
Closes the Database connection.
Throws:
DSESQLException - if a SQL Exception occurs

generateSGML

public static Vector generateSGML(java.lang.String aSchemaName,
                                  java.lang.String aDatabaseURL,
                                  java.lang.String aUser,
                                  java.lang.String aPassword)
                           throws DSEInternalErrorException,
                                  DSEInvalidRequestException,
                                  DSESQLException,
                                  java.lang.Exception
Deprecated. 
Called by the SGML editor tool if the information to create the store format definition is to be retrieved from the database. It uses the default JDBC driver set in the SF_DEFAULT_DB2DRIVER attribute of class StoreConstants. It returns a Vector with the column names in the store table (without the internally used columns).
Parameters:
aSchemaName - java.lang.String, the store table name
aDatabaseURL - java.lang.String, the URL of the database that keeps the store table
aUser - java.lang.String, the user identification to logon to the database
aPassword - java.lang.String, the user password to logon to the database
Returns:
com.ibm.dse.base.Vector
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught
java.lang.Exception - if an exception has occurred

generateSGML

public static Vector generateSGML(java.lang.String aSchemaName,
                                  java.lang.String aDatabaseURL,
                                  java.lang.String aUser,
                                  java.lang.String aPassword,
                                  java.lang.String aJDBCDriverName)
                           throws java.lang.Exception,
                                  DSEInternalErrorException,
                                  DSEInvalidRequestException,
                                  DSESQLException
Deprecated. 
Called by the SGML editor tool if the information to create the store format definition is to be retrieved from the database. It loads and registers the JDBC driver passed as an argument. It returns a Vector with the column names in the store table (without the internally used columns).
Parameters:
aSchemaName - java.lang.String, the store table name
aDatabaseURL - java.lang.String, the URL of the database that keeps the store table
aUser - java.lang.String, the user identification to logon to the database
aPassword - java.lang.String, the user password to logon to the database
aJDBCDriverName - java.lang.String, the name of the JDBC driver that will be used to access the database
Returns:
com.ibm.dse.base.Vector
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught
java.lang.Exception - if an exception has occurred

generateTable

public void generateTable(java.lang.String aTableName,
                          java.lang.String aTableDefinition)
                   throws DSEInvalidArgumentException,
                          DSESQLException,
                          DSEInternalErrorException,
                          DSEInvalidRequestException
Deprecated. 
Generates the store table in the selected database with aTableName name. The argument aTableDefinition contains the definition of the columns within the table in SQL format.
Parameters:
aTableName - java.lang.String
aTableDefinition - java.lang.String
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

generateTable

public void generateTable(java.lang.String aSchemaName,
                          java.lang.String aTableName,
                          java.lang.String aTableDefinition)
                   throws DSEInvalidArgumentException,
                          DSESQLException,
                          DSEInternalErrorException,
                          DSEInvalidRequestException
Deprecated. 
Generates the store table in the selected database with aTableName name. The argument aTableDefinition contains the definition of the columns within the table in SQL format.
Parameters:
aSchemaName - java.lang.String
aTableName - java.lang.String
aTableDefinition - java.lang.String
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

getCatalogName

public static java.lang.String getCatalogName()
Deprecated. 
Returns the catalogName attribute value.
Returns:
java.lang.String

getMetaData

protected static DatabaseResultSetMetaData getMetaData(java.lang.String aTableName)
                                                throws DSEInvalidArgumentException,
                                                       DSEInternalErrorException,
                                                       DSESQLException
Deprecated. 
Returns the DatabaseResultSetMetaData associated with a Store Table. Checks first if this information already exists in the tablesMetaData Hashtable and, if it is not found, gets the information from the Database and adds it to the tablesMetaData Hashtable.
Parameters:
aTableName - java.lang.String, the store table name
Returns:
DatabaseResultSetMetaData
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

getSchemaName

public static java.lang.String getSchemaName()
Deprecated. 
Returns the schemaName attribute value.
Returns:
java.lang.String

setCatalogName

public static void setCatalogName(java.lang.String s)
Deprecated. 
Sets the catalogName attribute to the string provided as argument.
Parameters:
s - java.lang.String

setSchemaName

public static void setSchemaName(java.lang.String s)
Deprecated. 
Sets the schemaName attribute to the string provided as an argument.
Parameters:
s - java.lang.String