|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectcom.ibm.di.connector.Connector
com.ibm.di.connector.JDBCConnector
public class JDBCConnector
This connector provides access to JDBC/ODBC based systems. The connector will attempt to perform as much conversion between types as possible.
| Field Summary |
|---|
| Fields inherited from class com.ibm.di.connector.Connector |
|---|
ALL_MODES, myLog, PROPERTY_MESSAGE, PROPERTY_READER, PROPERTY_WRITER |
| Constructor Summary | |
|---|---|
JDBCConnector()
Constructor |
|
| Method Summary | |
|---|---|
void |
alterSession(String command)
Create a ALTER SESSION Sql statement, and execute it. |
void |
commit()
Commit the last transactions |
void |
deleteEntry(Entry entry,
SearchCriteria search)
Deletes an existing entry. |
String |
execSQL(String sql)
Executes an SQL statement. |
String |
execSQLSelect(String sql)
Executes an SQL statement, the returned values can be retrieved using getNextSQLSelectEntry() |
Entry |
findEntry(SearchCriteria search)
Finds an existing entry. |
Connection |
getConnection()
Returns the Connection handle for the currently open session. |
Entry |
getNextEntry()
Gets the nextEntry attribute of the JDBCConnector object |
Entry |
getNextSQLSelectEntry()
Gets the nextSQLSelectEntry entry |
Statement |
getStatement()
Returns the Statement handle for the currently open session |
String |
getSubClause(SearchCriteria.rscSearch rs,
boolean ps)
Constructs an SQL where expression from an rscSearch class. |
String |
getVersion()
Return version information |
String |
getWhereClause(SearchCriteria search,
boolean ps)
Creates where clause for SQL statement |
void |
initialize(Object o)
Initialize the connector and discover syntax |
boolean |
isDeltaSupported()
Returns true if this connector is able to perform delta updates |
boolean |
isIOException(Throwable e)
Method checks exception type |
void |
modEntry(Entry entry,
SearchCriteria search)
Modifies an existing entry. |
void |
putEntry(Entry entry)
Adds a new entry. |
Object |
querySchema(Object table)
Query for schema of table |
Vector |
queryTables()
Queries for list Of tables |
void |
rollback()
Rollback the last transactions since the last commit |
void |
saveMetaData(ResultSetMetaData md)
Saves the Meta Data info |
void |
selectEntries()
Prepares for getNextEntry(). |
boolean |
setCommitMode(String mode)
Set the commit behavior of this JDBC Connector. |
void |
setCurrent(Entry entry,
SearchCriteria search)
Change the SearchCriteria search to find the entry sent as a parameter. |
void |
setResultSet(ResultSet rs)
Instructs this connector to use the provided result set instead of its own. |
void |
setSessionParameters()
Sets the sessionParameters attribute of the JDBCConnector object |
String |
sqlValue(String name,
Object value)
|
void |
terminate()
terminate - close handles and connections |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface com.ibm.di.connector.ConnectorInterface |
|---|
getConfiguration, getContext, getFindEntryCount, getFirstFindEntry, getMaxDuplicateEntries, getName, getNextClient, getNextFindEntry, getParam, getPushbackEntry, getRawConnectorConfiguration, isExceptionFatal, modEntry, pushback, queryOperations, queryReply, reconnect, registerScriptBeans, replyEntry, setConfiguration, setContext, setLog, setMaxDuplicateEntries, setName, setParam, setRSInterface, terminateServer |
| Constructor Detail |
|---|
public JDBCConnector()
| Method Detail |
|---|
public void initialize(Object o)
throws Exception
initialize in interface ConnectorInterfaceinitialize in class Connectoro - Ignored
Exception - Throws exception if required JDBC parameters are not set.
public void setSessionParameters()
throws SQLException
SQLException - Contains exception thrown during database operations
public void alterSession(String command)
throws SQLException
command - The rest of the ALTER SESSION statement
SQLException - Contains exception thrown during database operationspublic boolean isDeltaSupported()
isDeltaSupported in interface ConnectorInterfaceisDeltaSupported in class Connectorpublic boolean isIOException(Throwable e)
isIOException in interface ConnectorInterfaceisIOException in class Connectore - Exception
public void terminate()
terminate in interface ConnectorInterfaceterminate in class Connector
public void selectEntries()
throws Exception
selectEntries in interface ConnectorInterfaceselectEntries in class ConnectorException - Exception thrown during database operationsgetNextEntry()
public Entry getNextEntry()
throws Exception
getNextEntry in interface ConnectorInterfacegetNextEntry in class ConnectorException - Exception thrown during database operationsConnector.selectEntries()
public Entry findEntry(SearchCriteria search)
throws Exception
findEntry in interface ConnectorInterfacefindEntry in class Connectorsearch - The search criteria used to locate the entry to be modified
Any - exceptions thrown by the connector's underlying classes
Exception - Any exceptions thrown by the connector's underlying classes
public void modEntry(Entry entry,
SearchCriteria search)
throws Exception
modEntry in interface ConnectorInterfacemodEntry in class Connectorentry - The entry datasearch - The search criteria used to locate the entry to be modified
Exception - Any exceptions thrown by the connector's underlying classes
public void putEntry(Entry entry)
throws Exception
putEntry in interface ConnectorInterfaceputEntry in class Connectorentry - The entry object
Exception - Any exceptions thrown by the connector's underlying classes
public void deleteEntry(Entry entry,
SearchCriteria search)
throws Exception
deleteEntry in interface ConnectorInterfacedeleteEntry in class Connectorentry - The entry datasearch - The search criteria used to locate the entry to be modified
Any - exceptions thrown by the connector's underlying classes
Exception - Any exceptions thrown by the connector's underlying classespublic String execSQL(String sql)
sql - The SQL statement to execute
public String execSQLSelect(String sql)
sql - The SQL statement to execute
public Entry getNextSQLSelectEntry()
throws Exception
ExceptionexecSQLSelect(java.lang.String)
public void commit()
throws SQLException
SQLException - Thrown if an error occurs
public void rollback()
throws SQLException
SQLException - Thrown if an error occurscommit(),
setCommitMode(java.lang.String)public boolean setCommitMode(String mode)
mode - The intended behavior. Possible values are:
commit()
public Vector queryTables()
throws Exception
queryTables in class ConnectorException - Thrown if error occursVector
public Object querySchema(Object table)
throws Exception
querySchema in interface ConnectorInterfacequerySchema in class Connectortable - Entry object
Exception - Thrown if error occursEntry,
Vectorpublic Statement getStatement()
public void setResultSet(ResultSet rs)
throws Exception
rs - The new resultSet value
Exception - Thrown if error occurspublic Connection getConnection()
public String getWhereClause(SearchCriteria search,
boolean ps)
throws Exception
search - SearchCriteriaps - Boolean which determines if is a prepared statement.
Exception - Thrown if error occurs
public String getSubClause(SearchCriteria.rscSearch rs,
boolean ps)
throws Exception
Exception
public String sqlValue(String name,
Object value)
public void saveMetaData(ResultSetMetaData md)
throws SQLException
md - ResultSetMetaData
SQLException - Thrown if there is an error
public void setCurrent(Entry entry,
SearchCriteria search)
Connector
setCurrent in interface ConnectorInterfacesetCurrent in class Connectorentry - The entry we want to find for modification/deletesearch - The SearchCriteria we want to changepublic String getVersion()
getVersion in interface VersionInfoInterface
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||