|
jxDBCon 0.9z | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Object | +--org.sourceforge.jxdbcon.AbstractConnection
The main class for all database connection implementations.
When subclassing, the following must be defined:
| Field Summary | |
protected Properties |
info
The properties used to create the connection. |
protected Map |
typeMap
The type map. |
protected SQLWarning |
warning
The warnings. |
| Fields inherited from interface java.sql.Connection |
TRANSACTION_NONE, TRANSACTION_READ_COMMITTED, TRANSACTION_READ_UNCOMMITTED, TRANSACTION_REPEATABLE_READ, TRANSACTION_SERIALIZABLE |
| Fields inherited from interface org.sourceforge.jxdbcon.InfoKeys |
CATALOG, DESCRIPTION, DRIVER, HOST, PASSWORD, PORT, SUBDRIVER, USER |
| Constructor Summary | |
protected |
AbstractConnection()
Construct the connection object. |
| Method Summary | |
void |
clearWarnings()
Null the warnings. |
Object |
clone()
Clone this connection. |
void |
close()
Close the connection. |
void |
commit()
Commit work. |
Statement |
createStatement()
Create a statement. |
abstract Statement |
createStatement(int resultSetType,
int resultSetConcurrency)
Create a statement. |
Statement |
createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
resultSetHoldability parameter is ignored. |
static AbstractConnection |
duplicate(AbstractConnection conn,
String newURL,
Properties newInfo)
Duplicate a connection. |
protected void |
fillPropertyInfo(ArrayList pi,
Properties info)
Fill the given list with the DriverPropertyInfo structures recognized by the driver. |
void |
finalize()
Close the connection, if it was left open. |
boolean |
getAutoCommit()
Get the auto commit state. |
String |
getCatalog()
Get the current catalog. |
protected abstract EscapeContext |
getEscapeContext(Object paramBuf,
ConversionContext paramContext)
Create an EscapeContext. |
int |
getHoldability()
Not supported. |
Properties |
getInfo()
Get the connection information. |
int |
getTransactionIsolation()
Get the transaction isolation level. |
Map |
getTypeMap()
Get the connection's type map. |
SQLWarning |
getWarnings()
Get the warning instance. |
boolean |
isClosed()
Retrieves whether this Connection object has been closed |
boolean |
isReadOnly()
Get the read only state. |
String |
nativeSQL(String sql)
Converts the given SQL statement into the system's native SQL grammar, process JDBC escapes. |
protected void |
open(String url,
Properties info)
Open the connection. |
CallableStatement |
prepareCall(String sql)
Prepare a call. |
abstract CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency)
|
CallableStatement |
prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
resultSetHoldability parameter is ignored. |
PreparedStatement |
prepareStatement(String sql)
Prepare a statement. |
PreparedStatement |
prepareStatement(String sql,
int autoGeneratedKeys)
autoGeneratedKeys parameter is ignored. |
PreparedStatement |
prepareStatement(String sql,
int[] columnIndexes)
columnIndexes parameter is ignored. |
abstract PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
|
PreparedStatement |
prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
resultSetHoldability parameter is ignored. |
PreparedStatement |
prepareStatement(String sql,
String[] columnNames)
columnNames parameter is ignored. |
void |
releaseSavepoint(Savepoint savepoint)
Not supported. |
void |
rollback()
Rollback work. |
void |
rollback(Savepoint savepoint)
Not supported. |
void |
setAutoCommit(boolean autoCommit)
Set the auto commit state. |
void |
setCatalog(String catalog)
Set the current catalog. |
void |
setHoldability(int holdability)
Not supported. |
void |
setReadOnly(boolean readOnly)
Set the read only state. |
Savepoint |
setSavepoint()
Not supported. |
Savepoint |
setSavepoint(String name)
Not supported. |
void |
setTransactionIsolation(int level)
Set the transaction isolation level. |
void |
setTypeMap(Map map)
Set the connection's type map. |
protected void |
takeOver(AbstractConnection conn)
Take over the connection to the dbms created by a different instance. |
String |
toString()
Format the connection's properties into a String. |
| Methods inherited from class java.lang.Object |
equals, getClass, hashCode, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface java.sql.Connection |
getMetaData |
| Field Detail |
protected Properties info
protected Map typeMap
getTypeMap()protected SQLWarning warning
getWarnings()| Constructor Detail |
protected AbstractConnection()
| Method Detail |
public final void clearWarnings()
clearWarnings in interface Connection
public final Object clone()
throws CloneNotSupportedException
clone in class ObjectCloneNotSupportedException
public void close()
throws SQLException
close in interface ConnectionSQLException - if an error occurs
public void commit()
throws SQLException
commit in interface ConnectionSQLException - if a database error occurs
public Statement createStatement()
throws SQLException
createStatement in interface ConnectionSQLException
public abstract Statement createStatement(int resultSetType,
int resultSetConcurrency)
throws SQLException
createStatement in interface ConnectionSQLException
public Statement createStatement(int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws SQLException
createStatement in interface ConnectionSQLException
public static AbstractConnection duplicate(AbstractConnection conn,
String newURL,
Properties newInfo)
throws SQLException
SQLException
protected void fillPropertyInfo(ArrayList pi,
Properties info)
public final void finalize()
throws Throwable
finalize in class ObjectThrowableclose()public boolean getAutoCommit()
getAutoCommit in interface Connectionpublic final String getCatalog()
getCatalog in interface Connection
protected abstract EscapeContext getEscapeContext(Object paramBuf,
ConversionContext paramContext)
public int getHoldability()
throws SQLException
getHoldability in interface ConnectionSQLException - if a database error occurspublic final Properties getInfo()
public int getTransactionIsolation()
throws SQLException
getTransactionIsolation in interface ConnectionSQLException - if a database error occurspublic final Map getTypeMap()
getTypeMap in interface Connectionpublic final SQLWarning getWarnings()
getWarnings in interface Connectionpublic final boolean isClosed()
isClosed in interface Connectionpublic boolean isReadOnly()
isReadOnly in interface Connection
public String nativeSQL(String sql)
throws SQLException
nativeSQL in interface Connectionsql - the sql statement
SQLException - if a database error occurs
protected void open(String url,
Properties info)
throws SQLException
SQLException
public CallableStatement prepareCall(String sql)
throws SQLException
prepareCall in interface ConnectionSQLException
public abstract CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
prepareCall in interface ConnectionSQLException
public CallableStatement prepareCall(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws SQLException
prepareCall in interface ConnectionSQLException
public PreparedStatement prepareStatement(String sql)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String sql,
int autoGeneratedKeys)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String sql,
int[] columnIndexes)
throws SQLException
prepareStatement in interface ConnectionSQLException
public abstract PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String sql,
int resultSetType,
int resultSetConcurrency,
int resultSetHoldability)
throws SQLException
prepareStatement in interface ConnectionSQLException
public PreparedStatement prepareStatement(String sql,
String[] columnNames)
throws SQLException
prepareStatement in interface ConnectionSQLException
public void releaseSavepoint(Savepoint savepoint)
throws SQLException
releaseSavepoint in interface Connectionsavepoint - The Savepoint
SQLException - if a database error occurs
public void rollback()
throws SQLException
rollback in interface ConnectionSQLException - if a database error occurs
public void rollback(Savepoint savepoint)
throws SQLException
rollback in interface Connectionsavepoint - The Savepoint
SQLException - if a database error occurs
public void setAutoCommit(boolean autoCommit)
throws SQLException
setAutoCommit in interface ConnectionautoCommit - the desired auto commit mode
SQLException - if a database error occurs
public void setCatalog(String catalog)
throws SQLException
setCatalog in interface Connectioncatalog - the new catalog
SQLException - if a database error occurs
public void setHoldability(int holdability)
throws SQLException
setHoldability in interface Connectionholdability - the holdability
SQLException - if a database error occurs
public void setReadOnly(boolean readOnly)
throws SQLException
setReadOnly in interface ConnectionreadOnly - the desired read only state
SQLException - if a database error occurs
public Savepoint setSavepoint()
throws SQLException
setSavepoint in interface ConnectionSQLException - if a database error occurs
public Savepoint setSavepoint(String name)
throws SQLException
setSavepoint in interface Connectionname - The Savepoint's name
SQLException - if a database error occurs
public void setTransactionIsolation(int level)
throws SQLException
setTransactionIsolation in interface Connectionlevel - the desired isolation level
SQLException - if a database error occurspublic final void setTypeMap(Map map)
setTypeMap in interface Connectionmap - the new type map
protected void takeOver(AbstractConnection conn)
throws SQLException
SQLExceptionpublic String toString()
toString in class Object
|
jxDBCon 0.9z | ||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||