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 void
addBatch(java.lang.String sql)
Translation compliant implementation of java.sql.Statement#addBatch(java.lang.String)boolean
execute(java.lang.String sql)
Translation compliant implementation of java.sql.Statement#execute(java.lang.String)boolean
execute(java.lang.String sql, int autoGeneratedKeys)
Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int)boolean
execute(java.lang.String sql, int[] columnIndexes)
Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int[])boolean
execute(java.lang.String sql, java.lang.String[] columnNames)
Translation compliant implementation of java.sql.Statement#execute(java.lang.String, java.lang.String[])java.sql.ResultSet
executeQuery(java.lang.String sql)
Translation compliant implementation of java.sql.Statement#executeQuery(java.lang.String)int
executeUpdate(java.lang.String sql)
Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String)int
executeUpdate(java.lang.String sql, int autoGeneratedKeys)
Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int)int
executeUpdate(java.lang.String sql, int[] columnIndexes)
Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int[])int
executeUpdate(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.Object
getCreator()
protected abstract java.lang.Object
getDelegate()
protected java.lang.Object
post_Methods(java.lang.reflect.Method m, java.lang.Object result)
Post method interceptor.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)
Error interceptor.
-
-
-
Method Detail
-
getCreator
protected abstract java.lang.Object getCreator()
- Specified by:
getCreator
in classBabelfishGenericProxy
- Returns:
-
getDelegate
protected abstract java.lang.Object getDelegate()
- Specified by:
getDelegate
in 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.SQLException
Error interceptor. Handles the translation of error.- Overrides:
translateError
in 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_Methods
in classBabelfishGenericProxy
- Parameters:
m
-result
-- Returns:
-
addBatch
public void addBatch(java.lang.String sql) throws java.sql.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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.SQLException
Translation 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[])
-
-