diff options
author | Warren Levy <warrenl@cygnus.com> | 2000-12-01 01:48:34 +0000 |
---|---|---|
committer | Warren Levy <warrenl@gcc.gnu.org> | 2000-12-01 01:48:34 +0000 |
commit | 6934615b9736d0a777ce7f6933129ea1cdd2dd23 (patch) | |
tree | 7c67e6325a21b9cf53bbdc5648f2e7523a514436 /libjava/java/sql/Connection.java | |
parent | 95ac07b0f4d9916c7a850e3b427cbc768819d742 (diff) | |
download | gcc-6934615b9736d0a777ce7f6933129ea1cdd2dd23.zip gcc-6934615b9736d0a777ce7f6933129ea1cdd2dd23.tar.gz gcc-6934615b9736d0a777ce7f6933129ea1cdd2dd23.tar.bz2 |
Array.java: New file from classpath.
* Array.java: New file from classpath.
* BatchUpdateException.java: Ditto.
* Blob.java: Ditto.
* Clob.java: Ditto.
* Ref.java: Ditto.
* SQLData.java: Ditto.
* SQLInput.java: Ditto.
* SQLOutput.java: Ditto.
* Struct.java: Ditto.
* CallableStatement.java: Merged file from claspath.
* Connection.java: Ditto.
* DataTruncation.java: Ditto.
* DatabaseMetaData.java: Ditto.
* DriverManager.java: Ditto.
* PreparedStatement.java: Ditto.
* ResultSet.java: Ditto.
* ResultSetMetaData.java: Ditto.
* SQLException.java: Ditto.
* SQLWarning.java: Ditto.
* Statement.java: Ditto.
* Types.java: Ditto.
From-SVN: r37906
Diffstat (limited to 'libjava/java/sql/Connection.java')
-rw-r--r-- | libjava/java/sql/Connection.java | 111 |
1 files changed, 106 insertions, 5 deletions
diff --git a/libjava/java/sql/Connection.java b/libjava/java/sql/Connection.java index bb826a6..8d986aa 100644 --- a/libjava/java/sql/Connection.java +++ b/libjava/java/sql/Connection.java @@ -27,6 +27,8 @@ executable file might be covered by the GNU General Public License. */ package java.sql; +import java.util.Map; + /** * This interface provides methods for managing a connection to a database. * @@ -92,6 +94,28 @@ createStatement() throws SQLException; /*************************************************************************/ /** + * This method creates a new SQL statement with the specified type and + * concurrency. Valid values for these parameters are specified in the + * <code>ResultSet</code> class. + * + * @param resultSetType The type of result set to use for this statement. + * @param resultSetConcurrency. The type of concurrency to be used in + * the result set for this statement. + * + * @return A new <code>Statement</code> object. + * + * @exception SQLException If an error occurs. + * + * @see Statement + * @see ResultSet + */ +public abstract Statement +createStatement(int resultSetType, int resultSetConcurrency) + throws SQLException; + +/*************************************************************************/ + +/** * This method creates a new <code>PreparedStatement</code> for the specified * SQL string. This method is designed for use with parameterized * statements. The default result set type and concurrency will be used. @@ -111,6 +135,32 @@ prepareStatement(String sql) throws SQLException; /*************************************************************************/ /** + * This method creates a new <code>PreparedStatement</code> for the specified + * SQL string. This method is designed for use with parameterized + * statements. The specified result set type and concurrency will be used. + * Valid values for these parameters are specified in the + * <code>ResultSet</code> class. + * + * @param The SQL statement to use in creating this + * <code>PreparedStatement</code>. + * @param resultSetType The type of result set to use for this statement. + * @param resultSetConcurrency. The type of concurrency to be used in + * the result set for this statement. + * + * @return A new <code>PreparedStatement</code>. + * + * @exception SQLException If an error occurs. + * + * @see PreparedStatement + * @see ResultSet + */ +public abstract PreparedStatement +prepareStatement(String sql, int resultSetType, int resultSetConcurrency) + throws SQLException; + +/*************************************************************************/ + +/** * This method creates a new <code>CallableStatement</code> for the * specified SQL string. Thie method is designed to be used with * stored procedures. The default result set type and concurrency @@ -131,6 +181,32 @@ prepareCall(String sql) throws SQLException; /*************************************************************************/ /** + * This method creates a new <code>CallableStatement</code> for the + * specified SQL string. Thie method is designed to be used with + * stored procedures. The specified result set type and concurrency + * will be used. Valid values for these parameters are specified in the + * <code>ResultSet</code> class. + * + * @param The SQL statement to use in creating this + * <code>PreparedStatement</code>. + * @param resultSetType The type of result set to use for this statement. + * @param resultSetConcurrency. The type of concurrency to be used in + * the result set for this statement. + * + * @return A new <code>CallableStatement</code>. + * + * @exception SQLException If an error occurs. + * + * @see CallableStatement + * @see ResultSet + */ +public abstract CallableStatement +prepareCall(String sql, int resultSetType, int resultSetConcurrency) + throws SQLException; + +/*************************************************************************/ + +/** * This method converts the specified generic SQL statement into the * native grammer of the database this object is connected to. * @@ -309,12 +385,10 @@ getTransactionIsolation() throws SQLException; /*************************************************************************/ /** - * This method sets the transaction isolation level using one of the - * constants defined in this interface. + * This method sets the current transaction isolation mode. This must + * be one of the constants defined in this interface. * - * @param level The transaction isolation level to change to; must be - * one of the TRANSACTION_* isolation values with the exception of - * TRANSACTION_NONE; some databases may not support other values. + * @param level The transaction isolation level. * * @exception SQLException If an error occurs. */ @@ -346,5 +420,32 @@ getWarnings() throws SQLException; public abstract void clearWarnings() throws SQLException; +/*************************************************************************/ + +/** + * This method returns the mapping of SQL types to Java classes + * currently in use by this connection. This mapping will have no + * entries unless they have been manually added. + * + * @return The SQL type to Java class mapping. + * + * @exception SQLException If an error occurs. + */ +public abstract Map +getTypeMap() throws SQLException; + +/*************************************************************************/ + +/** + * This method sets the mapping table for SQL types to Java classes. + * Any entries in this map override the defaults. + * + * @param map The new SQL mapping table. + * + * @exception SQLException If an error occurs. + */ +public abstract void +setTypeMap(Map map) throws SQLException; + } // interface Connection |