API Overview API Index Package Overview Direct link to this page
JDK 1.6
  java.sql. Connection View Source
Author(s)
Since
Version
Serial
Hierarchy
 Wrapper
      Connection
Subinterfaces
Description
public interface Connection
  A connection (session) with a specific database.
Methods
Hide/Show inherited methods
public void clearWarnings () throws SQLException
  Clears all warnings reported for this Connection object.
public void close () throws SQLException
  Releases this Connection object's database and JDBC resources immediately instead of waiting for them to be automatically released.
public void commit () throws SQLException
  Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by this Connection object.
public Array createArrayOf (String typeName, Object elements) throws SQLException
  Factory method for creating Array objects.
public Blob createBlob () throws SQLException
  Constructs an object that implements the Blob interface.
public Clob createClob () throws SQLException
  Constructs an object that implements the Clob interface.
public NClob createNClob () throws SQLException
  Constructs an object that implements the NClob interface.
public SQLXML createSQLXML () throws SQLException
  Constructs an object that implements the SQLXML interface.
public Statement createStatement () throws SQLException
  Creates a Statement object for sending SQL statements to the database.
public Statement createStatement (int resultSetType, int resultSetConcurrency) throws SQLException
  Creates a Statement object that will generate ResultSet objects with the given type and concurrency.
public Statement createStatement (int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
  Creates a Statement object that will generate ResultSet objects with the given type, concurrency, and holdability.
public Struct createStruct (String typeName, Object attributes) throws SQLException
  Factory method for creating Struct objects.
public boolean getAutoCommit () throws SQLException
  Retrieves the current auto-commit mode for this Connection object.
public String getCatalog () throws SQLException
  Retrieves this Connection object's current catalog name.
public Properties getClientInfo () throws SQLException
  Returns a list containing the name and current value of each client info property supported by the driver.
public String getClientInfo (String name) throws SQLException
  Returns the value of the client info property specified by name.
public int getHoldability () throws SQLException
  Retrieves the current holdability of ResultSet objects created using this Connection object.
public DatabaseMetaData getMetaData () throws SQLException
  Retrieves a DatabaseMetaData object that contains metadata about the database to which this Connection object represents a connection.
public int getTransactionIsolation () throws SQLException
  Retrieves this Connection object's current transaction isolation level.
public Map<String, Class<Object>> getTypeMap () throws SQLException
  Retrieves the Map object associated with this Connection object.
public SQLWarning getWarnings () throws SQLException
  Retrieves the first warning reported by calls on this Connection object.
public boolean isClosed () throws SQLException
  Retrieves whether this Connection object has been closed.
public boolean isReadOnly () throws SQLException
  Retrieves whether this Connection object is in read-only mode.
public boolean isValid (int timeout) throws SQLException
  Returns true if the connection has not been closed and is still valid.
public String nativeSQL (String sql) throws SQLException
  Converts the given SQL statement into the system's native SQL grammar.
public CallableStatement prepareCall (String sql) throws SQLException
  Creates a CallableStatement object for calling database stored procedures.
public CallableStatement prepareCall (String sql, int resultSetType, int resultSetConcurrency) throws SQLException
  Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
public CallableStatement prepareCall (String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
  Creates a CallableStatement object that will generate ResultSet objects with the given type and concurrency.
public PreparedStatement prepareStatement (String sql) throws SQLException
  Creates a PreparedStatement object for sending parameterized SQL statements to the database.
public PreparedStatement prepareStatement (String sql, int autoGeneratedKeys) throws SQLException
  Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys.
public PreparedStatement prepareStatement (String sql, int[] columnIndexes) throws SQLException
  Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
public PreparedStatement prepareStatement (String sql, int resultSetType, int resultSetConcurrency) throws SQLException
  Creates a PreparedStatement object that will generate ResultSet objects with the given type and concurrency.
public PreparedStatement prepareStatement (String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
  Creates a PreparedStatement object that will generate ResultSet objects with the given type, concurrency, and holdability.
public PreparedStatement prepareStatement (String sql, String columnNames) throws SQLException
  Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array.
public void releaseSavepoint (Savepoint savepoint) throws SQLException
  Removes the specified Savepoint and subsequent Savepoint objects from the current transaction.
public void rollback () throws SQLException
  Undoes all changes made in the current transaction and releases any database locks currently held by this Connection object.
public void rollback (Savepoint savepoint) throws SQLException
  Undoes all changes made after the given Savepoint object was set.
public void setAutoCommit (boolean autoCommit) throws SQLException
  Sets this connection's auto-commit mode to the given state.
public void setCatalog (String catalog) throws SQLException
  Sets the given catalog name in order to select a subspace of this Connection object's database in which to work.
public void setClientInfo (Properties properties) throws SQLClientInfoException
  Sets the value of the connection's client info properties.
public void setClientInfo (String name, String value) throws SQLClientInfoException
  Sets the value of the client info property specified by name to the value specified by value.
public void setHoldability (int holdability) throws SQLException
  Changes the default holdability of ResultSet objects created using this Connection object to the given holdability.
public void setReadOnly (boolean readOnly) throws SQLException
  Puts this connection in read-only mode as a hint to the driver to enable database optimizations.
public Savepoint setSavepoint () throws SQLException
  Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.
public Savepoint setSavepoint (String name) throws SQLException
  Creates a savepoint with the given name in the current transaction and returns the new Savepoint object that represents it.
public void setTransactionIsolation (int level) throws SQLException
  Attempts to change the transaction isolation level for this Connection object to the one given.
public void setTypeMap (Map<String, Class<Object>> map) throws SQLException
  Installs the given TypeMap object as the type map for this Connection object.
Fields
Hide/Show inherited fields
publicfinalstatic int TRANSACTION_NONE = "0"
A constant indicating that transactions are not supported.
publicfinalstatic int TRANSACTION_READ_COMMITTED = "2"
  A constant indicating that dirty reads are prevented; non-repeatable reads and phantom reads can occur.
publicfinalstatic int TRANSACTION_READ_UNCOMMITTED = "1"
  A constant indicating that dirty reads, non-repeatable reads and phantom reads can occur.
publicfinalstatic int TRANSACTION_REPEATABLE_READ = "4"
  A constant indicating that dirty reads and non-repeatable reads are prevented; phantom reads can occur.
publicfinalstatic int TRANSACTION_SERIALIZABLE = "8"
  A constant indicating that dirty reads, non-repeatable reads and phantom reads are prevented.
Generated By: JavaOnTracks Doclet 0.1.4     ©Thibaut Colar