Package oracle.jdbc.babelfish
Class BabelfishStatement
- java.lang.Object
-
- oracle.jdbc.babelfish.BabelfishGenericProxy
-
- oracle.jdbc.babelfish.BabelfishStatement
-
- Direct Known Subclasses:
BabelfishPreparedStatement
public abstract class BabelfishStatement extends BabelfishGenericProxy
Proxy Superclass for java.sql.Statement interface. It is used by the Oracle JDBC proxy library to proxify java.sql.Statement objects to support the auto translation features.
-
-
Constructor Summary
Constructors Constructor Description BabelfishStatement()
-
Method Summary
All Methods Instance Methods Abstract Methods Concrete Methods Modifier and Type Method Description voidaddBatch(java.lang.String sql)Translation compliant implementation of java.sql.Statement#addBatch(java.lang.String)booleanexecute(java.lang.String sql)Translation compliant implementation of java.sql.Statement#execute(java.lang.String)booleanexecute(java.lang.String sql, int autoGeneratedKeys)Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int)booleanexecute(java.lang.String sql, int[] columnIndexes)Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int[])booleanexecute(java.lang.String sql, java.lang.String[] columnNames)Translation compliant implementation of java.sql.Statement#execute(java.lang.String, java.lang.String[])java.sql.ResultSetexecuteQuery(java.lang.String sql)Translation compliant implementation of java.sql.Statement#executeQuery(java.lang.String)intexecuteUpdate(java.lang.String sql)Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String)intexecuteUpdate(java.lang.String sql, int autoGeneratedKeys)Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int)intexecuteUpdate(java.lang.String sql, int[] columnIndexes)Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int[])intexecuteUpdate(java.lang.String sql, java.lang.String[] columnNames)Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[])protected abstract java.lang.ObjectgetCreator()protected abstract java.lang.ObjectgetDelegate()protected java.lang.Objectpost_Methods(java.lang.reflect.Method m, java.lang.Object result)Post method interceptor.protected abstract java.lang.Objectproxify(java.lang.Object d, java.lang.Object creator)protected java.lang.ObjecttranslateError(java.lang.reflect.Method m, java.sql.SQLException ex)Error interceptor.
-
-
-
Method Detail
-
getCreator
protected abstract java.lang.Object getCreator()
- Specified by:
getCreatorin classBabelfishGenericProxy- Returns:
-
getDelegate
protected abstract java.lang.Object getDelegate()
- Specified by:
getDelegatein classBabelfishGenericProxy- Returns:
-
proxify
protected abstract java.lang.Object proxify(java.lang.Object d, java.lang.Object creator)
-
translateError
protected java.lang.Object translateError(java.lang.reflect.Method m, java.sql.SQLException ex) throws java.sql.SQLExceptionError interceptor. Handles the translation of error.- Overrides:
translateErrorin classBabelfishGenericProxy- Parameters:
m-ex-- Returns:
- Throws:
java.sql.SQLException
-
post_Methods
protected java.lang.Object post_Methods(java.lang.reflect.Method m, java.lang.Object result)Post method interceptor. Sets the translator in the returning object if the returning object is a child of BabelfishGenericProxy- Overrides:
post_Methodsin classBabelfishGenericProxy- Parameters:
m-result-- Returns:
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#addBatch(java.lang.String)- Parameters:
sql-- Throws:
java.sql.SQLException- See Also:
Statement.addBatch(java.lang.String)
-
execute
public boolean execute(java.lang.String sql) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#execute(java.lang.String)- Parameters:
sql-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.execute(java.lang.String)
-
execute
public boolean execute(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#execute(java.lang.String, int)- Parameters:
sql-autoGeneratedKeys-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.execute(java.lang.String, int)
-
execute
public boolean execute(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#execute(java.lang.String, int[])- Parameters:
sql-columnIndexes-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.execute(java.lang.String, int[])
-
execute
public boolean execute(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#execute(java.lang.String, java.lang.String[])- Parameters:
sql-columnNames-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.execute(java.lang.String, java.lang.String[])
-
executeQuery
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#executeQuery(java.lang.String)- Parameters:
sql-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.executeQuery(java.lang.String)
-
executeUpdate
public int executeUpdate(java.lang.String sql) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String)- Parameters:
sql-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.executeUpdate(java.lang.String)
-
executeUpdate
public int executeUpdate(java.lang.String sql, int autoGeneratedKeys) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int)- Parameters:
sql-autoGeneratedKeys-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.executeUpdate(java.lang.String, int)
-
executeUpdate
public int executeUpdate(java.lang.String sql, int[] columnIndexes) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int[])- Parameters:
sql-columnIndexes-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.executeUpdate(java.lang.String, int[])
-
executeUpdate
public int executeUpdate(java.lang.String sql, java.lang.String[] columnNames) throws java.sql.SQLExceptionTranslation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[])- Parameters:
sql-columnNames-- Returns:
- Throws:
java.sql.SQLException- See Also:
Statement.executeUpdate(java.lang.String, java.lang.String[])
-
-