|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.BTTProcessorNotifier
com.ibm.btt.base.Service
com.ibm.btt.services.jdbc.JDBCService
com.ibm.btt.services.jdbc.JDBCTable
@ATTR(value={"databaseURL#String#IMPLIED","password#String#IMPLIED","dataSourceName#String#IMPLIED","waitRetry#String#IMPLIED","primaryKeys#String#IMPLIED","catalog#String#REQUIRED","createSchema#String#IMPLIED","JDBCDriver#String#IMPLIED","autoConnect#String#IMPLIED","autoCommit#String#IMPLIED","schema#String#IMPLIED","statementPoolSize#String#REQUIRED","sharedConnection#String#IMPLIED","poolName#String#IMPLIED","table#String#REQUIRED","user#String#IMPLIED","schema#String#IMPLIED","catalog#String#REQUIRED"}) public class JDBCTable
Field Summary | |
---|---|
protected boolean |
autoConnect
Keeps the connection criteria that the JDBCTable service must follow. |
protected java.lang.String |
catalog
The name of database catalog where the table is created. |
protected Hashtable |
columnsTable
Contains information about the relationship between a column in the database table and a data field in the context. |
static java.lang.String |
COMPID
Keeps the component identification that will be used by the traces tool. |
protected java.lang.String |
JDBCDriver
Keeps the name of the JDBC driver to be used to access the database. |
protected boolean |
primaryKeys
Keeps whether the service must prevent the application from modify a primary key when updating a record (the service will automatically remove any column set in the update statement that is a primary key for the table) or the application itself will take care of this issue and then the service will throw an exception if the application tries to update a primary key. |
protected Hashtable |
primaryKeysHashtable
Keeps the table primary keys for all the tables being accessed using a JDBCTable instance. |
protected java.lang.String |
schema
The name of database schema where the table is created. |
protected java.lang.String |
tableName
The name of the table the JDBCTable service will work with. |
protected static Hashtable |
tablesMetaData
Keeps the table meta data information for all the tables being accessed using a JDBCTable instance. |
Fields inherited from class com.ibm.btt.services.jdbc.JDBCService |
---|
addPstmt, addString, autoCommit, connectionProperties, databaseConnection, databaseURL, dataSourceName, metaData, password, poolName, sharedConnection, STMT_POOL_SIZE_DEFAULT, stmtPool, stmtPoolSize, updateString, user, waitRetry |
Fields inherited from class com.ibm.btt.base.Service |
---|
externalizer, name |
Fields inherited from class com.ibm.btt.base.BTTProcessorNotifier |
---|
handlersList |
Constructor Summary | |
---|---|
JDBCTable()
This constructor creates a JDBCTable object. |
|
JDBCTable(java.lang.String aName)
This constructor creates a JDBCTable object. |
Method Summary | |
---|---|
void |
addRecord(Context aContext,
HashtableFormat aHashtableFormat)
Calls the format method of the hashtable formatter aHashtableFormat by passing the aContext context as an argument. |
void |
addRecord(Context aContext,
HashtableFormat aHashtableFormat,
Vector aColumnsVector)
Calls the format method of the hashtable formatter aHashtableFormat by passing the aContext context as an argument. |
void |
addRecord(Context aContext,
java.lang.String aFormatName)
Instantiates the table format named aFormatName and calls its format method by passing the aContext as an argument. |
void |
addRecord(Context aContext,
java.lang.String aFormatName,
Vector aColumnsVector)
Instantiates the table format named aFormatName and calls its format method by passing the aContext context as an argument. |
void |
addRecord(Hashtable aDataHashtable)
Inserts the data from aDataHashtable as a new row into the table assigned to the table service. |
void |
addRecord(Hashtable aDataHashtable,
Vector aColumnsVector)
Inserts a record in the database only passing values to the columns specified in aColumnsVector. |
void |
buildAddString()
Builds an instance variable that is used when adding a records. |
void |
buildAddString(Vector aColumnsVector)
Builds an instance variable that is used when adding a record with only specific columns values set by the application. |
protected void |
buildConnectionProperties()
Build the Hashtable containing all details needed to request the database connection. |
void |
buildUpdateString()
Builds an instance variable that is used when updating all columns of a record. |
void |
commit()
Commits all changes to the database. |
void |
connect(java.lang.String aDatabaseURL)
Connects to the Database. |
void |
connect(java.lang.String aDatabaseURL,
Context aContext)
Connects to the Database. |
void |
connect(java.lang.String aUser,
java.lang.String aPassword)
Connects to the Database set in the DataSource definition using aUser and aPassword. |
void |
connect(java.lang.String aUser,
java.lang.String aPassword,
Context aContext)
Connects to the Database set in the DataSource definition using aUser and aPassword. |
void |
connect(java.lang.String aDatabaseURL,
java.lang.String aUser,
java.lang.String aPassword)
Connects to the Database in the URL aDatabaseURL using aUser and aPassword. |
void |
connect(java.lang.String aDatabaseURL,
java.lang.String aUser,
java.lang.String aPassword,
Context aContext)
Connects to the Database in the URL aDatabaseURL using aUser and aPassword. |
void |
deleteRecordsMatching(java.lang.String aSearchCondition)
Deletes the records in the table that match the search criteria. |
void |
disconnect()
Closes the database connection. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
HashtableFormat aHashtableInputFormat)
Builds a data Hashtable by calling the format method of the aHashtableInputFormat with the aContext as an argument. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
HashtableFormat aHashtableInputFormat,
HashtableFormat aHashtableOutputFormat)
Builds a data Hashtable by calling the format method of the aHashtableFormat with the aContext as an argument. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
HashtableFormat aHashtableInputFormat,
java.lang.String aHashtableOutputFormatName)
Builds a data Hashtable by calling the format method of the aHashtableFormat with the aContext as an argument. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
Hashtable dataHashtable,
HashtableFormat aHashtableOutputFormat)
Executes the stored procedure procedureName with the parameters given in the dataHashtable. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
Hashtable dataHashtable,
java.lang.String aHashtableOutputFormatName)
Executes the stored procedureName with the parameters given in the dataHashtable. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
java.lang.String aHashtableInputFormatName)
Instantiates the HashtableFormat defined as aHashtableInputFormatName and passes it as an argument to the method executeProcedure(String, Context, HashtableFormat). |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
java.lang.String aHashtableInputFormatName,
java.lang.String aHashtableOutputFormatName)
Instantiates the HashtableFormat defined as aHashtableInputFormatName and passes it as an argument to the executeProcedure(String, Context, HashtableFormat, String) method. |
void |
executeProcedure(java.lang.String procedureName,
Hashtable dataHashtable)
Executes the stored procedure procedureName with the parameters given in the dataHashtable |
void |
executeSQLQuery(java.lang.String anSQLStatement,
HashtableIndexedCollectionFormat formatter,
Context aContext)
Executes an SQL statement that returns a single ResultSet and unformats it into aContext using the formatter. |
void |
executeSQLQuery(java.lang.String anSQLStatement,
java.lang.String outputFormatName,
Context aContext)
Executes an SQL statement that returns a single ResultSet and unformats it into aContext using the outputFormatName. |
int |
executeSQLUpdate(java.lang.String anSQLStatement)
Executes an SQL INSERT, UPDATE ,DELETE statement, or an SQL statement that returns nothing. |
boolean |
getAutoConnect()
Returns the autoConnect attribute value. |
java.lang.String |
getCatalogName()
Returns the catalog attribute value. |
Hashtable |
getColumnsTable()
Returns the columnsTable attribute value. |
java.lang.String |
getFullProcedureName(java.lang.String procedureName)
Builds and returns the full name for the Stored Procedure, adding the schema name if it is set. |
java.lang.String |
getFullTableName()
Builds and returns the full table name, adding the schema name if it is set. |
boolean |
getInUse()
Returns the value of the inUse attribute. |
java.lang.String |
getJDBCDriver()
Returns the JDBCDriver attribute value. |
protected DatabaseResultSetMetaData |
getMetaData(java.lang.String aTableName)
Returns a DatabaseResultSetMetaData instance with the table metadata information. |
java.lang.String |
getSchemaName()
Returns the schema attribute value. |
java.lang.String |
getTableName()
Returns the tableName attribute value. |
void |
initialize()
Performs any required actions after service instanciation and before starting using it. |
java.lang.Object |
initializeColumnFrom(Tag aTag)
Used by the JDBCTable service externalizer to create the contents of the columnsTable instance attribute. |
java.lang.Object |
initializeFrom(Tag aTag)
Used by the JDBCTable service externalizer to set the instance attributes as defined in the XML file. |
boolean |
isConnected()
Returns true if there is a connection to the database or false if there is not. |
boolean |
isConnectionOpen()
Returns true if there is a connection to the database or false if there is not. |
boolean |
isPrimaryKeys()
Returns the primaryKeys attribute value. |
void |
loadDriver()
Loads the JDBC Driver set in the service external definition file or the default database JDBC Driver as set in the TableConstants TB_DEFAULT_JDBCDRIVER attribute. |
void |
loadDriver(java.lang.String aDriverName)
Loads the specified database JDBC Driver. |
void |
reset()
Resets the table. |
Vector |
retrieveRecordsMatching(java.lang.String aSearchCondition)
Retrieves all the records within the database table that match the search condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
HashtableIndexedCollectionFormat anOutputFormat)
Retrieves all the records within the database table that match the search condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
java.lang.String anOutputFormatName)
Retrieves all the records within the database table that match the search condition. |
Vector |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Vector aColumnsVector)
Retrieves the columns in aColumnsVector of all the records within the database table that match the search condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Vector aColumnsVector,
Context aContext,
HashtableIndexedCollectionFormat anOutputFormat)
Retrieves the columns in aColumnsVector of all the records within the database table that match the search condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Vector aColumnsVector,
Context aContext,
java.lang.String anOutputFormatName)
Retrieves the columns in aColumnsVector of all the records within the database table that match the search condition. |
void |
rollback()
Rolls back all the database changes if the autoCommit attribute is set to false. |
protected Hashtable |
rowToRecord(java.sql.ResultSet aResultSet)
Converts a row in the ResultSet, which is obtained after executing the SQL statement, to a data Hashtable. |
void |
setAutoConnect(boolean b)
Sets the autoConnect attribute to a boolean. |
void |
setCatalogName(java.lang.String s)
Sets the catalog attribute to the string provided as argument. |
protected void |
setColumnsTable(Hashtable h)
Sets the columnsTable attribute to a Hashtable. |
void |
setInUse(boolean b)
Sets the value of the inUse attribute. |
void |
setJDBCDriver(java.lang.String newJDBCDriver)
Sets the JDBCDriver attribute value to newJDBCDriver. |
void |
setPrimaryKeys(boolean newPrimaryKeys)
Sets the primaryKeys attribute value to newPrimaryKeys. |
void |
setSchemaName(java.lang.String s)
Sets the schema attribute to the string provided as an argument. |
void |
setTableName(java.lang.String s)
Sets the tableName attribute to the string provided as an argument. |
void |
setWaitRetry(boolean newWaitRetry)
Sets the waitRetry attribute value to newWaitRetry. |
void |
terminate()
Performs any required actions before the service instance can be stopped. |
Vector |
toStrings()
Creates a visual representation of the object. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
HashtableFormat aHashtableFormat)
Updates all of the table records that match the search condition with the result from formatting the context data using the aHashtableFormat. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
HashtableFormat aHashtableFormat,
Vector aColumnsVector)
Updates the columns specified in aColumnsVector for the records that match the search condition with the data provided in the operation context. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
java.lang.String aFormatName)
Updates all the table records that match the search condition with the result from formatting the context data using the formatter defined as aFormatName. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
java.lang.String aFormatName,
Vector aColumnsVector)
Updates the columns specified in aColumnsVector for the records that match the search condition with the data provided in the operation context. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Hashtable aDataHashtable)
Updates all the table records that match the search condition with the Hashtable data. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Hashtable aDataHashtable,
Vector aColumnsVector)
Updates the columns specified in aColumnsVector for all the records which match the search condition with the data provided in aDataHashtable. |
Methods inherited from class com.ibm.btt.base.Service |
---|
externalizer, getExternalizer, getTagName, readExternal, readExternal, readObject, removeExternal, setExternalizer, toString, toTags, writeExternal, writeExternal |
Methods inherited from class com.ibm.btt.base.BTTProcessorNotifier |
---|
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.btt.services.jdbc.TableService |
---|
getAutoCommit, getPassword, getUser, setAutoCommit, setPassword, setUser |
Methods inherited from interface com.ibm.btt.services.jdbc.DatabaseConnect |
---|
getDatabaseURL, getDataSourceName, getPoolName, getSharedConnection, isWaitRetry, setDatabaseURL, setDataSourceName, setPoolName, setSharedConnection |
Methods inherited from interface com.ibm.btt.base.Externalizable |
---|
getName, setName |
Field Detail |
---|
public static final java.lang.String COMPID
protected boolean autoConnect
protected java.lang.String tableName
protected java.lang.String schema
protected boolean primaryKeys
protected java.lang.String catalog
protected Hashtable columnsTable
protected java.lang.String JDBCDriver
protected Hashtable primaryKeysHashtable
protected static Hashtable tablesMetaData
Constructor Detail |
---|
public JDBCTable()
public JDBCTable(java.lang.String aName) throws java.io.IOException
aName
- java.lang.String
java.io.IOException
- if an I/O exception has occurred.Method Detail |
---|
public void addRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException, DSEInvalidClassException
addRecord
in interface TableService
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat - the table formatter
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEInvalidClassException
- if there is an error in the formatting processpublic void addRecord(Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException, DSEInvalidClassException
addRecord
in interface TableService
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat - the table formatteraColumnsVector
- com.ibm.dse.base.Vector - the vector that contains the columns
to be added
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEInvalidClassException
- if there is an error in the formatting processpublic void addRecord(Context aContext, java.lang.String aFormatName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException, DSEInvalidClassException, java.io.IOException
addRecord
in interface TableService
aContext
- com.ibm.btt.base.ContextaFormatName
- java.lang.String - the table formatter name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEInvalidClassException
- if there is an error in the formatting process
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void addRecord(Context aContext, java.lang.String aFormatName, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException, DSEInvalidClassException, java.io.IOException
addRecord
in interface TableService
aContext
- com.ibm.btt.base.ContextaFormatName
- java.lang.String - the table formatter nameaColumnsVector
- com.ibm.btt.base.Vector - the vector that contains the columns
to be added
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEInvalidClassException
- if there is an error in the formatting process
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void addRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEException
addRecord
in interface TableService
aDataHashtable
- Hashtable
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void addRecord(Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEException
addRecord
in interface TableService
aDataHashtable
- com.ibm.btt.base.Hashtable - the Hashtable that contains the
dataaColumnsVector
- com.ibm.btt.base.Vector - the vector that contains the columns
to be added
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidRequestException
- if the request is not valid
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void buildAddString() throws DSESQLException, DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSEException
buildAddString
in class JDBCService
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void buildAddString(Vector aColumnsVector) throws DSESQLException, DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSEException
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connectionsprotected void buildConnectionProperties()
buildConnectionProperties
in class JDBCService
public void buildUpdateString() throws DSESQLException, DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSEException
buildUpdateString
in class JDBCService
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void commit() throws DSESQLException
commit
in interface TableService
DSESQLException
- if commit failspublic void connect(java.lang.String aDatabaseURL) throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
connect
in class JDBCService
aDatabaseURL
- java.lang.String - the database URL
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aUser, java.lang.String aPassword) throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
connect
in class JDBCService
aUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user password
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
connect
in class JDBCService
aDatabaseURL
- java.lang.String - the database URLaUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user password
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aDatabaseURL, Context aContext) throws DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
connect
in class JDBCService
aDatabaseURL
- java.lang.String - the database URLaContext
- com.ibm.btt.base.Context - the context where the
JDBCServiceConnectionManager is defined
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aUser, java.lang.String aPassword, Context aContext) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
connect
in class JDBCService
aUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user passwordaContext
- com.ibm.btt.base.Context - the context where the
JDBCServiceConnectionManager is defined
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void connect(java.lang.String aDatabaseURL, java.lang.String aUser, java.lang.String aPassword, Context aContext) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEObjectNotFoundException, DSEException
connect
in interface DatabaseConnect
connect
in class JDBCService
aDatabaseURL
- java.lang.String - the database URLaUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user passwordaContext
- com.ibm.btt.base.Context - the context where the
JDBCServiceConnectionManager is defined
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of
connections managerpublic void deleteRecordsMatching(java.lang.String aSearchCondition) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException
deleteRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search criteria in SQL format
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void disconnect() throws DSEInvalidRequestException, DSESQLException, DSEException
disconnect
in interface DatabaseConnect
disconnect
in class JDBCService
DSESQLException
- if a SQLException occurs
DSEException
- if an exception is thrown when calling the pool of
connections
DSEInvalidRequestException
- if the database connection is nullpublic void executeProcedure(java.lang.String procedureName, Context aContext, Hashtable dataHashtable, HashtableFormat aHashtableOutputFormat) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException, DSEInternalErrorException, DSEException
executeProcedure
in interface TableService
procedureName
- java.lang.StringdataHashtable
- com.ibm.btt.base.HashtableaContext
- com.ibm.btt.base.ContextaHashtableOutputFormat
- com.ibm.btt.base.HashtableFormat
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void executeProcedure(java.lang.String procedureName, Context aContext, Hashtable dataHashtable, java.lang.String aHashtableOutputFormatName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException, java.io.IOException
executeProcedure
in interface TableService
procedureName
- java.lang.StringdataHashtable
- com.ibm.btt.base.HashtableaContext
- com.ibm.btt.base.ContextaHashtableOutputFormatName
- java.lang.String
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connections
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void executeProcedure(java.lang.String procedureName, Context aContext, HashtableFormat aHashtableInputFormat) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException
executeProcedure
in interface TableService
procedureName
- java.lang.StringaContext
- com.ibm.btt.base.ContextaHashtableInputFormat
- com.ibm.btt.base.HashtableFormat
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void executeProcedure(java.lang.String procedureName, Context aContext, HashtableFormat aHashtableInputFormat, HashtableFormat aHashtableOutputFormat) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException
executeProcedure
in interface TableService
procedureName
- java.lang.StringaContext
- com.ibm.btt.base.ContextaHashtableInputFormat
- com.ibm.btt.base.HashtableFormataHashtableOutputFormat
- com.ibm.btt.base.HashtableFormat
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void executeProcedure(java.lang.String procedureName, Context aContext, HashtableFormat aHashtableInputFormat, java.lang.String aHashtableOutputFormatName) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException, java.io.IOException
executeProcedure
in interface TableService
procedureName
- java.lang.StringaContext
- com.ibm.btt.base.ContextaHashtableInputFormat
- com.ibm.btt.base.HashtableFormataHashtableOutputFormatName
- java.lang.String
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connections
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void executeProcedure(java.lang.String procedureName, Context aContext, java.lang.String aHashtableInputFormatName) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException, java.io.IOException
executeProcedure
in interface TableService
procedureName
- java.lang.StringaContext
- com.ibm.btt.base.ContextaHashtableInputFormatName
- java.lang.String
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connections
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void executeProcedure(java.lang.String procedureName, Context aContext, java.lang.String aHashtableInputFormatName, java.lang.String aHashtableOutputFormatName) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException, java.io.IOException
executeProcedure
in interface TableService
procedureName
- java.lang.StringaContext
- com.ibm.btt.base.ContextaHashtableInputFormatName
- java.lang.StringaHashtableOutputFormatName
- java.lang.String
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connections
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void executeProcedure(java.lang.String procedureName, Hashtable dataHashtable) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEException
executeProcedure
in interface TableService
procedureName
- java.lang.StringdataHashtable
- com.ibm.btt.base.Hashtable
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void executeSQLQuery(java.lang.String anSQLStatement, java.lang.String outputFormatName, Context aContext) throws DSESQLException, DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSEException, DSEObjectNotFoundException, java.io.IOException
executeSQLQuery
in interface TableService
anSQLStatement
- java.lang.StringoutputFormatName
- java.lang.StringaContext
- com.ibm.btt.base.Context
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEObjectNotFoundException
- if there is an error in the unformatting process
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void executeSQLQuery(java.lang.String anSQLStatement, HashtableIndexedCollectionFormat formatter, Context aContext) throws DSESQLException, DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSEException, DSEObjectNotFoundException, java.io.IOException
anSQLStatement
- java.lang.Stringformatter
- com.ibm.btt.base.HashtableIndexedCollectionFormataContext
- com.ibm.btt.base.Context
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEObjectNotFoundException
- if there is an error in the unformatting process
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic int executeSQLUpdate(java.lang.String anSQLStatement) throws DSESQLException, DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSEException
executeSQLUpdate
in interface TableService
anSQLStatement
- java.lang.String
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connectionspublic boolean getAutoConnect()
getAutoConnect
in interface TableService
public java.lang.String getCatalogName()
getCatalogName
in interface TableService
public Hashtable getColumnsTable()
public java.lang.String getFullProcedureName(java.lang.String procedureName)
public java.lang.String getFullTableName()
getFullTableName
in interface TableService
public boolean getInUse()
getInUse
in interface Poolable
public java.lang.String getJDBCDriver()
getJDBCDriver
in interface TableService
protected DatabaseResultSetMetaData getMetaData(java.lang.String aTableName) throws DSEInternalErrorException, DSESQLException, DSEInvalidArgumentException, DSEInvalidRequestException, DSEException
aTableName
- java.lang.String - the table name
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caught
DSEInvalidArgumentException
- if the argument is empty or null
DSEInvalidRequestException
- if the request is not valid
DSEException
- if an exception is thrown when calling the pool of
connectionspublic java.lang.String getSchemaName()
getSchemaName
in interface TableService
public java.lang.String getTableName()
getTableName
in interface TableService
public void initialize() throws DSEException
initialize
in interface Poolable
DSEException
public java.lang.Object initializeColumnFrom(Tag aTag)
aTag
- com.ibm.btt.base.Tag
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException
initializeFrom
in class Service
aTag
- com.ibm.btt.base.Tag
java.io.IOException
- if an I/O Exception has occurredpublic boolean isConnected() throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException
isConnected
in interface DatabaseConnect
isConnected
in class JDBCService
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic boolean isConnectionOpen() throws DSESQLException, DSEException
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when checking the database
connection availability by calling the connection manager
For APAR JR18674public boolean isPrimaryKeys()
isPrimaryKeys
in interface TableService
public void loadDriver() throws DSEInternalErrorException
loadDriver
in interface TableService
DSEInternalErrorException
- if an internal program error occurspublic void loadDriver(java.lang.String aDriverName) throws DSEInternalErrorException
loadDriver
in interface TableService
aDriverName
- java.lang.String - the driver name (full path)
DSEInternalErrorException
- if an internal program error occurspublic void reset() throws DSEException
reset
in interface Poolable
DSEException
public Vector retrieveRecordsMatching(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException
retrieveRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search condition in SQL format
DSEInvalidRequestException
- if the request is not valid
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void retrieveRecordsMatching(java.lang.String aSearchCondition, Context aContext, HashtableIndexedCollectionFormat anOutputFormat) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException, java.io.IOException
retrieveRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search condition in SQL formataContext
- com.ibm.btt.base.Context - the context to where the retrieved
records will be unformattedanOutputFormat
- com.ibm.btt.base.HashtableIndexedCollectionFormat - the
formatter to unformat the retrieved records
DSEInvalidRequestException
- if the request is not valid
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void retrieveRecordsMatching(java.lang.String aSearchCondition, Context aContext, java.lang.String anOutputFormatName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException, java.io.IOException
retrieveRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search condition in SQL formataContext
- com.ibm.btt.base.Context - the context into which the
retrieved records will be unformattedanOutputFormatName
- java.lang.String - the name of the formatter to unformat the
retrieved records
DSEInvalidRequestException
- if the request is not valid
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caught
DSEException
- if an exception is thrown when calling the pool of
connections
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic Vector retrieveRecordsMatching(java.lang.String aSearchCondition, Vector aColumnsVector) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException
retrieveRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search condition in SQL formataColumnsVector
- com.ibm.btt.base.Vector - the vector that contains the columns
to be retrieved
DSEInvalidRequestException
- if the request is not valid
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void retrieveRecordsMatching(java.lang.String aSearchCondition, Vector aColumnsVector, Context aContext, HashtableIndexedCollectionFormat anOutputFormat) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException
retrieveRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search condition in SQL formataColumnsVector
- com.ibm.btt.base.Vector - the vector that contains the columns
to be retrievedaContext
- com.ibm.btt.base.Context - the context into which the
retrieved records will be unformattedanOutputFormat
- com.ibm.btt.base.HashtableIndexedCollectionFormat - the
formatter to unformat the retrieved records
DSEInvalidRequestException
- if the request is not valid
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic void retrieveRecordsMatching(java.lang.String aSearchCondition, Vector aColumnsVector, Context aContext, java.lang.String anOutputFormatName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException, java.io.IOException
retrieveRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search condition in SQL formataColumnsVector
- com.ibm.btt.base.Vector - the vector that contains the columns
to be retrievedaContext
- com.ibm.btt.base.Context - the context into which the
retrieved records will be unformattedanOutputFormatName
- java.lang.String - the name of the formatter to unformat the
retrieved records
DSEInvalidRequestException
- if the request is not valid
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic void rollback() throws DSESQLException
rollback
in interface TableService
DSESQLException
- when rollback failsprotected Hashtable rowToRecord(java.sql.ResultSet aResultSet) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aResultSet
- ResultSet - the retrieved row as a ResultSet
DSEInvalidArgumentException
- if the parameters are not correct
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an other problem occurspublic void setAutoConnect(boolean b)
setAutoConnect
in interface TableService
b
- booleanpublic void setCatalogName(java.lang.String s)
setCatalogName
in interface TableService
s
- java.lang.Stringprotected void setColumnsTable(Hashtable h)
h
- com.ibm.btt.base.Hashtablepublic void setInUse(boolean b)
setInUse
in interface Poolable
b
- -
The new value of the inUse attributepublic void setJDBCDriver(java.lang.String newJDBCDriver)
setJDBCDriver
in interface TableService
newJDBCDriver
- java.lang.Stringpublic void setPrimaryKeys(boolean newPrimaryKeys)
setPrimaryKeys
in interface TableService
newPrimaryKeys
- booleanpublic void setSchemaName(java.lang.String s)
setSchemaName
in interface TableService
s
- java.lang.Stringpublic void setTableName(java.lang.String s)
setTableName
in interface TableService
s
- java.lang.Stringpublic void setWaitRetry(boolean newWaitRetry)
setWaitRetry
in interface DatabaseConnect
setWaitRetry
in class JDBCService
newWaitRetry
- booleanpublic void terminate() throws DSEException
terminate
in interface ProcessorNotifier
terminate
in interface Poolable
terminate
in class Service
DSEException
public Vector toStrings()
toStrings
in class Service
public int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException
updateRecordsMatching
in interface TableService
aSearchCondition
- java.lang.StringaContext
- com.ibm.btt.base.ContextaHashtableFormat
- com.ibm.btt.base.HashtableFormat
DSEInvalidArgumentException
- if an argument is not valid
DSEInvalidRequestException
- if the input parameters are not valid
DSEException
- if an exception is thrown when calling the pool of
connections
DSESQLException
- if an SQLException is caughtpublic int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException
updateRecordsMatching
in interface TableService
aSearchCondition
- java.lang.StringaContext
- com.ibm.btt.base.ContextaHashtableFormat
- com.ibm.btt.base.HashtableFormataColumnsVector
- com.ibm.btt.base.Vector the vector that contains the columns
to be updated
DSEInvalidArgumentException
- if an argument is not valid
DSEInvalidRequestException
- if the input parameters are not valid
DSEException
- if an exception is thrown when calling the pool of
connections
DSESQLException
- if an SQLException is caughtpublic int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, DSEInvalidClassException, DSEException, java.io.IOException
updateRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search conditionaContext
- com.ibm.btt.base.Context - the context containing the new data
valuesaFormatName
- java.lang.String - the name of the formatter that needs to be
instantiated to format the data that is in the context
DSEInvalidArgumentException
- if an argument is not valid
DSEInvalidRequestException
- if the input parameters are not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEInvalidClassException
- if there is an error in the formatting process
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEInvalidClassException, DSEException, java.io.IOException
updateRecordsMatching
in interface TableService
aSearchCondition
- java.lang.StringaContext
- com.ibm.btt.base.Context - the context containing the new data
valuesaFormatName
- java.lang.String - the name of the format that needs to be
instantiated to format the data that is in the contextaColumnsVector
- com.ibm.btt.base.Vector - the vector that contains the columns
to be updated
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidRequestException
- if the request is not valid
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
DSEInvalidClassException
- if there is an error in the formatting process
java.io.IOException
- if there is an error instanciating the formatter from its
external definitionpublic int updateRecordsMatching(java.lang.String aSearchCondition, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, DSEException
updateRecordsMatching
in interface TableService
aSearchCondition
- java.lang.String - the search conditionaDataHashtable
- Hashtable - the Hashtable that contains the new data
DSEInvalidArgumentException
- if an argument is not valid
DSEInvalidRequestException
- if the input parameters are not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- is an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connectionspublic int updateRecordsMatching(java.lang.String aSearchCondition, Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEException
updateRecordsMatching
in interface TableService
aSearchCondition
- java.lang.StringaDataHashtable
- com.ibm.btt.base.Hashtable - the Hashtable that contains the
new dataaColumnsVector
- com.ibm.btt.base.Vector - the vector that contains the columns
to be changed
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidRequestException
- if the request is not valid
DSESQLException
- if an SQLException is caught
DSEException
- if an exception is thrown when calling the pool of
connections
|
IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc | ||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |