Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


oracle.jdbc
Interface OracleTranslatingConnection


public interface OracleTranslatingConnection

Declares convenience methods to get non translating Statements, PreparedStatements or CallableStatements from a SQL Translation enabled connection. All the methods defined here are counterparts to similar methods defined in java.sql.Connection, with an additional boolean flag. If the flag translation is true then the resulting Statement will have SQL Translation enabled just like you would get from a Translation enabled Connection. Else if the flag is false then the resulting Statment will not have translation enabled. Only a translation enabled connection can be handled with a reference to this interface.


Nested Class Summary
static class OracleTranslatingConnection.SqlTranslationVersion
          Enumeration of various Translation versions of a query.

 

Method Summary
 Statement createStatement(boolean translation)
           
 Statement createStatement(int resultSetType, int resultSetConcurrency, boolean translation)
           
 Statement createStatement(int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation)
           
 Map<OracleTranslatingConnection.SqlTranslationVersion,String> getSqlTranslationVersions(String sql, boolean suppressExceptions)
          Returns a map of all the translation versions of the query during SQL Translation.
 CallableStatement prepareCall(String sql, boolean translation)
           
 CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, boolean translation)
           
 CallableStatement prepareCall(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation)
           
 PreparedStatement prepareStatement(String sql, boolean translation)
           
 PreparedStatement prepareStatement(String sql, int[] columnIndexes, boolean translation)
           
 PreparedStatement prepareStatement(String sql, int autoGeneratedKeys, boolean translation)
           
 PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, boolean translation)
           
 PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability, boolean translation)
           
 PreparedStatement prepareStatement(String sql, String[] columnNames, boolean translation)
           

 

Method Detail

createStatement

Statement createStatement(boolean translation)
                          throws SQLException
Throws:
SQLException

createStatement

Statement createStatement(int resultSetType,
                          int resultSetConcurrency,
                          boolean translation)
                          throws SQLException
Throws:
SQLException

createStatement

Statement createStatement(int resultSetType,
                          int resultSetConcurrency,
                          int resultSetHoldability,
                          boolean translation)
                          throws SQLException
Throws:
SQLException

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   boolean translation)
                                   throws SQLException
Throws:
SQLException

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   int autoGeneratedKeys,
                                   boolean translation)
                                   throws SQLException
Throws:
SQLException

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   int[] columnIndexes,
                                   boolean translation)
                                   throws SQLException
Throws:
SQLException

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   String[] columnNames,
                                   boolean translation)
                                   throws SQLException
Throws:
SQLException

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   int resultSetType,
                                   int resultSetConcurrency,
                                   boolean translation)
                                   throws SQLException
Throws:
SQLException

prepareStatement

PreparedStatement prepareStatement(String sql,
                                   int resultSetType,
                                   int resultSetConcurrency,
                                   int resultSetHoldability,
                                   boolean translation)
                                   throws SQLException
Throws:
SQLException

prepareCall

CallableStatement prepareCall(String sql,
                              boolean translation)
                              throws SQLException
Throws:
SQLException

prepareCall

CallableStatement prepareCall(String sql,
                              int resultSetType,
                              int resultSetConcurrency,
                              boolean translation)
                              throws SQLException
Throws:
SQLException

prepareCall

CallableStatement prepareCall(String sql,
                              int resultSetType,
                              int resultSetConcurrency,
                              int resultSetHoldability,
                              boolean translation)
                              throws SQLException
Throws:
SQLException

getSqlTranslationVersions

Map<OracleTranslatingConnection.SqlTranslationVersion,String> getSqlTranslationVersions(String sql,
                                                                                        boolean suppressExceptions)
                                                                                        throws SQLException
Returns a map of all the translation versions of the query during SQL Translation. See SqlTranslationVersion enum for more details about returning versions.
Parameters:
sql - vendor specific sql to be translated
suppressExceptions - 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.
Returns:
Map with all the translation versions of a query. In case of an Exception and if suppressExceptions is true then the TRANSLATED version in the map is null.
Throws:
SQLException - If there is a problem in query translation provided suppressExceptions is false.
See Also:
OracleTranslatingConnection.SqlTranslationVersion

Skip navigation links

Oracle®Database JDBC Java API Reference
12c Release 1 (12.1.0.2)
E56669-01


Copyright © 2008, 2014, Oracle and/or its affiliates. All rights reserved.