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
`BabelfishStatement()`

### Method Summary

All Methods Instance Methods Abstract Methods Concrete Methods
`void` `addBatch​(String sql)` Translation compliant implementation of java.sql.Statement#addBatch(java.lang.String)
`boolean` `execute​(String sql)` Translation compliant implementation of java.sql.Statement#execute(java.lang.String)
`boolean` `execute​(String sql, int autoGeneratedKeys)` Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int)
`boolean` `execute​(String sql, int[] columnIndexes)` Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int[])
`boolean` `execute​(String sql, String[] columnNames)` Translation compliant implementation of java.sql.Statement#execute(java.lang.String, java.lang.String[])
`ResultSet` `executeQuery​(String sql)` Translation compliant implementation of java.sql.Statement#executeQuery(java.lang.String)
`int` `executeUpdate​(String sql)` Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String)
`int` `executeUpdate​(String sql, int autoGeneratedKeys)` Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int)
`int` `executeUpdate​(String sql, int[] columnIndexes)` Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int[])
`int` `executeUpdate​(String sql, String[] columnNames)` Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[])
`protected abstract Object` `getCreator()`
`protected abstract Object` `getDelegate()`
`protected Object` `post_Methods​(Method m, Object result)` Post method interceptor.
`protected abstract Object` `proxify​(Object d, Object creator)`
`protected Object` `translateError​(Method m, SQLException ex)` Error interceptor.

### Methods inherited from class java.lang.Object

`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

### Constructor Detail

#### BabelfishStatement

    public BabelfishStatement()

### Method Detail

#### getCreator

    protected abstract Object getCreator()

Specified by:
  `getCreator` in class `BabelfishGenericProxy`
Returns:

#### getDelegate

    protected abstract Object getDelegate()

Specified by:
  `getDelegate` in class `BabelfishGenericProxy`
Returns:

#### proxify

    protected abstract Object proxify​(Object d,
                                      Object creator)

#### translateError

    protected Object translateError​(Method m,
                                    SQLException ex)
                             throws SQLException

Error interceptor. Handles the translation of error.

Overrides:
  `translateError` in class `BabelfishGenericProxy`
Parameters:
  `m` -
  `ex` -
Returns:
Throws:
  `SQLException`

#### post_Methods

    protected Object post_Methods​(Method m,
                                  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 class `BabelfishGenericProxy`
Parameters:
  `m` -
  `result` -
Returns:

#### addBatch

    public void addBatch​(String sql)
                  throws SQLException

Translation compliant implementation of java.sql.Statement#addBatch(java.lang.String)

Parameters:
  `sql` -
Throws:
  `SQLException`
See Also:
  `Statement.addBatch(java.lang.String)`

#### execute

    public boolean execute​(String sql)
                    throws SQLException

Translation compliant implementation of java.sql.Statement#execute(java.lang.String)

Parameters:
  `sql` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.execute(java.lang.String)`

#### execute

    public boolean execute​(String sql,
                           int autoGeneratedKeys)
                    throws SQLException

Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int)

Parameters:
  `sql` -
  `autoGeneratedKeys` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.execute(java.lang.String, int)`

#### execute

    public boolean execute​(String sql,
                           int[] columnIndexes)
                    throws SQLException

Translation compliant implementation of java.sql.Statement#execute(java.lang.String, int[])

Parameters:
  `sql` -
  `columnIndexes` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.execute(java.lang.String, int[])`

#### execute

    public boolean execute​(String sql,
                           String[] columnNames)
                    throws SQLException

Translation compliant implementation of java.sql.Statement#execute(java.lang.String, java.lang.String[])

Parameters:
  `sql` -
  `columnNames` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.execute(java.lang.String, java.lang.String[])`

#### executeQuery

    public ResultSet executeQuery​(String sql)
                           throws SQLException

Translation compliant implementation of java.sql.Statement#executeQuery(java.lang.String)

Parameters:
  `sql` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.executeQuery(java.lang.String)`

#### executeUpdate

    public int executeUpdate​(String sql)
                      throws SQLException

Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String)

Parameters:
  `sql` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.executeUpdate(java.lang.String)`

#### executeUpdate

    public int executeUpdate​(String sql,
                             int autoGeneratedKeys)
                      throws SQLException

Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int)

Parameters:
  `sql` -
  `autoGeneratedKeys` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.executeUpdate(java.lang.String, int)`

#### executeUpdate

    public int executeUpdate​(String sql,
                             int[] columnIndexes)
                      throws SQLException

Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, int[])

Parameters:
  `sql` -
  `columnIndexes` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.executeUpdate(java.lang.String, int[])`

#### executeUpdate

    public int executeUpdate​(String sql,
                             String[] columnNames)
                      throws SQLException

Translation compliant implementation of java.sql.Statement#executeUpdate(java.lang.String, java.lang.String[])

Parameters:
  `sql` -
  `columnNames` -
Returns:
Throws:
  `SQLException`
See Also:
  `Statement.executeUpdate(java.lang.String, java.lang.String[])`