|
BEA Systems, Inc. | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--weblogic.jdbc.informix4.BaseHandler | +--weblogic.jdbc.informix4.BaseConnection
Field Summary | |
protected boolean |
autocommit
|
protected java.lang.String |
charset
|
protected BaseDriver |
driver
|
protected java.lang.String |
encoding
|
protected ConnectionInfo |
info
|
protected weblogic.jdbc.informix4.DatabaseMetaData |
metadata
|
protected boolean |
readOnly
|
protected SocketExtras |
socketExtras
|
java.util.Hashtable |
stmtTable
|
protected int |
transactionIsolation
|
Fields inherited from class weblogic.jdbc.informix4.BaseHandler |
closed,
kInformixProtocol,
kMicrosoftProtocol,
kOracleProtocol,
kSybaseProtocol,
kUnknownProtocol,
unique,
warnings |
Constructor Summary | |
BaseConnection(BaseDriver driver,
ConnectionInfo info)
Initialize the connection to the host and database whose names are given in the iName parameter. |
Method Summary | |
protected java.lang.String |
charset2encoding(java.lang.String inCharset)
Converts the name of an Informix charset into the equivalent JDK encoding. |
void |
close()
In some cases, it is desirable to immediately release a Connection's database and JDBC resources instead of waiting for them to be automatically released; the close method provides this immediate release. |
void |
commit()
Commit makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection. |
protected void |
commit(boolean commit)
|
java.sql.Statement |
createStatement()
|
boolean |
getAutoCommit()
Get the current auto-commit state. |
java.lang.String |
getCatalog()
Return the Connection's current catalog name |
protected java.lang.String |
getCharset()
|
protected int |
getConnections()
This method returns the number of concurrent connections to this database. |
java.lang.String |
getEncoding()
Get the JDK Character Set Encoding that is used to talk to the DBMS |
ConnectionInfo |
getInfo()
|
java.sql.DatabaseMetaData |
getMetaData()
A Connection's database is able to provide information describing its tables, its supported SQL grammar, its stored procedures, the capabilities of this connection, etc. |
protected java.lang.String |
getProductCode()
|
int |
getTransactionIsolation()
Get this Connection's current transaction isolation mode |
boolean |
isReadOnly()
Test if the connection is in read-only mode |
protected void |
login(BaseConnection connection,
ConnectionInfo info)
|
java.lang.String |
nativeSQL(java.lang.String sql)
No SQL translation is necessary for this driver |
java.sql.CallableStatement |
prepareCall(java.lang.String sql)
A SQL stored procedure call statement is handled by creating a CallableStatement for it. |
java.sql.PreparedStatement |
prepareStatement(java.lang.String sql)
A SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. |
void |
rollback()
Rollback drops all changes made since the previous commit/rollback and releases any database locks currently held by the Connection. |
void |
setAutoCommit(boolean iAutoCommit)
If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. |
void |
setCatalog(java.lang.String catalog)
A sub-space of this Connection's database may be selected by setting a catalog name. |
boolean |
setEncoding(java.lang.String inEncoding)
|
protected static void |
setProperties(java.util.Properties props)
|
void |
setReadOnly(boolean readOnly)
You can put a connection in read-only mode as a hint to enable database optimizations. |
void |
setTransactionIsolation(int jdbcLevel)
You can call this method to try to change the transaction isolation level on a newly opened connection, using one of the TRANSACTION_* values. |
Methods inherited from class weblogic.jdbc.informix4.BaseHandler |
appendWarning,
clearWarnings,
complainIfClosed,
finalize,
getProtocol,
getWarnings,
isClosed,
setProtocol |
Methods inherited from class java.lang.Object |
clone,
equals,
getClass,
hashCode,
notify,
notifyAll,
toString,
wait,
wait,
wait |
Field Detail |
public java.util.Hashtable stmtTable
protected BaseDriver driver
protected weblogic.jdbc.informix4.DatabaseMetaData metadata
protected ConnectionInfo info
protected SocketExtras socketExtras
protected boolean autocommit
protected boolean readOnly
protected int transactionIsolation
protected java.lang.String charset
protected java.lang.String encoding
Constructor Detail |
public BaseConnection(BaseDriver driver, ConnectionInfo info) throws java.sql.SQLException
iName
- Information on target host, database, port, password, etc.Method Detail |
protected static void setProperties(java.util.Properties props)
protected void login(BaseConnection connection, ConnectionInfo info) throws java.sql.SQLException
protected int getConnections()
protected java.lang.String getProductCode()
public java.sql.Statement createStatement() throws java.sql.SQLException
public java.sql.PreparedStatement prepareStatement(java.lang.String sql) throws java.sql.SQLException
Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, prepareStatement will send the statement to the database for precompilation. Some drivers may not support precompilation. In this case, the statement may not be sent to the database until the PreparedStatement is executed. This has no direct affect on users; however, it does affect which method throws certain SQLExceptions.
sql
- a SQL statement that may contain one or more '?' IN
parameter placeholderspublic java.sql.CallableStatement prepareCall(java.lang.String sql) throws java.sql.SQLException
Note: This method is optimized for handling stored procedure call statements. Some drivers may send the call statement to the database when the prepareCall is done; others may wait until the CallableStatement is executed. This has no direct affect on users; however, it does affect which method throws certain SQLExceptions.
sql
- a SQL statement that may contain one or more '?'
parameter placeholderspublic java.lang.String nativeSQL(java.lang.String sql) throws java.sql.SQLException
public void setAutoCommit(boolean iAutoCommit) throws java.sql.SQLException
autoCommit
- true enables auto-commit; false disables
auto-commit.Connection.setAutoCommit(boolean)
public boolean getAutoCommit() throws java.sql.SQLException
setAutoCommit(boolean)
public void commit() throws java.sql.SQLException
Note: By default, a Connection's PreparedStatements, CallableStatements and ResultSets are implicitly closed when it is committed.
setAutoCommit(boolean)
protected void commit(boolean commit) throws java.sql.SQLException
public void rollback() throws java.sql.SQLException
Note: By default, a Connection's PreparedStatements, CallableStatements and ResultSets are implicitly closed when it is committed.
setAutoCommit(boolean)
public void setTransactionIsolation(int jdbcLevel) throws java.sql.SQLException
Note: setTransactionIsolation cannot be called while in the middle of a transaction.
level
- one of the TRANSACTION_* isolation values with the
exception of TRANSACTION_NONE; some databases may not support
other valuesDatabaseMetaData.supportsTransactionIsolationLevel(int)
public int getTransactionIsolation() throws java.sql.SQLException
public void close() throws java.sql.SQLException
Note: A Connection is automatically closed when it is garbage collected. Certain fatal errors also result in a closed Connection.
public java.sql.DatabaseMetaData getMetaData() throws java.sql.SQLException
public void setReadOnly(boolean readOnly) throws java.sql.SQLException
Note: setReadOnly cannot be called while in the middle of a transaction.
readOnly
- true enables read-only mode; false disables
read-only mode.public boolean isReadOnly() throws java.sql.SQLException
public void setCatalog(java.lang.String catalog) throws java.sql.SQLException
public java.lang.String getCatalog() throws java.sql.SQLException
public ConnectionInfo getInfo()
protected java.lang.String getCharset()
public java.lang.String getEncoding()
protected java.lang.String charset2encoding(java.lang.String inCharset)
public boolean setEncoding(java.lang.String inEncoding) throws java.sql.SQLException
|
Documentation is available at http://download.oracle.com/docs/cd/E13222_01/wls/docs61 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |