|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--superwaba.ext.xplat.sql.Connection
This interface provides methods for managing a connection to a database.
Field Summary | |
static int |
TRANSACTION_NONE
This transaction isolation level indicates that transactions are not supported. |
static int |
TRANSACTION_READ_COMMITTED
This transaction isolation leve indicates that only committed data from other transactions will be read. |
static int |
TRANSACTION_READ_UNCOMMITTED
This transaction isolation level indicates that one transaction can read modifications by other transactions before the other transactions have committed their changes. |
static int |
TRANSACTION_REPEATABLE_READ
This transaction isolation level indicates that only committed data from other transactions will be read. |
static int |
TRANSACTION_SERIALIZABLE
This transaction isolation level indicates that only committed data from other transactions will be read. |
Constructor Summary | |
Connection()
|
Method Summary | |
abstract void |
clearWarnings()
This method clears all warnings that have occurred on this connection. |
abstract void |
close()
This method immediately closes this database connection. |
abstract void |
commit()
This method commits any SQL statements executed on this connection since the last commit or rollback. |
abstract Statement |
createStatement()
This method creates a new SQL statement. |
abstract Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
This method creates a new SQL statement with the specified type and concurrency. |
abstract boolean |
getAutoCommit()
This method tests whether or not auto commit mode is currently enabled. |
abstract String |
getCatalog()
This method returns the name of the catalog in use by this connection, if any. |
abstract DatabaseMetaData |
getMetaData()
This method returns the meta data for this database connection. |
abstract int |
getTransactionIsolation()
This method returns the current transaction isolation mode. |
abstract SQLWarning |
getWarnings()
This method returns the first warning that occurred on this connection, if any. |
abstract boolean |
isClosed()
This method tests whether or not this connection has been closed. |
abstract PreparedStatement |
prepareStatement(String sql)
This method creates a new PreparedStatement for the specified
SQL string. |
abstract PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
This method creates a new PreparedStatement for the specified
SQL string. |
abstract void |
rollback()
This method rolls back any SQL statements executed on this connection since the last commit or rollback. |
abstract void |
setAutoCommit(boolean autoCommit)
This method turns auto commit mode on or off. |
abstract void |
setCatalog(String catalog)
This method sets the name of the catalog in use by this connection. |
abstract void |
setTransactionIsolation(int level)
This method sets the current transaction isolation mode. |
Methods inherited from class java.lang.Object |
equals,
getClass,
hashCode,
notify,
toString,
wait,
wait |
Field Detail |
public static final int TRANSACTION_NONE
public static final int TRANSACTION_READ_UNCOMMITTED
public static final int TRANSACTION_READ_COMMITTED
public static final int TRANSACTION_REPEATABLE_READ
public static final int TRANSACTION_SERIALIZABLE
Constructor Detail |
public Connection()
Method Detail |
public abstract Statement createStatement() throws SQLException
Statement
object.Statement
public abstract PreparedStatement prepareStatement(String sql) throws SQLException
PreparedStatement
for the specified
SQL string. This method is designed for use with parameterized
statements. The default result set type and concurrency will be used.The
- SQL statement to use in creating this
PreparedStatement
.PreparedStatement
.PreparedStatement
public abstract void setAutoCommit(boolean autoCommit) throws SQLException
autoCommit
- true
to enable auto commit mode,
false
to disable it.commit()
,
rollback()
public abstract boolean getAutoCommit() throws SQLException
true
if auto commit mode is enabled,
false
otherwise.commit()
,
rollback()
public abstract void commit() throws SQLException
public abstract void rollback() throws SQLException
public abstract void close() throws SQLException
public abstract boolean isClosed() throws SQLException
true
if the connection is closed, false
otherwise.public abstract DatabaseMetaData getMetaData() throws SQLException
DatabaseMetaData
public abstract void setCatalog(String catalog) throws SQLException
catalog
- The name of the catalog to use for this connection.public abstract String getCatalog() throws SQLException
null
if one does not
exist or catalogs are not supported by this database.public abstract void setTransactionIsolation(int level) throws SQLException
level
- The transaction isolation level.public abstract int getTransactionIsolation() throws SQLException
public abstract SQLWarning getWarnings() throws SQLException
SQLWarning
that occurred, or
null
if there have been no warnings.public abstract void clearWarnings() throws SQLException
public abstract Statement createStatement(int resultSetType, int resultSetConcurrency) throws SQLException
ResultSet
class.resultSetType
- The type of result set to use for this statement.resultSetConcurrency.
- The type of concurrency to be used in
the result set for this statement.Statement
object.Statement
,
ResultSet
public abstract PreparedStatement prepareStatement(String sql, int resultSetType, int resultSetConcurrency) throws SQLException
PreparedStatement
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
ResultSet
class.The
- SQL statement to use in creating this
PreparedStatement
.resultSetType
- The type of result set to use for this statement.resultSetConcurrency.
- The type of concurrency to be used in
the result set for this statement.PreparedStatement
.PreparedStatement
,
ResultSet
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |