public abstract class BabelfishConnection extends BabelfishGenericProxy implements OracleTranslatingConnection
OracleTranslatingConnection.SqlTranslationVersion| Constructor and Description |
|---|
BabelfishConnection() |
| Modifier and Type | Method and Description |
|---|---|
void |
close()
Releases this
Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released. |
Statement |
createStatement()
Creates a
Statement with translation features enabled |
Statement |
createStatement(boolean translation)
Similar to createStatement() but with an additional translation flag.
|
Statement |
createStatement(int resultSetType, int resultSetConcurrency)
Returns a
Statement with translation features enabled |
Statement |
createStatement(int resultSetType, int resultSetConcurrency, boolean translation)
Similar to createStatement(int resultSetType, int resultSetConcurrency) but with an additional translation flag.
|
Statement |
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Returns a
Statement with translation features enabled |
Statement |
createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation)
Similar to createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) but with an additional translation flag.
|
protected abstract Object |
getCreator() |
protected abstract Object |
getDelegate() |
Map<OracleTranslatingConnection.SqlTranslationVersion,String> |
getSqlTranslationVersions(String sql, boolean suppressExceptions)
Returns a map of all the translation versions of the query during SQL Translation.
|
String |
nativeSQL(String sql)
Converts the given foreign dialect SQL statement into the system's native SQL grammar.
|
protected Object |
post_Methods(Method m, Object result)
Post interceptor.
|
CallableStatement |
prepareCall(String sql)
Translation enabled implementation of java.sql.Connection#prepareCall(java.lang.String)
|
CallableStatement |
prepareCall(String sql, boolean translation)
Similar to prepareCall(String sql) but with an additional translation flag.
|
CallableStatement |
prepareCall(String sql, int resultSetType, int resultSetConcurrency)
Translation enabled implementation of java.sql.Connection#prepareCall(java.lang.String, int, int)
|
CallableStatement |
prepareCall(String sql, int resultSetType, int resultSetConcurrency, boolean translation)
Similar to prepareCall(String sql, int resultSetType, int resultSetConcurrency) but with an additional translation flag.
|
CallableStatement |
prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Translation enabled implementation of java.sql.Connection#prepareCall(java.lang.String, int, int, int)
|
CallableStatement |
prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation)
Similar to prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) but with an additional translation flag.
|
PreparedStatement |
prepareStatement(String sql)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String)
|
PreparedStatement |
prepareStatement(String sql, boolean translation)
Similar to prepareStatement(String sql) but with an additional translation flag.
|
PreparedStatement |
prepareStatement(String sql, int autoGeneratedKeys)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int)
|
PreparedStatement |
prepareStatement(String sql, int[] columnIndexes)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int[])
|
PreparedStatement |
prepareStatement(String sql, int[] columnIndexes, boolean translation)
Similar to prepareStatement(String sql, int[] columnIndexes) but with an additional translation flag.
|
PreparedStatement |
prepareStatement(String sql, int autoGeneratedKeys, boolean translation)
Similar to prepareStatement(String sql, int autoGeneratedKeys) but with an additional translation flag.
|
PreparedStatement |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int, int)
|
PreparedStatement |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, boolean translation)
Similar to prepareStatement(String sql, int resultSetType, int resultSetConcurrency) but with an additional translation flag.
|
PreparedStatement |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int, int, int)
|
PreparedStatement |
prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation)
Similar to prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) but with an additional translation flag.
|
PreparedStatement |
prepareStatement(String sql, String[] columnNames)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, java.lang.String[])
|
PreparedStatement |
prepareStatement(String sql, String[] columnNames, boolean translation)
Similar to prepareStatement(String sql, String[] columnNames) but with an additional translation flag.
|
protected abstract Object |
proxify(Object d, Object creator) |
protected Object |
translateError(Method m, SQLException ex)
Interceptor for translation of errors.
|
protected abstract Object getCreator()
getCreator in class BabelfishGenericProxyprotected abstract Object getDelegate()
getDelegate in class BabelfishGenericProxyprotected Object translateError(Method m, SQLException ex) throws SQLException
translateError in class BabelfishGenericProxySQLExceptionprotected Object post_Methods(Method m, Object result)
post_Methods in class BabelfishGenericProxypublic PreparedStatement prepareStatement(String sql) throws SQLException
sql -SQLExceptionConnection.prepareStatement(java.lang.String)public PreparedStatement prepareStatement(String sql, int autoGeneratedKeys) throws SQLException
sql -SQLExceptionConnection.prepareStatement(java.lang.String, int)public PreparedStatement prepareStatement(String sql, int[] columnIndexes) throws SQLException
sql -SQLExceptionConnection.prepareStatement(java.lang.String, int[])public PreparedStatement prepareStatement(String sql, String[] columnNames) throws SQLException
sql -SQLExceptionConnection.prepareStatement(java.lang.String, java.lang.String[])public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
sql -SQLExceptionConnection.prepareStatement(java.lang.String, int, int)public PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
sql -SQLExceptionConnection.prepareStatement(java.lang.String, int, int, int)public CallableStatement prepareCall(String sql) throws SQLException
sql -SQLExceptionConnection.prepareCall(java.lang.String)public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
sql -SQLExceptionConnection.prepareCall(java.lang.String, int, int)public CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
sql -SQLExceptionConnection.prepareCall(java.lang.String, int, int, int)public String nativeSQL(String sql) throws SQLException
sql - a foreign dialect SQL statement that may contain one or more '?' parameter placeholdersSQLException - if a database access error occurs or this method is called on a closed connectionpublic void close()
throws SQLException
Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.
Calling the method close on a Connection object that is already closed is a no-op.
It is strongly recommended that an application explicitly commits or rolls back an active transaction prior to calling the close method. If the close method is called and there is an active transaction, the results are implementation-defined.
SQLException - SQLException if a database access error occurspublic Statement createStatement() throws SQLException
Statement with translation features enabledSQLExceptionConnection.createStatement()public Statement createStatement(boolean translation) throws SQLException
Statement will have translation enabled. If the flag is false then the returning Statement will be a normal Statement with no translation features.createStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
Statement with translation features enabledSQLExceptionConnection.createStatement(int, int)public Statement createStatement(int resultSetType, int resultSetConcurrency, boolean translation) throws SQLException
Statement will have translation enabled. If the flag is false then the returning Statement will be a normal Statement with no translation features.createStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
Statement with translation features enabledSQLExceptionConnection.createStatement(int, int, int)public Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation) throws SQLException
Statement will have translation enabled. If the flag is false then the returning Statement will be a normal Statement with no translation features.createStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic PreparedStatement prepareStatement(String sql, boolean translation) throws SQLException
PreparedStatement will have translation enabled. If the flag is false then the returning PreparedStatement will be a normal PreparedStatement with no translation features.prepareStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic PreparedStatement prepareStatement(String sql, int autoGeneratedKeys, boolean translation) throws SQLException
PreparedStatement will have translation enabled. If the flag is false then the returning PreparedStatement will be a normal PreparedStatement with no translation features.prepareStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic PreparedStatement prepareStatement(String sql, int[] columnIndexes, boolean translation) throws SQLException
PreparedStatement will have translation enabled. If the flag is false then the returning PreparedStatement will be a normal PreparedStatement with no translation features.prepareStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic PreparedStatement prepareStatement(String sql, String[] columnNames, boolean translation) throws SQLException
PreparedStatement will have translation enabled. If the flag is false then the returning PreparedStatement will be a normal PreparedStatement with no translation features.prepareStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, boolean translation) throws SQLException
PreparedStatement will have translation enabled. If the flag is false then the returning PreparedStatement will be a normal PreparedStatement with no translation features.prepareStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation) throws SQLException
PreparedStatement will have translation enabled. If the flag is false then the returning PreparedStatement will be a normal PreparedStatement with no translation features.prepareStatement in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic CallableStatement prepareCall(String sql, boolean translation) throws SQLException
CallableStatement will have translation enabled. If the flag is false then the returning CallableStatement will be a normal CallableStatement with no translation features.prepareCall in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, boolean translation) throws SQLException
CallableStatement will have translation enabled. If the flag is false then the returning CallableStatement will be a normal CallableStatement with no translation features.prepareCall in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation) throws SQLException
CallableStatement will have translation enabled. If the flag is false then the returning CallableStatement will be a normal CallableStatement with no translation features.prepareCall in interface OracleTranslatingConnectiontranslation - boolean flag to enable or disable translationSQLExceptionpublic Map<OracleTranslatingConnection.SqlTranslationVersion,String> getSqlTranslationVersions(String sql, boolean suppressExceptions) throws SQLException
getSqlTranslationVersions in interface OracleTranslatingConnectionsql - vendor specific sql to be translatedsuppressExceptions - suppresses any exception raised during query translation and returns whatever is available. Useful to get JDBC_MARKER_CONVERTED version when the translation is throwing error.SQLException - If there is a problem in query translation provided suppressExceptions is false.OracleTranslatingConnection