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. |
java.sql.Statement |
createStatement()
Creates a
Statement with translation features enabled |
java.sql.Statement |
createStatement(boolean translation)
Similar to createStatement() but with an additional translation flag.
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
Returns a
Statement with translation features enabled |
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
boolean translation)
Similar to createStatement(int resultSetType, int resultSetConcurrency) but with an
additional translation flag.
|
java.sql.Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Returns a
Statement with translation features enabled |
java.sql.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 java.lang.Object |
getCreator() |
protected abstract java.lang.Object |
getDelegate() |
java.util.Map<OracleTranslatingConnection.SqlTranslationVersion,java.lang.String> |
getSqlTranslationVersions(java.lang.String sql,
boolean suppressExceptions)
Returns a map of all the translation versions of the query during SQL
Translation.
|
java.lang.String |
nativeSQL(java.lang.String sql)
Converts the given foreign dialect SQL statement into the system's native SQL grammar.
|
protected java.lang.Object |
post_Methods(java.lang.reflect.Method m,
java.lang.Object result)
Post interceptor.
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
Translation enabled implementation of java.sql.Connection#prepareCall(java.lang.String)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
boolean translation)
Similar to prepareCall(String sql) but with an
additional translation flag.
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Translation enabled implementation of java.sql.Connection#prepareCall(java.lang.String, int, int)
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
boolean translation)
Similar to prepareCall(String sql, int resultSetType, int resultSetConcurrency) but with an
additional translation flag.
|
java.sql.CallableStatement |
prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Translation enabled implementation of java.sql.Connection#prepareCall(java.lang.String, int, int, int)
|
java.sql.CallableStatement |
prepareCall(java.lang.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.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
boolean translation)
Similar to prepareStatement(String sql) but with an
additional translation flag.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int[])
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int[] columnIndexes,
boolean translation)
Similar to prepareStatement(String sql, int[] columnIndexes) but with an
additional translation flag.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int autoGeneratedKeys,
boolean translation)
Similar to prepareStatement(String sql, int autoGeneratedKeys) but with an
additional translation flag.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int, int)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
boolean translation)
Similar to prepareStatement(String sql, int resultSetType, int resultSetConcurrency) but with an
additional translation flag.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, int, int, int)
|
java.sql.PreparedStatement |
prepareStatement(java.lang.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.
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
Translation enabled implementation of java.sql.Connection#prepareStatement(java.lang.String, java.lang.String[])
|
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql,
java.lang.String[] columnNames,
boolean translation)
Similar to prepareStatement(String sql, String[] columnNames) but with an
additional translation flag.
|
protected abstract java.lang.Object |
proxify(java.lang.Object d,
java.lang.Object creator) |
protected java.lang.Object |
translateError(java.lang.reflect.Method m,
java.sql.SQLException ex)
Interceptor for translation of errors.
|
protected abstract java.lang.Object getCreator()
getCreator in class BabelfishGenericProxyprotected abstract java.lang.Object getDelegate()
getDelegate in class BabelfishGenericProxyprotected abstract java.lang.Object proxify(java.lang.Object d,
java.lang.Object creator)
protected java.lang.Object translateError(java.lang.reflect.Method m,
java.sql.SQLException ex)
throws java.sql.SQLException
translateError in class BabelfishGenericProxyjava.sql.SQLExceptionprotected java.lang.Object post_Methods(java.lang.reflect.Method m,
java.lang.Object result)
post_Methods in class BabelfishGenericProxypublic java.sql.PreparedStatement prepareStatement(java.lang.String sql)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareStatement(java.lang.String)public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareStatement(java.lang.String, int)public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareStatement(java.lang.String, int[])public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareStatement(java.lang.String, java.lang.String[])public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareStatement(java.lang.String, int, int)public java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareStatement(java.lang.String, int, int, int)public java.sql.CallableStatement prepareCall(java.lang.String sql)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareCall(java.lang.String)public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareCall(java.lang.String, int, int)public java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
sql - java.sql.SQLExceptionConnection.prepareCall(java.lang.String, int, int, int)public java.lang.String nativeSQL(java.lang.String sql)
throws java.sql.SQLException
sql - a foreign dialect SQL statement that may contain one or more '?'
parameter placeholdersjava.sql.SQLException - if a database access error occurs
or this method is called on a closed connectionpublic void close()
throws java.sql.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.
java.sql.SQLException - SQLException if a database access error occurspublic java.sql.Statement createStatement()
throws java.sql.SQLException
Statement with translation features enabledjava.sql.SQLExceptionConnection.createStatement()public java.sql.Statement createStatement(boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws java.sql.SQLException
Statement with translation features enabledjava.sql.SQLExceptionConnection.createStatement(int, int)public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws java.sql.SQLException
Statement with translation features enabledjava.sql.SQLExceptionConnection.createStatement(int, int, int)public java.sql.Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int autoGeneratedKeys,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int[] columnIndexes,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
java.lang.String[] columnNames,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.PreparedStatement prepareStatement(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.sql.CallableStatement prepareCall(java.lang.String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability,
boolean translation)
throws java.sql.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 translationjava.sql.SQLExceptionpublic java.util.Map<OracleTranslatingConnection.SqlTranslationVersion,java.lang.String> getSqlTranslationVersions(java.lang.String sql, boolean suppressExceptions) throws java.sql.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.java.sql.SQLException - If there is a problem in query translation provided suppressExceptions is false.OracleTranslatingConnection