クラス org.objectweb.cjdbc.driver.Connection

org.objectweb.cjdbc.driver.Connectionのコラボレーション図

Collaboration graph
[凡例]
すべてのメンバ一覧

説明

This Connection class implements a virtual connection that is just used to store the needed information when the real connection will have to be established by the Controller to execute a query.

This code has been inspired from the PostgreSQL JDBC driver by Peter T. Mount.

作者:
Emmanuel Cecchet

Julie Marguerite

Vadim Kassin

Duncan Smith

Nicolas Modrzyk

バージョン:
1.0

Connection.java65 行で定義されています。

Public メソッド

 Connection ()
 Connection (Driver driver, Socket socket, CJDBCInputStream in, CJDBCOutputStream out, String url, String userName, String password, boolean sqlSkeletonNeeded, AbstractBlobFilter filter)
String getURL ()
String getUserName ()
String getPassword ()
String getConnectedController ()
void clearWarnings () throws SQLException
void close () throws SQLException
void commit () throws SQLException
java.sql.Statement createStatement () throws SQLException
java.sql.Statement createStatement (int resultSetType, int resultSetConcurrency) throws SQLException
boolean getAutoCommit () throws SQLException
java.sql.DatabaseMetaData getMetaData () throws SQLException
String getCatalog () throws SQLException
ResultSet getCatalogs () throws SQLException
int getTransactionIsolation () throws SQLException
java.util.Map getTypeMap () throws SQLException
SQLWarning getWarnings () throws SQLException
boolean isClosed () throws SQLException
boolean isReadOnly () throws SQLException
String nativeSQL (String query) throws SQLException
java.sql.CallableStatement prepareCall (String sql) throws SQLException
java.sql.CallableStatement prepareCall (String sql, int resultSetType, int resultSetConcurrency) throws SQLException
java.sql.PreparedStatement prepareStatement (String sql) throws SQLException
java.sql.PreparedStatement prepareStatement (String sql, int resultSetType, int resultSetConcurrency) throws SQLException
void rollback () throws SQLException
void setAutoCommit (boolean autoCommit) throws SQLException
void setCatalog (String catalog) throws SQLException
void setReadOnly (boolean readOnly) throws SQLException
void setTransactionIsolation (int level) throws SQLException
void setTypeMap (java.util.Map map) throws SQLException
ResultSet execReadStoredProcedure (StoredProcedure proc) throws SQLException
String getControllerVersionNumber () throws SQLException
void setHoldability (int holdability) throws SQLException
int getHoldability () throws SQLException
Savepoint setSavepoint () throws SQLException
Savepoint setSavepoint (String name) throws SQLException
void rollback (Savepoint savepoint) throws SQLException
void releaseSavepoint (Savepoint savepoint) throws SQLException
java.sql.Statement createStatement (int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
java.sql.PreparedStatement prepareStatement (String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
java.sql.CallableStatement prepareCall (String sql, int resultSetType, int resultSetConcurrency, int resultSetHoldability) throws SQLException
java.sql.PreparedStatement prepareStatement (String sql, int autoGeneratedKeys) throws SQLException
java.sql.PreparedStatement prepareStatement (String sql, int columnIndexes[]) throws SQLException
java.sql.PreparedStatement prepareStatement (String sql, String columnNames[]) throws SQLException
AbstractBlobFilter getBlobFilter ()
ResultSet getTableTypes () throws SQLException
ResultSet getTablePrivileges (String catalog, String schemaPattern, String tableNamePattern) throws SQLException
ResultSet getSchemas () throws SQLException
String getDatabaseProductName () throws SQLException
void fetchNextData (String cursorName, int fetchSize, DriverResultSet drsToUpdate) throws SQLException
void closeRemoteResultSet (String cursorName) throws SQLException
String getPreparedStatementBooleanFalse ()
void setPreparedStatementBooleanFalse (String booleanFalse)
String getPreparedStatementBooleanTrue ()
void setPreparedStatementBooleanTrue (String booleanTrue)
boolean isEscapeBackslash ()
void setEscapeBackslash (boolean escapeBackslash)
boolean isEscapeSingleQuote ()
void setEscapeSingleQuote (boolean escapeSingleQuote)
void setEscapeChar (String escapeChar)
String getEscapeChar ()

Protected メソッド

void finalize () throws Throwable
java.sql.ResultSet getProcedures (String catalog, String schemaPattern, String procedureNamePattern) throws SQLException
java.sql.ResultSet getProcedureColumns (String catalog, String schemaPattern, String procedureNamePattern, String columnNamePattern) throws SQLException
void setConnectionParametersOnRequest (AbstractRequest request)
java.sql.ResultSet execReadRequest (SelectRequest request) throws SQLException
int execWriteRequest (AbstractWriteRequest request) throws SQLException
ResultSet execWriteRequestWithKeys (AbstractWriteRequest request) throws SQLException
int execWriteStoredProcedure (StoredProcedure proc) throws SQLException
ResultSet getColumns (String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
ResultSet getPrimaryKeys (String catalog, String schemaPattern, String tableNamePattern) throws SQLException
ResultSet getTables (String catalog, String schemaPattern, String tableNamePattern, String[] types) throws SQLException

Protected 変数

boolean autoCommit = true
boolean isClosed = false
boolean readOnly = false
int isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED
long transactionId = 0
boolean needSqlSkeleton = false
SQLWarning firstWarning = null
DatabaseMetaData metaData = null
Driver driver = null
String url = null
String vdbUser = null
String vdbPassword = null
Socket socket
CJDBCInputStream socketInput
CJDBCOutputStream socketOutput
boolean escapeBackslash = true
boolean escapeSingleQuote = true
String preparedStatementBooleanTrue = "'1'"
String preparedStatementBooleanFalse = "'0'"
String escapeChar = "\'"
final String LINE_SEPARATOR

Private メソッド

void reconnect () throws SQLException
void readRequestOnStream (SelectRequest request) throws IOException
void procedureOnStream (StoredProcedure proc, boolean isRead) throws IOException
void writeRequestOnStream (AbstractWriteRequest request, boolean withKeys) throws IOException

Private 変数

int objectsOnStream = 0
int reconnectRetries = 0
AbstractBlobFilter blobFilter

Static Private 変数

final int STREAM_GC_LIMIT = 5
final int MAX_RECONNECT_ATTEMPTS = 2


コンストラクタとデストラクタ

org.objectweb.cjdbc.driver.Connection.Connection  ) 
 

Creates a new Connection instance. Connection.java145 行で定義されています。

00146 { 00147 }

org.objectweb.cjdbc.driver.Connection.Connection Driver  driver,
Socket  socket,
CJDBCInputStream  in,
CJDBCOutputStream  out,
String  url,
String  userName,
String  password,
boolean  sqlSkeletonNeeded,
AbstractBlobFilter  filter
 

Creates a new Connection instance.

引数:
driver calling driver
socket connection with the controller
in socket input stream
out socket output stream
url C-JDBC URL of the database
userName user login
password user password
sqlSkeletonNeeded true if SQL skeletons must be sent to the controller
filter to use to encode and decode blobs
Connection.java163 行で定義されています。
00166 { 00167 this.driver = driver; 00168 this.socket = socket; 00169 this.socketInput = in; 00170 this.socketOutput = out; 00171 this.url = url; 00172 this.vdbUser = userName; 00173 this.vdbPassword = password; 00174 this.needSqlSkeleton = sqlSkeletonNeeded; 00175 this.blobFilter = filter; 00176 }


メソッド

void org.objectweb.cjdbc.driver.Connection.clearWarnings  )  throws SQLException
 

After this call, getWarnings() returns null until a new warning is reported for this connection.

例外:
SQLException if a database access error occurs
Connection.java263 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.firstWarning.

00264 { 00265 firstWarning = null; 00266 }

void org.objectweb.cjdbc.driver.Connection.close  )  throws SQLException
 

Releases the connection. In fact, the connection is marked to be released but will be effectively closed by the ConnectionClosingThread if the connection has not been reused before.

例外:
SQLException if an error occurs
Connection.java275 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.autoCommit, org.objectweb.cjdbc.driver.Driver.connectionClosingThreadisAlive, org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.isClosed, org.objectweb.cjdbc.driver.Driver.pendingConnectionClosing, org.objectweb.cjdbc.driver.Connection.readOnly, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.Connection.finalize().

00276 { 00277 // We synchronize here in the case 2 threads try to call close() 00278 // concurrently on this connection. 00279 synchronized (this) 00280 { 00281 if (isClosed) 00282 return; 00283 else 00284 isClosed = true; 00285 } 00286 00287 try 00288 { 00289 autoCommit = true; 00290 readOnly = false; 00291 socketOutput.writeInt(Commands.Reset); 00292 socketOutput.flush(); 00293 socketOutput.reset(); // Releases all objects for GC 00294 } 00295 catch (Exception e) 00296 { 00297 throw new SQLException("Error while closing the connection: " + e); 00298 } 00299 00300 synchronized (driver.pendingConnectionClosing) 00301 { 00302 if (!driver.connectionClosingThreadisAlive) 00303 { // First connection to close, start a new closing thread 00304 ConnectionClosingThread t = new ConnectionClosingThread(driver); 00305 t.start(); 00306 } 00307 // Add to the list 00308 driver.pendingConnectionClosing.add(this); 00309 } 00310 }

void org.objectweb.cjdbc.driver.Connection.closeRemoteResultSet String  cursorName  )  throws SQLException
 

Closes the remote ResultSet given its cursor name.

引数:
cursorName cursor name of the ResultSet to close.
例外:
SQLException if an error occurs
Connection.java2165 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.DriverResultSet.close().

02166 { 02167 try 02168 { 02169 socketOutput.writeInt(Commands.CloseRemoteResultSet); 02170 socketOutput.writeUTF(cursorName); 02171 socketOutput.flush(); 02172 02173 Object data = socketInput.readObject(); 02174 if (data instanceof CommandCompleted) 02175 return; 02176 else if (data instanceof SQLException) 02177 throw (SQLException) data; 02178 else 02179 throw new SQLException( 02180 "Connection.closeRemoteResultSet: Unexpected response (" + data 02181 + ")"); 02182 } 02183 catch (Exception e) 02184 { 02185 throw new SQLException( 02186 "Connection.closeRemoteResultSet: Error occured while request was processed by C-JDBC Controller (" 02187 + e + ")"); 02188 } 02189 }

void org.objectweb.cjdbc.driver.Connection.commit  )  throws SQLException
 

Makes all changes made since the previous commit/rollback permanent and releases any database locks currently held by the Connection. This method should only be used when auto-commit has been disabled. (If autoCommit==true, then we throw an SQLException).

例外:
SQLException if a database access error occurs or the connection is in autocommit mode
参照:
Connection.setAutoCommit
Connection.java323 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.autoCommit, org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.transactionId.

00324 { 00325 if (autoCommit) 00326 throw new SQLException("Trying to commit a connection in autocommit mode"); 00327 00328 if (driver == null) 00329 throw new SQLException("No driver to send the commit request"); 00330 try 00331 { 00332 socketOutput.writeInt(Commands.Commit); 00333 socketOutput.flush(); 00334 // Commit is followed by a BEGIN 00335 Object r = socketInput.readObject(); 00336 if (r instanceof Long) 00337 transactionId = ((Long) r).longValue(); 00338 else 00339 throw new SQLException( 00340 "Error occured while trying to start transaction after commit on C-JDBC Controller (" 00341 + r + ")"); 00342 // Reset the stream in order to release the references it has kept on 00343 // all requests sent over the socket (else the objects cannot be garbage 00344 // collected). 00345 socketOutput.reset(); 00346 objectsOnStream = 0; 00347 } 00348 catch (Exception e) 00349 { 00350 throw new SQLException("Error occured while commit of transaction '" 00351 + transactionId + "' was processed by C-JDBC Controller (" + e + ")"); 00352 } 00353 }

java.sql.Statement org.objectweb.cjdbc.driver.Connection.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.

This method is the same as the createStatement method above, but it allows the default result set type, concurrency, and holdability to be overridden.

引数:
resultSetType one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetHoldability one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
戻り値:
a new Statement object that will generate ResultSet objects with the given type, concurrency, and holdability
例外:
SQLException if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
参照:
ResultSet
から:
JDK 1.4
Connection.java1765 行で定義されています。
01767 { 01768 throw new NotImplementedException("createStatement"); 01769 }

java.sql.Statement org.objectweb.cjdbc.driver.Connection.createStatement int  resultSetType,
int  resultSetConcurrency
throws SQLException
 

SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times, it is more efficient to use a PreparedStatement.

引数:
resultSetType resultSetType to use
resultSetConcurrency resultSetConcurrency to use
戻り値:
a new Statement object
例外:
SQLException passed through from the constructor
Connection.java380 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.setResultSetConcurrency(), と org.objectweb.cjdbc.driver.Statement.setResultSetType().

00382 { 00383 Statement s = new Statement(this); 00384 s.setResultSetType(resultSetType); 00385 s.setResultSetConcurrency(resultSetConcurrency); 00386 return s; 00387 }

java.sql.Statement org.objectweb.cjdbc.driver.Connection.createStatement  )  throws SQLException
 

SQL statements without parameters are normally executed using Statement objects. If the same SQL statement is executed many times, it is more efficient to use a PreparedStatement. The ResultSet will be TYPE_FORWARD_ONLY</cde>/CONCUR_READ_ONLY. *

戻り値:
a new Statement object
例外:
SQLException passed through from the constructor
Connection.java365 行で定義されています。
00366 { 00367 return new Statement(this); 00368 }

java.sql.ResultSet org.objectweb.cjdbc.driver.Connection.execReadRequest SelectRequest  request  )  throws SQLException [protected]
 

Performs a read request and return the reply.

引数:
request the read request to execute
戻り値:
a java.sql.ResultSet value
例外:
SQLException if an error occurs
Connection.java940 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.readRequestOnStream(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest(), org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery().

00942 { 00943 if (driver == null) 00944 throw new SQLException("No driver to send the request '" 00945 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) + "'"); 00946 try 00947 { 00948 setConnectionParametersOnRequest(request); 00949 socketOutput.writeInt(Commands.ExecReadRequest); 00950 readRequestOnStream(request); 00951 socketOutput.flush(); 00952 objectsOnStream++; 00953 00954 // Check if the stream needs to be reseted 00955 if (objectsOnStream > STREAM_GC_LIMIT) 00956 { // Reset the outputstream else sent SQL strings cannot be GC 00957 socketOutput.reset(); 00958 objectsOnStream = 0; 00959 } 00960 00961 Object in = socketInput.readObject(); 00962 if (in instanceof SQLException) 00963 throw (SQLException) in; 00964 else if (in instanceof Field[]) 00965 { // Get the ResultSet metadata the row data 00966 Field[] fields = (Field[]) in; 00967 ArrayList data = null; 00968 boolean hasMoreData; 00969 String cursorName = null; 00970 try 00971 { 00972 data = (ArrayList) socketInput.readObject(); 00973 hasMoreData = socketInput.readBoolean(); 00974 if (hasMoreData) 00975 cursorName = socketInput.readUTF(); 00976 } 00977 catch (Exception e1) 00978 { 00979 throw new SQLException( 00980 "Connection.execReadRequest: Unexpected response (" + e1 00981 + ") for request " 00982 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 00983 } 00984 return new org.objectweb.cjdbc.driver.DriverResultSet(fields, data, 00985 hasMoreData, cursorName); 00986 } 00987 else 00988 throw new SQLException( 00989 "Connection.execReadRequest: Unexpected response (" + in 00990 + ") for request " 00991 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 00992 } 00993 catch (RuntimeException e) 00994 { 00995 e.printStackTrace(); 00996 throw new SQLException( 00997 "Connection.execReadRequest: Error occured while request '" 00998 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 00999 + "' was processed by C-JDBC Controller (" + e + ")"); 01000 } 01001 catch (IOException e) 01002 { // Connection failed, try to reconnect and re-exec the query 01003 try 01004 { 01005 reconnect(); 01006 return execReadRequest(request); 01007 } 01008 catch (SQLException e1) 01009 { 01010 throw new SQLException("Connection lost while executing request '" 01011 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 01012 + "' and automatic reconnect failed (" + e1 + ")"); 01013 } 01014 } 01015 catch (ClassNotFoundException e) 01016 { 01017 e.printStackTrace(); 01018 throw new SQLException( 01019 "Connection.execReadRequest: Unexpected response (" + e 01020 + ") for request " 01021 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01022 } 01023 }

ResultSet org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure StoredProcedure  proc  )  throws SQLException
 

Call a stored procedure that returns a ResultSet.

引数:
proc the stored procedure call
戻り値:
a java.sql.ResultSet value
例外:
SQLException if an error occurs
Connection.java1351 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.procedureOnStream(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest(), org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery().

01353 { 01354 if (driver == null) 01355 throw new SQLException("No driver to send the request '" 01356 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) + "'"); 01357 try 01358 { 01359 setConnectionParametersOnRequest(proc); 01360 socketOutput.writeInt(Commands.ExecReadStoredProcedure); 01361 procedureOnStream(proc, true); 01362 socketOutput.flush(); 01363 objectsOnStream++; 01364 01365 // Check if the stream needs to be reseted 01366 if (objectsOnStream > STREAM_GC_LIMIT) 01367 { // Reset the outputstream else sent SQL strings cannot be GC 01368 socketOutput.reset(); 01369 objectsOnStream = 0; 01370 } 01371 01372 Object in = socketInput.readObject(); 01373 if (in instanceof SQLException) 01374 throw (SQLException) in; 01375 else if (in instanceof Field[]) 01376 { // Get the ResultSet metadata the row data 01377 Field[] fields = (Field[]) in; 01378 ArrayList data = null; 01379 boolean hasMoreData; 01380 String cursorName = null; 01381 try 01382 { 01383 data = (ArrayList) socketInput.readObject(); 01384 hasMoreData = socketInput.readBoolean(); 01385 if (hasMoreData) 01386 cursorName = socketInput.readUTF(); 01387 } 01388 catch (Exception e1) 01389 { 01390 throw new SQLException( 01391 "Connection.execReadStoredProcedure: Unexpected response (" + e1 01392 + ") for request " 01393 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01394 } 01395 return new org.objectweb.cjdbc.driver.DriverResultSet(fields, data, 01396 hasMoreData, cursorName); 01397 } 01398 else 01399 throw new SQLException( 01400 "Connection.execReadStoredProcedure: Unexpected response (" + in 01401 + ") for request " 01402 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01403 } 01404 catch (RuntimeException e) 01405 { 01406 throw new SQLException( 01407 "Connection.execReadStoredProcedure: Error occured while request '" 01408 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 01409 + "' was processed by C-JDBC Controller (" + e + ")"); 01410 } 01411 catch (IOException e) 01412 { // Connection failed, try to reconnect and re-exec the query 01413 try 01414 { 01415 reconnect(); 01416 return execReadStoredProcedure(proc); 01417 } 01418 catch (SQLException e1) 01419 { 01420 throw new SQLException("Connection lost while executing request'" 01421 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 01422 + "' and automatic reconnect failed (" + e1 + ")"); 01423 } 01424 } 01425 catch (ClassNotFoundException e) 01426 { 01427 throw new SQLException( 01428 "Connection.execReadStoredProcedure: Unexpected response (" + e 01429 + ") for request " 01430 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01431 } 01432 }

int org.objectweb.cjdbc.driver.Connection.execWriteRequest AbstractWriteRequest  request  )  throws SQLException [protected]
 

Performs a write request and return the number of rows affected.

引数:
request the write request to execute
戻り値:
number of rows affected
例外:
SQLException if an error occurs
Connection.java1088 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest(), org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT, と org.objectweb.cjdbc.driver.Connection.writeRequestOnStream().

参照元 org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton().

01090 { 01091 if (driver == null) 01092 throw new SQLException("No driver to send the request '" 01093 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) + "'"); 01094 try 01095 { 01096 setConnectionParametersOnRequest(request); 01097 socketOutput.writeInt(Commands.ExecWriteRequest); 01098 writeRequestOnStream(request, false); 01099 socketOutput.flush(); 01100 objectsOnStream++; 01101 01102 // Check if the stream needs to be reseted 01103 if (objectsOnStream > STREAM_GC_LIMIT) 01104 { // Reset the outputstream else sent SQL strings cannot be GC 01105 socketOutput.reset(); 01106 objectsOnStream = 0; 01107 } 01108 Object r = socketInput.readObject(); 01109 if (r instanceof Integer) 01110 return ((Integer) r).intValue(); 01111 else if (r instanceof SQLException) 01112 throw (SQLException) r; 01113 else 01114 throw new SQLException( 01115 "Connection.execWriteRequest: Unexpected response (" + r 01116 + ") for request " 01117 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01118 } 01119 catch (IOException e) 01120 { // Connection failed, try to reconnect and re-exec the query 01121 try 01122 { 01123 reconnect(); 01124 return execWriteRequest(request); 01125 } 01126 catch (SQLException e1) 01127 { 01128 throw new SQLException("Connection lost while executing request'" 01129 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 01130 + "' and automatic reconnect failed (" + e1 + ")"); 01131 } 01132 } 01133 catch (Exception e) 01134 { 01135 throw new SQLException("execWriteRequest: Error occured while request '" 01136 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 01137 + "' was processed by C-JDBC Controller (" + e + ")"); 01138 } 01139 }

ResultSet org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys AbstractWriteRequest  request  )  throws SQLException [protected]
 

Performs a write request and return the number of rows affected.

引数:
request the write request to execute
戻り値:
auto generated keys
例外:
SQLException if an error occurs
Connection.java1282 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest(), org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT, と org.objectweb.cjdbc.driver.Connection.writeRequestOnStream().

参照元 org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton().

01284 { 01285 if (driver == null) 01286 throw new SQLException("No driver to send the request '" 01287 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) + "'"); 01288 try 01289 { 01290 setConnectionParametersOnRequest(request); 01291 socketOutput.writeInt(Commands.ExecWriteRequestWithKeys); 01292 writeRequestOnStream(request, true); 01293 socketOutput.flush(); 01294 objectsOnStream++; 01295 01296 // Check if the stream needs to be reseted 01297 if (objectsOnStream > STREAM_GC_LIMIT) 01298 { // Reset the outputstream else sent SQL strings cannot be GC 01299 socketOutput.reset(); 01300 objectsOnStream = 0; 01301 } 01302 01303 Object in = socketInput.readObject(); 01304 if (in instanceof SQLException) 01305 throw (SQLException) in; 01306 else if (in instanceof Field[]) 01307 { // Get the ResultSet metadata the row data 01308 Field[] fields = (Field[]) in; 01309 ArrayList data = null; 01310 boolean hasMoreData; 01311 String cursorName = null; 01312 try 01313 { 01314 data = (ArrayList) socketInput.readObject(); 01315 hasMoreData = socketInput.readBoolean(); 01316 if (hasMoreData) 01317 cursorName = socketInput.readUTF(); 01318 } 01319 catch (Exception e1) 01320 { 01321 throw new SQLException( 01322 "Connection.execWriteRequestWithKeys: Unexpected response (" + e1 01323 + ") for request " 01324 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01325 } 01326 return new org.objectweb.cjdbc.driver.DriverResultSet(fields, data, 01327 hasMoreData, cursorName); 01328 } 01329 else 01330 throw new SQLException( 01331 "Connection.execWriteRequestWithKeys: Unexpected response (" + in 01332 + ") for request " 01333 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01334 } 01335 catch (Exception e) 01336 { 01337 throw new SQLException( 01338 "execWriteRequestWithKeys: Error occured while request '" 01339 + request.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 01340 + "' was processed by C-JDBC Controller (" + e + ")"); 01341 } 01342 }

int org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure StoredProcedure  proc  )  throws SQLException [protected]
 

Call a stored procedure that performs an update.

引数:
proc the stored procedure call
戻り値:
number of rows affected
例外:
SQLException if an error occurs
Connection.java1441 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.procedureOnStream(), org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest(), org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton().

01443 { 01444 if (driver == null) 01445 throw new SQLException("No driver to send the request '" 01446 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) + "'"); 01447 try 01448 { 01449 setConnectionParametersOnRequest(proc); 01450 socketOutput.writeInt(Commands.ExecWriteStoredProcedure); 01451 procedureOnStream(proc, false); 01452 socketOutput.flush(); 01453 objectsOnStream++; 01454 01455 // Check if the stream needs to be reseted 01456 if (objectsOnStream > STREAM_GC_LIMIT) 01457 { // Reset the outputstream else sent SQL strings cannot be GC 01458 socketOutput.reset(); 01459 objectsOnStream = 0; 01460 } 01461 Object r = socketInput.readObject(); 01462 if (r instanceof Integer) 01463 return ((Integer) r).intValue(); 01464 else if (r instanceof SQLException) 01465 throw (SQLException) r; 01466 else 01467 throw new SQLException( 01468 "Connection.execWriteStoredProcedure: Unexpected response (" + r 01469 + ") for request " 01470 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH)); 01471 } 01472 catch (Exception e) 01473 { 01474 throw new SQLException( 01475 "execWriteStoredProcedure: Error occured while request '" 01476 + proc.getSQLShortForm(Constants.SQL_SHORT_FORM_LENGTH) 01477 + "' was processed by C-JDBC Controller (" + e + ")"); 01478 } 01479 }

void org.objectweb.cjdbc.driver.Connection.fetchNextData String  cursorName,
int  fetchSize,
DriverResultSet  drsToUpdate
throws SQLException
 

Fetch next fetchSize rows of data and update the given ResultSet.

引数:
cursorName name of the ResultSet cursor
fetchSize number of rows to fetch
drsToUpdate DriverResultSet to update
例外:
SQLException if an error occurs
Connection.java2128 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.DriverResultSet.next().

02130 { 02131 try 02132 { 02133 socketOutput.writeInt(Commands.FetchNextResultSetRows); 02134 socketOutput.writeUTF(cursorName); 02135 socketOutput.writeInt(fetchSize); 02136 socketOutput.flush(); 02137 02138 Object data = socketInput.readObject(); 02139 if (data instanceof ArrayList) 02140 { 02141 boolean hasMoreData = socketInput.readBoolean(); 02142 drsToUpdate.setData((ArrayList) data); 02143 drsToUpdate.setHasMoreData(hasMoreData); 02144 } 02145 else if (data instanceof SQLException) 02146 throw (SQLException) data; 02147 else 02148 throw new SQLException( 02149 "Connection.fetchNextData: Unexpected response (" + data + ")"); 02150 } 02151 catch (Exception e) 02152 { 02153 throw new SQLException( 02154 "Connection.fetchNextData: Error occured while request was processed by C-JDBC Controller (" 02155 + e + ")"); 02156 } 02157 }

void org.objectweb.cjdbc.driver.Connection.finalize  )  throws Throwable [protected]
 

参照:
java.lang.Object#finalize()
Connection.java181 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.close(), と org.objectweb.cjdbc.driver.Connection.rollback().

00182 { 00183 Throwable t = null; 00184 try 00185 { 00186 rollback(); 00187 } 00188 catch (Exception e) 00189 { 00190 t = e; 00191 } 00192 try 00193 { 00194 close(); 00195 } 00196 catch (Exception e) 00197 { 00198 t = e; 00199 } 00200 00201 if (t != null) 00202 { 00203 throw t; 00204 } 00205 super.finalize(); 00206 }

boolean org.objectweb.cjdbc.driver.Connection.getAutoCommit  )  throws SQLException
 

Gets the current auto-commit state.

戻り値:
current state of the auto-commit mode
例外:
SQLException (why?)
参照:
Connection.setAutoCommit
Connection.java396 行で定義されています。
00397 { 00398 return this.autoCommit; 00399 }

AbstractBlobFilter org.objectweb.cjdbc.driver.Connection.getBlobFilter  ) 
 

Returns the blobFilter value.

戻り値:
Returns the blobFilter.
Connection.java1971 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.blobFilter.

参照元 org.objectweb.cjdbc.driver.DriverResultSet.getBytes(), org.objectweb.cjdbc.driver.DriverResultSet.getObject(), と org.objectweb.cjdbc.driver.PreparedStatement.setBytes().

01972 { 01973 if (blobFilter == null) 01974 blobFilter = new HexaBlobFilter(); 01975 return blobFilter; 01976 }

String org.objectweb.cjdbc.driver.Connection.getCatalog  )  throws SQLException
 

Return current catalog name.

戻り値:
name of the current VirtualDatabase
例外:
SQLException if any error occurs
参照:
java.sql.Connection#getCatalog()
Connection.java426 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

00427 { 00428 if (driver == null) 00429 throw new SQLException("No driver to get the catalog."); 00430 try 00431 { 00432 socketOutput.writeInt(Commands.DatabaseMetaDataGetCatalog); 00433 socketOutput.flush(); 00434 00435 Object rs = socketInput.readObject(); 00436 if (rs instanceof String) 00437 { 00438 return (String) rs; 00439 } 00440 else if (rs instanceof SQLException) 00441 throw (SQLException) rs; 00442 else 00443 throw new SQLException("Connection.getCatalog: Unexpected response (" 00444 + rs + ")"); 00445 } 00446 catch (Exception e) 00447 { 00448 throw new SQLException( 00449 "Connection.getCatalog: Error occured while request was processed by C-JDBC Controller (" 00450 + e + ")"); 00451 } 00452 }

ResultSet org.objectweb.cjdbc.driver.Connection.getCatalogs  )  throws SQLException
 

getCatalogs definition.

戻り値:
instace of ResultSet
例外:
SQLException if fails (include ANY exception that can be thrown in the code)
Connection.java460 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getCatalogs().

00461 { 00462 00463 if (driver == null) 00464 throw new SQLException("No driver to get the catalogs."); 00465 try 00466 { 00467 socketOutput.writeInt(Commands.DatabaseMetaDataGetCatalogs); 00468 socketOutput.flush(); 00469 00470 Object rs = socketInput.readObject(); 00471 if (rs instanceof ResultSet) 00472 return (ResultSet) rs; 00473 else if (rs instanceof SQLException) 00474 throw (SQLException) rs; 00475 else 00476 throw new SQLException("Connection.getCatalogs: Unexpected response (" 00477 + rs + ")"); 00478 } 00479 catch (Exception e) 00480 { 00481 throw new SQLException( 00482 "Connection.getCatalogs: Error occured while request was processed by C-JDBC Controller (" 00483 + e + ")"); 00484 } 00485 }

ResultSet org.objectweb.cjdbc.driver.Connection.getColumns String  catalog,
String  schemaPattern,
String  tableNamePattern,
String  columnNamePattern
throws SQLException [protected]
 

Connection.java1481 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getColumns().

01483 { 01484 if (driver == null) 01485 throw new SQLException("No driver to get the tables."); 01486 try 01487 { 01488 socketOutput.writeInt(Commands.DatabaseMetaDataGetColumns); 01489 socketOutput.writeUTF(catalog); 01490 socketOutput.writeUTF(schemaPattern); 01491 socketOutput.writeUTF(tableNamePattern); 01492 socketOutput.writeUTF(columnNamePattern); 01493 socketOutput.flush(); 01494 objectsOnStream += 2; 01495 01496 // Check if the stream needs to be reseted 01497 if (objectsOnStream > STREAM_GC_LIMIT) 01498 { // Reset the outputstream else sent SQL strings cannot be GC 01499 socketOutput.reset(); 01500 objectsOnStream = 0; 01501 } 01502 Object rs = socketInput.readObject(); 01503 if (rs instanceof ResultSet) 01504 return (ResultSet) rs; 01505 else if (rs instanceof SQLException) 01506 throw (SQLException) rs; 01507 else 01508 throw new SQLException("Connection.getColumns: Unexpected response (" 01509 + rs + ")"); 01510 } 01511 catch (Exception e) 01512 { 01513 throw new SQLException( 01514 "Connection.getColumns: Error occured while request was processed by C-JDBC Controller (" 01515 + e + ")"); 01516 } 01517 }

String org.objectweb.cjdbc.driver.Connection.getConnectedController  ) 
 

Get the controller description to which this connection is connected to

戻り値:
String like localhost:25322 or null if not connected
Connection.java244 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.socket.

00245 { 00246 if (socket == null) 00247 return null; 00248 else 00249 return socket.getInetAddress().getHostName() + ":" + socket.getPort(); 00250 }

String org.objectweb.cjdbc.driver.Connection.getControllerVersionNumber  )  throws SQLException
 

Get the C-JDBC controller version number.

戻り値:
a String containing the controller version
例外:
SQLException if an error occurs
Connection.java1607 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getDatabaseProductVersion().

01608 { 01609 try 01610 { 01611 socketOutput.writeInt(Commands.GetControllerVersionNumber); 01612 socketOutput.flush(); 01613 01614 Object s = socketInput.readObject(); 01615 if (s instanceof String) 01616 return (String) s; 01617 else 01618 throw new SQLException( 01619 "Connection.getControllerVersionNumber: Unexpected response (" + s 01620 + ")"); 01621 } 01622 catch (Exception e) 01623 { 01624 throw new SQLException( 01625 "Connection.getControllerVersionNumber: Error occured while request was processed by C-JDBC Controller (" 01626 + e + ")"); 01627 } 01628 }

String org.objectweb.cjdbc.driver.Connection.getDatabaseProductName  )  throws SQLException
 

参照:
DatabaseMetaData.getDatabaseProductName()
Connection.java2097 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getDatabaseProductName().

02098 { 02099 try 02100 { 02101 socketOutput.writeInt(Commands.GetDatabaseProductName); 02102 socketOutput.flush(); 02103 02104 Object s = socketInput.readObject(); 02105 if (s instanceof String) 02106 return (String) s; 02107 else 02108 throw new SQLException( 02109 "Connection.GetDatabaseProductName: Unexpected response (" + s 02110 + ")"); 02111 } 02112 catch (Exception e) 02113 { 02114 throw new SQLException( 02115 "Connection.getDatabaseProductName: Error occured while request was processed by C-JDBC Controller (" 02116 + e + ")"); 02117 } 02118 }

String org.objectweb.cjdbc.driver.Connection.getEscapeChar  ) 
 

戻り値:
Returns the escapeChar.
Connection.java2284 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.escapeChar.

参照元 org.objectweb.cjdbc.driver.PreparedStatement.doEscapeProcessing().

02285 { 02286 return escapeChar; 02287 }

int org.objectweb.cjdbc.driver.Connection.getHoldability  )  throws SQLException
 

Retrieves the current holdability of ResultSet objects created using this Connection object.

戻り値:
the holdability, one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
例外:
SQLException if a database access occurs
参照:
setHoldability

ResultSet

から:
JDK 1.4
Connection.java1663 行で定義されています。
01664 { 01665 throw new NotImplementedException("getHoldability"); 01666 }

java.sql.DatabaseMetaData org.objectweb.cjdbc.driver.Connection.getMetaData  )  throws SQLException
 

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. This information is made available through a DatabaseMetaData object.

戻り値:
a DatabaseMetaData object for this connection
例外:
SQLException if a database access error occurs
Connection.java410 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.metaData.

00411 { 00412 if (metaData == null) 00413 { 00414 metaData = new DatabaseMetaData(this); 00415 } 00416 return metaData; 00417 }

String org.objectweb.cjdbc.driver.Connection.getPassword  ) 
 

Gets the password used to login to the database.

戻り値:
password
Connection.java233 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.vdbUser.

参照元 org.objectweb.cjdbc.driver.Driver.connect().

00234 { 00235 return vdbUser; 00236 }

String org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanFalse  ) 
 

Returns the booleanFalse value.

戻り値:
Returns the booleanFalse.
Connection.java2196 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.preparedStatementBooleanFalse.

参照元 org.objectweb.cjdbc.driver.PreparedStatement.setBoolean().

02197 { 02198 return preparedStatementBooleanFalse; 02199 }

String org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanTrue  ) 
 

Returns the booleanTrue value.

戻り値:
Returns the booleanTrue.
Connection.java2216 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.preparedStatementBooleanTrue.

参照元 org.objectweb.cjdbc.driver.PreparedStatement.setBoolean().

02217 { 02218 return preparedStatementBooleanTrue; 02219 }

ResultSet org.objectweb.cjdbc.driver.Connection.getPrimaryKeys String  catalog,
String  schemaPattern,
String  tableNamePattern
throws SQLException [protected]
 

参照:
java.sql.DatabaseMetaData#getPrimaryKeys
Connection.java1522 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getPrimaryKeys().

01524 { 01525 if (driver == null) 01526 throw new SQLException("No driver to get the tables."); 01527 try 01528 { 01529 socketOutput.writeInt(Commands.DatabaseMetaDataGetPrimaryKeys); 01530 socketOutput.writeUTF(catalog); 01531 socketOutput.writeUTF(schemaPattern); 01532 socketOutput.writeUTF(tableNamePattern); 01533 socketOutput.flush(); 01534 objectsOnStream += 2; 01535 01536 // Check if the stream needs to be reseted 01537 if (objectsOnStream > STREAM_GC_LIMIT) 01538 { // Reset the outputstream else sent SQL strings cannot be GC 01539 socketOutput.reset(); 01540 objectsOnStream = 0; 01541 } 01542 Object rs = socketInput.readObject(); 01543 if (rs instanceof ResultSet) 01544 return (ResultSet) rs; 01545 else if (rs instanceof SQLException) 01546 throw (SQLException) rs; 01547 else 01548 throw new SQLException( 01549 "Connection.getPrimaryKeys: Unexpected response (" + rs + ")"); 01550 } 01551 catch (Exception e) 01552 { 01553 throw new SQLException( 01554 "Connection.getPrimaryKeys: Error occured while request was processed by C-JDBC Controller (" 01555 + e + ")"); 01556 } 01557 }

java.sql.ResultSet org.objectweb.cjdbc.driver.Connection.getProcedureColumns String  catalog,
String  schemaPattern,
String  procedureNamePattern,
String  columnNamePattern
throws SQLException [protected]
 

Connection.java524 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getProcedureColumns().

00527 { 00528 if (driver == null) 00529 throw new SQLException("No driver to get the tables."); 00530 try 00531 { 00532 socketOutput.writeInt(Commands.DatabaseMetaDataGetProcedureColumns); 00533 socketOutput.writeUTF(catalog); 00534 socketOutput.writeUTF(schemaPattern); 00535 socketOutput.writeUTF(procedureNamePattern); 00536 socketOutput.writeUTF(columnNamePattern); 00537 socketOutput.flush(); 00538 objectsOnStream += 4; 00539 00540 // Check if the stream needs to be reseted 00541 if (objectsOnStream > STREAM_GC_LIMIT) 00542 { // Reset the outputstream else sent SQL strings cannot be GC 00543 socketOutput.reset(); 00544 objectsOnStream = 0; 00545 } 00546 Object rs = socketInput.readObject(); 00547 if (rs instanceof ResultSet) 00548 return (ResultSet) rs; 00549 else if (rs instanceof SQLException) 00550 throw (SQLException) rs; 00551 else 00552 throw new SQLException( 00553 "Connection.getProcedureColumns: Unexpected response (" + rs + ")"); 00554 } 00555 catch (Exception e) 00556 { 00557 throw new SQLException( 00558 "Connection.getProcedureColumns: Error occured while request was processed by C-JDBC Controller (" 00559 + e + ")"); 00560 } 00561 }

java.sql.ResultSet org.objectweb.cjdbc.driver.Connection.getProcedures String  catalog,
String  schemaPattern,
String  procedureNamePattern
throws SQLException [protected]
 

Connection.java487 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getProcedures().

00489 { 00490 if (driver == null) 00491 throw new SQLException("No driver to get the tables."); 00492 try 00493 { 00494 socketOutput.writeInt(Commands.DatabaseMetaDataGetProcedures); 00495 socketOutput.writeUTF(catalog); 00496 socketOutput.writeUTF(schemaPattern); 00497 socketOutput.writeUTF(procedureNamePattern); 00498 socketOutput.flush(); 00499 objectsOnStream += 3; 00500 00501 // Check if the stream needs to be reseted 00502 if (objectsOnStream > STREAM_GC_LIMIT) 00503 { // Reset the outputstream else sent SQL strings cannot be GC 00504 socketOutput.reset(); 00505 objectsOnStream = 0; 00506 } 00507 Object rs = socketInput.readObject(); 00508 if (rs instanceof ResultSet) 00509 return (ResultSet) rs; 00510 else if (rs instanceof SQLException) 00511 throw (SQLException) rs; 00512 else 00513 throw new SQLException( 00514 "Connection.getProcedures: Unexpected response (" + rs + ")"); 00515 } 00516 catch (Exception e) 00517 { 00518 throw new SQLException( 00519 "Connection.getProcedures: Error occured while request was processed by C-JDBC Controller (" 00520 + e + ")"); 00521 } 00522 }

ResultSet org.objectweb.cjdbc.driver.Connection.getSchemas  )  throws SQLException
 

参照:
java.sql.DatabaseMetaData#getSchemas()
Connection.java2068 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getSchemas().

02069 { 02070 if (driver == null) 02071 throw new SQLException("No driver to get the schemas."); 02072 try 02073 { 02074 socketOutput.writeInt(Commands.DatabaseMetaDataGetSchemas); 02075 socketOutput.flush(); 02076 02077 Object rs = socketInput.readObject(); 02078 if (rs instanceof ResultSet) 02079 return (ResultSet) rs; 02080 else if (rs instanceof SQLException) 02081 throw (SQLException) rs; 02082 else 02083 throw new SQLException("Connection.getSchemas: Unexpected response (" 02084 + rs + ")"); 02085 } 02086 catch (Exception e) 02087 { 02088 throw new SQLException( 02089 "Connection.getSchemas: Error occured while request was processed by C-JDBC Controller (" 02090 + e + ")"); 02091 } 02092 }

ResultSet org.objectweb.cjdbc.driver.Connection.getTablePrivileges String  catalog,
String  schemaPattern,
String  tableNamePattern
throws SQLException
 

Gets a description of the access rights for each table available in a catalog. Note that a table privilege applies to one or more columns in the table. It would be wrong to assume that this priviledge applies to all columns (this may be true for some systems but is not true for all.) Only privileges matching the schema and table name criteria are returned. They are ordered by TABLE_SCHEM, TABLE_NAME, and PRIVILEGE.

引数:
catalog a catalog name; "" retrieves those without a catalog; null means drop catalog name from the selection criteria
schemaPattern a schema name pattern; "" retrieves those without a schema
tableNamePattern a table name pattern
戻り値:
ResultSet each row is a table privilege description
例外:
SQLException if a database access error occurs
Connection.java2028 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getTablePrivileges().

02030 { 02031 if (driver == null) 02032 throw new SQLException("No driver to get the table privileges."); 02033 try 02034 { 02035 socketOutput.writeInt(Commands.DatabaseMetaDataGetTablePrivileges); 02036 socketOutput.writeUTF(catalog); 02037 socketOutput.writeUTF(schemaPattern); 02038 socketOutput.writeUTF(tableNamePattern); 02039 socketOutput.flush(); 02040 objectsOnStream += 3; 02041 02042 // Check if the stream needs to be reseted 02043 if (objectsOnStream > STREAM_GC_LIMIT) 02044 { // Reset the outputstream else sent SQL strings cannot be GC 02045 socketOutput.reset(); 02046 objectsOnStream = 0; 02047 } 02048 Object rs = socketInput.readObject(); 02049 if (rs instanceof ResultSet) 02050 return (ResultSet) rs; 02051 else if (rs instanceof SQLException) 02052 throw (SQLException) rs; 02053 else 02054 throw new SQLException( 02055 "Connection.getTablePrivileges: Unexpected response (" + rs + ")"); 02056 } 02057 catch (Exception e) 02058 { 02059 throw new SQLException( 02060 "Connection.getTablePrivileges: Error occured while request was processed by C-JDBC Controller (" 02061 + e + ")"); 02062 } 02063 }

ResultSet org.objectweb.cjdbc.driver.Connection.getTables String  catalog,
String  schemaPattern,
String  tableNamePattern,
String[]  types
throws SQLException [protected]
 

参照:
org.objectweb.cjdbc.driver.DatabaseMetaData.getTables(String, String, String, String[])
Connection.java1563 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getTables().

01565 { 01566 if (driver == null) 01567 throw new SQLException("No driver to get the tables."); 01568 try 01569 { 01570 socketOutput.writeInt(Commands.DatabaseMetaDataGetTables); 01571 socketOutput.writeUTF(catalog); 01572 socketOutput.writeUTF(schemaPattern); 01573 socketOutput.writeUTF(tableNamePattern); 01574 socketOutput.writeObject(types); 01575 socketOutput.flush(); 01576 objectsOnStream += 2; 01577 01578 // Check if the stream needs to be reseted 01579 if (objectsOnStream > STREAM_GC_LIMIT) 01580 { // Reset the outputstream else sent SQL strings cannot be GC 01581 socketOutput.reset(); 01582 objectsOnStream = 0; 01583 } 01584 Object rs = socketInput.readObject(); 01585 if (rs instanceof ResultSet) 01586 return (ResultSet) rs; 01587 else if (rs instanceof SQLException) 01588 throw (SQLException) rs; 01589 else 01590 throw new SQLException("Connection.getTables: Unexpected response (" 01591 + rs + ")"); 01592 } 01593 catch (Exception e) 01594 { 01595 throw new SQLException( 01596 "Connection.getTables: Error occured while request was processed by C-JDBC Controller (" 01597 + e + ")"); 01598 } 01599 }

ResultSet org.objectweb.cjdbc.driver.Connection.getTableTypes  )  throws SQLException
 

Gets the table types available in this database. The results are ordered by table type.

戻り値:
ResultSet each row has a single String column that is a catalog name
例外:
SQLException if a database error occurs
Connection.java1986 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.socketInput, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.getTableTypes().

01987 { 01988 if (driver == null) 01989 throw new SQLException("No driver to get the table types."); 01990 try 01991 { 01992 socketOutput.writeInt(Commands.DatabaseMetaDataGetTableTypes); 01993 socketOutput.flush(); 01994 01995 Object rs = socketInput.readObject(); 01996 if (rs instanceof ResultSet) 01997 return (ResultSet) rs; 01998 else if (rs instanceof SQLException) 01999 throw (SQLException) rs; 02000 else 02001 throw new SQLException( 02002 "Connection.getTableTypes: Unexpected response (" + rs + ")"); 02003 } 02004 catch (Exception e) 02005 { 02006 throw new SQLException( 02007 "Connection.getTableTypes: Error occured while request was processed by C-JDBC Controller (" 02008 + e + ")"); 02009 } 02010 }

int org.objectweb.cjdbc.driver.Connection.getTransactionIsolation  )  throws SQLException
 

Gets this Connection's current transaction isolation mode.

戻り値:
the current TRANSACTION_* mode value
例外:
SQLException if a database access error occurs
Connection.java569 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.isolationLevel.

00570 { 00571 return isolationLevel; 00572 }

java.util.Map org.objectweb.cjdbc.driver.Connection.getTypeMap  )  throws SQLException
 

C-JDBC does NOT support type map.

戻り値:
an exception
例外:
SQLException not supported
Connection.java580 行で定義されています。
00581 { 00582 throw new NotImplementedException("getTypeMap()"); 00583 }

String org.objectweb.cjdbc.driver.Connection.getURL  ) 
 

Gets the C-JDBC URL of the database of the connection.

戻り値:
value of url.
Connection.java213 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.url.

参照元 org.objectweb.cjdbc.driver.Driver.connect(), と org.objectweb.cjdbc.driver.DatabaseMetaData.getURL().

00214 { 00215 return url; 00216 }

String org.objectweb.cjdbc.driver.Connection.getUserName  ) 
 

Gets the user name used to login to the database.

戻り値:
login name
Connection.java223 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.vdbUser.

参照元 org.objectweb.cjdbc.driver.Driver.connect(), と org.objectweb.cjdbc.driver.DatabaseMetaData.getUserName().

00224 { 00225 return vdbUser; 00226 }

SQLWarning org.objectweb.cjdbc.driver.Connection.getWarnings  )  throws SQLException
 

The first warning reported by calls on this connection is returned. Note: Sebsequent warnings will be changed to this SQLWarning

戻り値:
the first SQLWarning or null
例外:
SQLException if a database access error occurs
Connection.java592 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.firstWarning.

00593 { 00594 return firstWarning; 00595 }

boolean org.objectweb.cjdbc.driver.Connection.isClosed  )  throws SQLException
 

Returns true if the connection is closed (no real meaning from C-JDBC point of view)

戻り値:
true if connection has never been opened or close() has been called
例外:
SQLException if an error occurs
Connection.java605 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.isClosed.

00606 { 00607 return isClosed; 00608 }

boolean org.objectweb.cjdbc.driver.Connection.isEscapeBackslash  ) 
 

Returns the escapeBackslash value.

戻り値:
Returns the escapeBackslash.
Connection.java2236 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.escapeBackslash.

参照元 org.objectweb.cjdbc.driver.PreparedStatement.doEscapeProcessing(), と org.objectweb.cjdbc.driver.PreparedStatement.setString().

02237 { 02238 return escapeBackslash; 02239 }

boolean org.objectweb.cjdbc.driver.Connection.isEscapeSingleQuote  ) 
 

Returns the escapeSingleQuote value.

戻り値:
Returns the escapeSingleQuote.
Connection.java2256 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.escapeSingleQuote.

参照元 org.objectweb.cjdbc.driver.PreparedStatement.doEscapeProcessing(), と org.objectweb.cjdbc.driver.PreparedStatement.setString().

02257 { 02258 return escapeSingleQuote; 02259 }

boolean org.objectweb.cjdbc.driver.Connection.isReadOnly  )  throws SQLException
 

Tests to see if the connection is in read only Mode. Note that we cannot really put the database in read only mode, but we pretend we can by returning the value of the readOnly flag.

戻り値:
true if the connection is read only
例外:
SQLException if a database access error occurs
Connection.java618 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.readOnly.

参照元 org.objectweb.cjdbc.driver.DatabaseMetaData.isReadOnly().

00619 { 00620 return readOnly; 00621 }

String org.objectweb.cjdbc.driver.Connection.nativeSQL String  query  )  throws SQLException
 

As we can't know for sure which database will execute this request (now or later), we can't translate it in the native query language of the underlying DBMS. Therefore the query is returned unchanged.

引数:
query the query to change
戻り値:
the original query
例外:
SQLException never
Connection.java632 行で定義されています。
00633 { 00634 return query; 00635 }

java.sql.CallableStatement org.objectweb.cjdbc.driver.Connection.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. This method is the same as the prepareCall method above, but it allows the default result set type, result set concurrency type and holdability to be overridden.

引数:
sql a String object that is the SQL statement to be sent to the database; may contain on or more ? parameters
resultSetType one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetHoldability one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
戻り値:
a new CallableStatement object, containing the pre-compiled SQL statement, that will generate ResultSet objects with the given type, concurrency, and holdability
例外:
SQLException if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
参照:
ResultSet
から:
JDK 1.4
Connection.java1838 行で定義されています。
01840 { 01841 throw new NotImplementedException("prepareCall"); 01842 }

java.sql.CallableStatement org.objectweb.cjdbc.driver.Connection.prepareCall String  sql,
int  resultSetType,
int  resultSetConcurrency
throws SQLException
 

Stored procedure call are not yet supported by C-JDBC.

引数:
sql a String value
resultSetType an int value
resultSetConcurrency an int value
戻り値:
nothing
例外:
SQLException not supported
Connection.java660 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.setResultSetConcurrency(), と org.objectweb.cjdbc.driver.Statement.setResultSetType().

00662 { 00663 CallableStatement c = new CallableStatement(this, sql); 00664 c.setResultSetType(resultSetType); 00665 c.setResultSetConcurrency(resultSetConcurrency); 00666 return c; 00667 }

java.sql.CallableStatement org.objectweb.cjdbc.driver.Connection.prepareCall String  sql  )  throws SQLException
 

Creates a CallableStatement that contains sql and produces a ResultSet that is TYPE_SCROLL_INSENSITIVE and CONCUR_READ_ONLY.

引数:
sql SQL request
戻り値:
nothing
例外:
SQLException not supported
Connection.java645 行で定義されています。
00646 { 00647 return prepareCall(sql, java.sql.ResultSet.TYPE_SCROLL_INSENSITIVE, 00648 java.sql.ResultSet.CONCUR_READ_ONLY); 00649 }

java.sql.PreparedStatement org.objectweb.cjdbc.driver.Connection.prepareStatement String  sql,
String  columnNames[]
throws SQLException
 

Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. This array contains the names of the columns in the target table that contain the auto-generated keys that should be returned. This array is ignored if the SQL statement is not an INSERT statement.

An SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method 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 object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.

Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

引数:
sql an SQL statement that may contain one or more '?' IN parameter placeholders
columnNames an array of column names indicating the columns that should be returned from the inserted row or rows
戻り値:
a new PreparedStatement object, containing the pre-compiled statement, that is capable of returning the auto-generated keys designated by the given array of column names
例外:
SQLException if a database access error occurs
から:
JDK 1.4
Connection.java1960 行で定義されています。
01962 { 01963 throw new NotImplementedException("prepareStatement"); 01964 }

java.sql.PreparedStatement org.objectweb.cjdbc.driver.Connection.prepareStatement String  sql,
int  columnIndexes[]
throws SQLException
 

Creates a default PreparedStatement object capable of returning the auto-generated keys designated by the given array. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. This array is ignored if the SQL statement is not an INSERT statement.

An SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method 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 object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.

Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

引数:
sql an SQL statement that may contain one or more '?' IN parameter placeholders
columnIndexes an array of column indexes indicating the columns that should be returned from the inserted row or rows
戻り値:
a new PreparedStatement object, containing the pre-compiled statement, that is capable of returning the auto-generated keys designated by the given array of column indexes
例外:
SQLException if a database access error occurs
から:
JDK 1.4
Connection.java1920 行で定義されています。
01922 { 01923 throw new NotImplementedException("prepareStatement"); 01924 }

java.sql.PreparedStatement org.objectweb.cjdbc.driver.Connection.prepareStatement String  sql,
int  autoGeneratedKeys
throws SQLException
 

Creates a default PreparedStatement object that has the capability to retrieve auto-generated keys. The given constant tells the driver whether it should make auto-generated keys available for retrieval. This parameter is ignored if the SQL statement is not an INSERT statement.

Note: This method is optimized for handling parametric SQL statements that benefit from precompilation. If the driver supports precompilation, the method 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 object is executed. This has no direct effect on users; however, it does affect which methods throw certain SQLExceptions.

Result sets created using the returned PreparedStatement object will by default be type TYPE_FORWARD_ONLY and have a concurrency level of CONCUR_READ_ONLY.

引数:
sql an SQL statement that may contain one or more '?' IN parameter placeholders
autoGeneratedKeys a flag indicating whether auto-generated keys should be returned; one of Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
戻り値:
a new PreparedStatement object, containing the pre-compiled SQL statement, that will have the capability of returning auto-generated keys
例外:
SQLException if a database access error occurs or the given parameter is not a Statement constant indicating whether auto-generated keys should be returned
から:
JDK 1.4
Connection.java1878 行で定義されています。

参照先 org.objectweb.cjdbc.driver.PreparedStatement.setGeneratedKeysFlag().

01880 { 01881 PreparedStatement ps = new PreparedStatement(this, sql); 01882 ps.setGeneratedKeysFlag(autoGeneratedKeys); 01883 return ps; 01884 }

java.sql.PreparedStatement org.objectweb.cjdbc.driver.Connection.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.

This method is the same as the prepareStatement method above, but it allows the default result set type, concurrency, and holdability to be overridden.

引数:
sql a String object that is the SQL statement to be sent to the database; may contain one or more ? IN parameters
resultSetType one of the following ResultSet constants: ResultSet.TYPE_FORWARD_ONLY, ResultSet.TYPE_SCROLL_INSENSITIVE, or ResultSet.TYPE_SCROLL_SENSITIVE
resultSetConcurrency one of the following ResultSet constants: ResultSet.CONCUR_READ_ONLY or ResultSet.CONCUR_UPDATABLE
resultSetHoldability one of the following ResultSet constants: ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
戻り値:
a new PreparedStatement object, containing the pre-compiled SQL statement, that will generate ResultSet objects with the given type, concurrency, and holdability
例外:
SQLException if a database access error occurs or the given parameters are not ResultSet constants indicating type, concurrency, and holdability
参照:
ResultSet
から:
JDK 1.4
Connection.java1802 行で定義されています。
01805 { 01806 throw new NotImplementedException("prepareStatement"); 01807 }

java.sql.PreparedStatement org.objectweb.cjdbc.driver.Connection.prepareStatement String  sql,
int  resultSetType,
int  resultSetConcurrency
throws SQLException
 

A SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

引数:
sql a SQL statement that may contain one or more '?' IN
resultSetType ResultSetType to use
resultSetConcurrency ResultSetConcurrency to use
戻り値:
a new PreparedStatement object
例外:
SQLException passed through from the constructor
Connection.java697 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.setResultSetConcurrency(), と org.objectweb.cjdbc.driver.Statement.setResultSetType().

00699 { 00700 PreparedStatement s = new PreparedStatement(this, sql); 00701 s.setResultSetType(resultSetType); 00702 s.setResultSetConcurrency(resultSetConcurrency); 00703 return s; 00704 }

java.sql.PreparedStatement org.objectweb.cjdbc.driver.Connection.prepareStatement String  sql  )  throws SQLException
 

A SQL statement with or without IN parameters can be pre-compiled and stored in a PreparedStatement object. This object can then be used to efficiently execute this statement multiple times.

引数:
sql a SQL statement that may contain one or more '?' IN * parameter placeholders
戻り値:
a new PreparedStatement object containing the pre-compiled statement.
例外:
SQLException if a database access error occurs.
Connection.java680 行で定義されています。
00682 { 00683 return new PreparedStatement(this, sql); 00684 }

void org.objectweb.cjdbc.driver.Connection.procedureOnStream StoredProcedure  proc,
boolean  isRead
throws IOException [private]
 

Serialize a procedure on the output stream by sending only the needed parameters to reconstruct it on the controller

引数:
proc the procedure to send
isRead true if this is a read stored procedure
例外:
IOException if fails
Connection.java1188 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR, org.objectweb.cjdbc.driver.Connection.needSqlSkeleton, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), と org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure().

01190 { 01191 /* WRITE PROCEDURE REQUEST BEGIN */ 01192 socketOutput.writeUTF(proc.getSQL()); 01193 socketOutput.writeBoolean(proc.getEscapeProcessing()); 01194 socketOutput.writeUTF(LINE_SEPARATOR); 01195 socketOutput.writeInt(proc.getTimeout()); 01196 socketOutput.writeBoolean(proc.isAutoCommit()); 01197 if (isRead) 01198 { 01199 socketOutput.writeInt(proc.getMaxRows()); 01200 socketOutput.writeInt(proc.getFetchSize()); 01201 } 01202 if (needSqlSkeleton) 01203 { 01204 String skeleton = proc.getSqlSkeleton(); 01205 if (skeleton != null) 01206 { 01207 socketOutput.writeBoolean(true); 01208 socketOutput.writeUTF(skeleton); 01209 } 01210 else 01211 socketOutput.writeBoolean(false); 01212 } 01213 /* WRITE PROCEDURE REQUEST END */ 01214 }

void org.objectweb.cjdbc.driver.Connection.readRequestOnStream SelectRequest  request  )  throws IOException [private]
 

Serialize a read request on the output stream by sending only the needed parameters to reconstruct it on the controller

引数:
request the read request to send
例外:
IOException if fails
Connection.java1148 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR, org.objectweb.cjdbc.driver.Connection.needSqlSkeleton, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.Connection.execReadRequest().

01149 { 01150 /* WRITE SELECT REQUEST BEGIN */ 01151 socketOutput.writeUTF(request.getSQL()); 01152 socketOutput.writeBoolean(request.getEscapeProcessing()); 01153 socketOutput.writeUTF(LINE_SEPARATOR); 01154 socketOutput.writeInt(request.getTimeout()); 01155 socketOutput.writeBoolean(request.isAutoCommit()); 01156 socketOutput.writeInt(request.getMaxRows()); 01157 socketOutput.writeInt(request.getFetchSize()); 01158 String cursor = request.getCursorName(); 01159 if (cursor != null) 01160 { 01161 socketOutput.writeBoolean(true); 01162 socketOutput.writeUTF(cursor); 01163 } 01164 else 01165 socketOutput.writeBoolean(false); 01166 if (needSqlSkeleton) 01167 { 01168 String skeleton = request.getSqlSkeleton(); 01169 if (skeleton != null) 01170 { 01171 socketOutput.writeBoolean(true); 01172 socketOutput.writeUTF(skeleton); 01173 } 01174 else 01175 socketOutput.writeBoolean(false); 01176 } 01177 /* WRITE SELECT REQUEST END */ 01178 }

void org.objectweb.cjdbc.driver.Connection.reconnect  )  throws SQLException [private]
 

Connection.java1025 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.autoCommit, org.objectweb.cjdbc.driver.Driver.connect(), org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.MAX_RECONNECT_ATTEMPTS, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.reconnectRetries, org.objectweb.cjdbc.driver.Connection.socket, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, org.objectweb.cjdbc.driver.Connection.transactionId, org.objectweb.cjdbc.driver.Connection.url, org.objectweb.cjdbc.driver.Connection.vdbPassword, と org.objectweb.cjdbc.driver.Connection.vdbUser.

参照元 org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), と org.objectweb.cjdbc.driver.Connection.execWriteRequest().

01026 { 01027 // Get rid of current connection 01028 try 01029 { 01030 this.socket.close(); 01031 } 01032 catch (IOException ignore) 01033 { 01034 } 01035 try 01036 { 01037 this.socketInput.close(); 01038 } 01039 catch (IOException ignore) 01040 { 01041 } 01042 try 01043 { 01044 this.socketOutput.close(); 01045 } 01046 catch (IOException ignore) 01047 { 01048 } 01049 01050 // Get a new connection 01051 objectsOnStream = 0; 01052 reconnectRetries++; 01053 if (reconnectRetries > MAX_RECONNECT_ATTEMPTS) 01054 { 01055 reconnectRetries = 0; 01056 throw new SQLException("Aborting after " + MAX_RECONNECT_ATTEMPTS 01057 + " attemps."); 01058 } 01059 Properties prop = new Properties(); 01060 prop.setProperty(Driver.USER_PROPERTY, vdbUser); 01061 prop.setProperty(Driver.PASSWORD_PROPERTY, vdbPassword); 01062 Connection c = (Connection) driver.connect(url, prop); 01063 this.socket = c.socket; 01064 this.socketInput = c.socketInput; 01065 this.socketOutput = c.socketOutput; 01066 this.isClosed = false; 01067 try 01068 { 01069 socketOutput.writeInt(Commands.RestoreConnectionState); 01070 socketOutput.writeBoolean(autoCommit); 01071 if (!autoCommit) 01072 socketOutput.writeLong(transactionId); 01073 } 01074 catch (IOException e) 01075 { 01076 throw new SQLException("Failed to reconnect to controller (" + e + ")"); 01077 } 01078 reconnectRetries = 0; 01079 }

void org.objectweb.cjdbc.driver.Connection.releaseSavepoint Savepoint  savepoint  )  throws SQLException
 

Removes the given Savepoint object from the current transaction. Any reference to the savepoint after it have been removed will cause an SQLException to be thrown.

引数:
savepoint the Savepoint object to be removed
例外:
SQLException if a database access error occurs or the given Savepoint object is not a valid savepoint in the current transaction
から:
JDK 1.4
Connection.java1732 行で定義されています。
01733 { 01734 throw new NotImplementedException("releaseSavepoint"); 01735 }

void org.objectweb.cjdbc.driver.Connection.rollback Savepoint  savepoint  )  throws SQLException
 

Undoes all changes made after the given Savepoint object was set.

This method should be used only when auto-commit has been disabled.

引数:
savepoint the Savepoint object to roll back to
例外:
SQLException if a database access error occurs, the Savepoint object is no longer valid, or this Connection object is currently in auto-commit mode
参照:
Savepoint

rollback

から:
JDK 1.4
Connection.java1716 行で定義されています。
01717 { 01718 throw new NotImplementedException("rollback"); 01719 }

void org.objectweb.cjdbc.driver.Connection.rollback  )  throws SQLException
 

Drops all changes made since the previous commit/rollback and releases any database locks currently held by this connection. If the connection was in autocommit mode, we throw a SQLException.

例外:
SQLException if a database access error occurs or the connection is in autocommit mode
参照:
Connection.commit
Connection.java715 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.autoCommit, org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.transactionId.

参照元 org.objectweb.cjdbc.driver.Connection.finalize().

00716 { 00717 if (autoCommit) 00718 throw new SQLException( 00719 "Trying to rollback a connection in autocommit mode"); 00720 00721 if (driver == null) 00722 throw new SQLException("No driver to send the rollback request"); 00723 00724 try 00725 { 00726 socketOutput.writeInt(Commands.Rollback); 00727 socketOutput.flush(); 00728 // Rollback is followed by a BEGIN 00729 Object r = socketInput.readObject(); 00730 if (r instanceof Long) 00731 transactionId = ((Long) r).longValue(); 00732 else 00733 throw new SQLException( 00734 "Error occured while trying to start transaction after rollback on C-JDBC Controller (" 00735 + r + ")"); 00736 // Reset the stream in order to release the references it has kept on 00737 // all requests sent over the socket (else the objects cannot be garbage 00738 // collected). 00739 socketOutput.reset(); 00740 objectsOnStream = 0; 00741 } 00742 catch (Exception e) 00743 { 00744 throw new SQLException("Error occured while rollback of transaction '" 00745 + transactionId + "' was processed by C-JDBC Controller (" + e + ")"); 00746 } 00747 }

void org.objectweb.cjdbc.driver.Connection.setAutoCommit boolean  autoCommit  )  throws SQLException
 

If a connection is in auto-commit mode, then all its SQL statements will be executed and committed as individual transactions. Otherwise, its SQL statements are grouped into transactions that are terminated by either commit()or rollback(). By default, new connections are in auto-commit mode. The commit occurs when the statement completes or the next execute occurs, whichever comes first. In the case of statements returning a ResultSet, the statement completes when the last row of the ResultSet has been retrieved or the ResultSet has been closed. In advanced cases, a single statement may return multiple results as well as output parameter values. Here the commit occurs when all results and output param values have been retrieved.

引数:
autoCommit true enables auto-commit; false disables it
例外:
SQLException if a database access error occurs
Connection.java767 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.autoCommit, org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, と org.objectweb.cjdbc.driver.Connection.transactionId.

00768 { 00769 if (this.autoCommit == autoCommit) 00770 return; 00771 00772 this.autoCommit = autoCommit; 00773 if (driver == null) 00774 throw new SQLException("No driver to get a transaction id"); 00775 00776 if (autoCommit) 00777 { 00778 transactionId = 0; 00779 try 00780 { 00781 socketOutput.writeInt(Commands.SetAutoCommit); 00782 socketOutput.flush(); 00783 Object r = socketInput.readObject(); 00784 if (r instanceof Boolean || ((Boolean) r).booleanValue()) 00785 return; 00786 else 00787 throw new SQLException( 00788 "Error occured while trying to change autocommit value on C-JDBC Controller (" 00789 + r + ")"); 00790 } 00791 catch (Exception e) 00792 { 00793 throw new SQLException( 00794 "Error occured while trying to change autocommit value on C-JDBC Controller (" 00795 + e + ")"); 00796 } 00797 } 00798 else 00799 { 00800 00801 try 00802 { 00803 socketOutput.writeInt(Commands.Begin); 00804 socketOutput.flush(); 00805 Object r = socketInput.readObject(); 00806 if (r instanceof Long) 00807 transactionId = ((Long) r).longValue(); 00808 else 00809 throw new SQLException( 00810 "Error occured while trying to start transaction on C-JDBC Controller (" 00811 + r + ")"); 00812 this.autoCommit = false; 00813 } 00814 catch (Exception e) 00815 { 00816 throw new SQLException( 00817 "Error occured while trying to start transaction on C-JDBC Controller (" 00818 + e + ")"); 00819 } 00820 } 00821 }

void org.objectweb.cjdbc.driver.Connection.setCatalog String  catalog  )  throws SQLException
 

Change the current catalog

引数:
catalog a String value
例外:
SQLException if fails or if catalog name is invalid
Connection.java829 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.driver, org.objectweb.cjdbc.driver.Driver.getUrlFromProperties(), org.objectweb.cjdbc.driver.Connection.objectsOnStream, org.objectweb.cjdbc.driver.Driver.parseURL(), org.objectweb.cjdbc.driver.Connection.socketInput, org.objectweb.cjdbc.driver.Connection.socketOutput, org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT, と org.objectweb.cjdbc.driver.Connection.url.

00830 { 00831 if (catalog == null) 00832 throw new SQLException("Invalid Catalog"); 00833 Hashtable properties = driver.parseURL(url); 00834 properties.put(Driver.DATABASE_PROPERTY, catalog); 00835 url = driver.getUrlFromProperties(properties); 00836 00837 if (driver == null) 00838 throw new SQLException("No driver to set the catalog."); 00839 try 00840 { 00841 socketOutput.writeInt(Commands.ConnectionSetCatalog); 00842 socketOutput.writeUTF(catalog); 00843 socketOutput.flush(); 00844 objectsOnStream += 1; 00845 00846 // Check if the stream needs to be reseted 00847 if (objectsOnStream > STREAM_GC_LIMIT) 00848 { // Reset the outputstream else sent SQL strings cannot be GC 00849 socketOutput.reset(); 00850 objectsOnStream = 0; 00851 } 00852 Object rs = socketInput.readObject(); 00853 if (rs instanceof Boolean) 00854 { 00855 if (((Boolean) rs).booleanValue() == false) 00856 throw new SQLException("Invalid Catalog"); 00857 } 00858 else 00859 throw new SQLException("Connection.setCatalog: Unexpected response (" 00860 + rs + ")"); 00861 } 00862 catch (Exception e) 00863 { 00864 throw new SQLException( 00865 "Connection.setCatalog: Error occured while request was processed by C-JDBC Controller (" 00866 + e + ")"); 00867 } 00868 }

void org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest AbstractRequest  request  )  [protected]
 

Set the autocommit mode and read-only status on this request.

引数:
request The request to set
Connection.java927 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.autoCommit, と org.objectweb.cjdbc.driver.Connection.readOnly.

参照元 org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), と org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure().

00928 { 00929 request.setIsAutoCommit(autoCommit); 00930 request.setIsReadOnly(readOnly); 00931 }

void org.objectweb.cjdbc.driver.Connection.setEscapeBackslash boolean  escapeBackslash  ) 
 

Sets the escapeBackslash value.

引数:
escapeBackslash The escapeBackslash to set.
Connection.java2246 行で定義されています。
02247 { 02248 this.escapeBackslash = escapeBackslash; 02249 }

void org.objectweb.cjdbc.driver.Connection.setEscapeChar String  escapeChar  ) 
 

Sets the escapeCharacter value

引数:
escapeChar the escapeChar value to set
Connection.java2276 行で定義されています。
02277 { 02278 this.escapeChar = escapeChar; 02279 }

void org.objectweb.cjdbc.driver.Connection.setEscapeSingleQuote boolean  escapeSingleQuote  ) 
 

Sets the escapeSingleQuote value.

引数:
escapeSingleQuote The escapeSingleQuote to set.
Connection.java2266 行で定義されています。
02267 { 02268 this.escapeSingleQuote = escapeSingleQuote; 02269 }

void org.objectweb.cjdbc.driver.Connection.setHoldability int  holdability  )  throws SQLException
 

Changes the holdability of ResultSet objects created using this Connection object to the given holdability.

引数:
holdability a ResultSet holdability constant; one of ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
例外:
SQLException if a database access occurs, the given parameter is not a ResultSet constant indicating holdability, or the given holdability is not supported
参照:
getHoldability

ResultSet

から:
JDK 1.4
Connection.java1646 行で定義されています。
01647 { 01648 throw new NotImplementedException("setHoldability"); 01649 }

void org.objectweb.cjdbc.driver.Connection.setPreparedStatementBooleanFalse String  booleanFalse  ) 
 

Sets the booleanFalse value.

引数:
booleanFalse The booleanFalse to set.
Connection.java2206 行で定義されています。
02207 { 02208 this.preparedStatementBooleanFalse = booleanFalse; 02209 }

void org.objectweb.cjdbc.driver.Connection.setPreparedStatementBooleanTrue String  booleanTrue  ) 
 

Sets the booleanTrue value.

引数:
booleanTrue The booleanTrue to set.
Connection.java2226 行で定義されています。
02227 { 02228 this.preparedStatementBooleanTrue = booleanTrue; 02229 }

void org.objectweb.cjdbc.driver.Connection.setReadOnly boolean  readOnly  )  throws SQLException
 

You can put a connection in read-only mode as a hint to enable database optimizations

Note: setReadOnly cannot be called while in the middle of a transaction

引数:
readOnly true enables read-only mode; false disables it
例外:
SQLException if a database access error occurs
Connection.java881 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.autoCommit, と org.objectweb.cjdbc.driver.Connection.readOnly.

00882 { 00883 if (autoCommit == false) 00884 throw new SQLException( 00885 "setReadOnly cannot be called while in the middle of a transaction."); 00886 00887 this.readOnly = readOnly; 00888 }

Savepoint org.objectweb.cjdbc.driver.Connection.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.

引数:
name a String containing the name of the savepoint
戻り値:
the new Savepoint object
例外:
SQLException if a database access error occurs or this Connection object is currently in auto-commit mode
参照:
Savepoint
から:
JDK 1.4
Connection.java1696 行で定義されています。
01697 { 01698 throw new NotImplementedException("setSavepoint"); 01699 }

Savepoint org.objectweb.cjdbc.driver.Connection.setSavepoint  )  throws SQLException
 

Creates an unnamed savepoint in the current transaction and returns the new Savepoint object that represents it.

戻り値:
the new Savepoint object
例外:
SQLException if a database access error occurs or this Connection object is currently in auto-commit mode
参照:
Savepoint
から:
JDK 1.4
Connection.java1679 行で定義されています。
01680 { 01681 throw new NotImplementedException("setSavepoint"); 01682 }

void org.objectweb.cjdbc.driver.Connection.setTransactionIsolation int  level  )  throws SQLException
 

You can call this method to try to change the transaction isolation level using one of the TRANSACTION_* values.

Note: this method 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 values
例外:
SQLException if a database access error occurs
参照:
java.sql.DatabaseMetaData#supportsTransactionIsolationLevel
Connection.java902 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.isolationLevel.

00903 { 00904 isolationLevel = level; 00905 }

void org.objectweb.cjdbc.driver.Connection.setTypeMap java.util.Map  map  )  throws SQLException
 

C-JDBC does NOT support type map.

引数:
map ignored
例外:
SQLException not supported
Connection.java913 行で定義されています。
00914 { 00915 throw new NotImplementedException("setTypeMap()"); 00916 }

void org.objectweb.cjdbc.driver.Connection.writeRequestOnStream AbstractWriteRequest  request,
boolean  withKeys
throws IOException [private]
 

Serialize a write request on the output stream by sending only the needed parameters to reconstruct it on the controller

引数:
request the write request to send
withKeys true if this request expect keys to be returned (as a ResultSet)
例外:
IOException if fails
Connection.java1225 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR, org.objectweb.cjdbc.driver.Connection.needSqlSkeleton, と org.objectweb.cjdbc.driver.Connection.socketOutput.

参照元 org.objectweb.cjdbc.driver.Connection.execWriteRequest(), と org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys().

01227 { 01228 /* WRITE ABSTRACT WRITE REQUEST BEGIN */ 01229 boolean isCreate = request.isCreate(); 01230 boolean isDelete = request.isDelete(); 01231 boolean isDrop = request.isDrop(); 01232 boolean isInsert = request.isInsert(); 01233 boolean isUpdate = request.isUpdate(); 01234 boolean isAlter = request.isAlter(); 01235 int requestType = -1; 01236 if (isCreate) 01237 requestType = Commands.CreateRequest; 01238 else if (isDelete) 01239 requestType = Commands.DeleteRequest; 01240 else if (isDrop) 01241 requestType = Commands.DropRequest; 01242 else if (isInsert) 01243 requestType = Commands.InsertRequest; 01244 else if (isUpdate) 01245 requestType = Commands.UpdateRequest; 01246 else if (isAlter) 01247 requestType = Commands.AlterRequest; 01248 01249 socketOutput.writeInt(requestType); 01250 socketOutput.writeUTF(request.getSQL()); 01251 socketOutput.writeBoolean(request.getEscapeProcessing()); 01252 socketOutput.writeUTF(LINE_SEPARATOR); 01253 socketOutput.writeInt(request.getTimeout()); 01254 socketOutput.writeBoolean(request.isAutoCommit()); 01255 if (withKeys) 01256 { 01257 socketOutput.writeInt(request.getMaxRows()); 01258 socketOutput.writeInt(request.getFetchSize()); 01259 } 01260 01261 if (needSqlSkeleton) 01262 { 01263 String skeleton = request.getSqlSkeleton(); 01264 if (skeleton != null) 01265 { 01266 socketOutput.writeBoolean(true); 01267 socketOutput.writeUTF(skeleton); 01268 } 01269 else 01270 socketOutput.writeBoolean(false); 01271 } 01272 /* WRITE ABSTRACT WRITE REQUEST END */ 01273 }


変数

boolean org.objectweb.cjdbc.driver.Connection.autoCommit = true [protected]
 

Commit mode of the connection (true= automatic). Connection.java70 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.close(), org.objectweb.cjdbc.driver.Connection.commit(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.rollback(), org.objectweb.cjdbc.driver.Connection.setAutoCommit(), org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest(), と org.objectweb.cjdbc.driver.Connection.setReadOnly().

AbstractBlobFilter org.objectweb.cjdbc.driver.Connection.blobFilter [private]
 

Connection.java122 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getBlobFilter().

Driver org.objectweb.cjdbc.driver.Connection.driver = null [protected]
 

Driver that created us. Connection.java94 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.close(), org.objectweb.cjdbc.driver.ConnectionClosingThread.closeConnection(), org.objectweb.cjdbc.driver.Connection.commit(), org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure(), org.objectweb.cjdbc.driver.Connection.getCatalog(), org.objectweb.cjdbc.driver.Connection.getCatalogs(), org.objectweb.cjdbc.driver.Connection.getColumns(), org.objectweb.cjdbc.driver.Connection.getPrimaryKeys(), org.objectweb.cjdbc.driver.Connection.getProcedureColumns(), org.objectweb.cjdbc.driver.Connection.getProcedures(), org.objectweb.cjdbc.driver.Connection.getSchemas(), org.objectweb.cjdbc.driver.Connection.getTablePrivileges(), org.objectweb.cjdbc.driver.Connection.getTables(), org.objectweb.cjdbc.driver.Connection.getTableTypes(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.rollback(), org.objectweb.cjdbc.driver.Connection.setAutoCommit(), と org.objectweb.cjdbc.driver.Connection.setCatalog().

boolean org.objectweb.cjdbc.driver.Connection.escapeBackslash = true [protected]
 

Connection.java125 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.isEscapeBackslash().

String org.objectweb.cjdbc.driver.Connection.escapeChar = "\'" [protected]
 

Connection.java132 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getEscapeChar(), と org.objectweb.cjdbc.driver.PreparedStatement.setBytes().

boolean org.objectweb.cjdbc.driver.Connection.escapeSingleQuote = true [protected]
 

Connection.java126 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.isEscapeSingleQuote().

SQLWarning org.objectweb.cjdbc.driver.Connection.firstWarning = null [protected]
 

List of Warnings for this connection. Connection.java88 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.clearWarnings(), と org.objectweb.cjdbc.driver.Connection.getWarnings().

boolean org.objectweb.cjdbc.driver.Connection.isClosed = false [protected]
 

Status of the connection. Connection.java73 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.close(), org.objectweb.cjdbc.driver.Driver.connect(), と org.objectweb.cjdbc.driver.Connection.isClosed().

int org.objectweb.cjdbc.driver.Connection.isolationLevel = java.sql.Connection.TRANSACTION_READ_COMMITTED [protected]
 

Isolation level. Connection.java79 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getTransactionIsolation(), と org.objectweb.cjdbc.driver.Connection.setTransactionIsolation().

final String org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR [protected]
 

初期値:

System .getProperty("line.separator")
Connection.java134 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), org.objectweb.cjdbc.driver.Connection.procedureOnStream(), org.objectweb.cjdbc.driver.Connection.readRequestOnStream(), と org.objectweb.cjdbc.driver.Connection.writeRequestOnStream().

final int org.objectweb.cjdbc.driver.Connection.MAX_RECONNECT_ATTEMPTS = 2 [static, private]
 

Connection.java120 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.reconnect().

DatabaseMetaData org.objectweb.cjdbc.driver.Connection.metaData = null [protected]
 

Meta-data of C-JDBC connections. Connection.java91 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getMetaData().

boolean org.objectweb.cjdbc.driver.Connection.needSqlSkeleton = false [protected]
 

Does the controller require the SQL skeleton? Connection.java85 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), org.objectweb.cjdbc.driver.Connection.procedureOnStream(), org.objectweb.cjdbc.driver.Connection.readRequestOnStream(), と org.objectweb.cjdbc.driver.Connection.writeRequestOnStream().

int org.objectweb.cjdbc.driver.Connection.objectsOnStream = 0 [private]
 

Connection.java115 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.commit(), org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure(), org.objectweb.cjdbc.driver.Connection.getColumns(), org.objectweb.cjdbc.driver.Connection.getPrimaryKeys(), org.objectweb.cjdbc.driver.Connection.getProcedureColumns(), org.objectweb.cjdbc.driver.Connection.getProcedures(), org.objectweb.cjdbc.driver.Connection.getTablePrivileges(), org.objectweb.cjdbc.driver.Connection.getTables(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.rollback(), と org.objectweb.cjdbc.driver.Connection.setCatalog().

String org.objectweb.cjdbc.driver.Connection.preparedStatementBooleanFalse = "'0'" [protected]
 

Connection.java130 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanFalse().

String org.objectweb.cjdbc.driver.Connection.preparedStatementBooleanTrue = "'1'" [protected]
 

Connection.java129 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getPreparedStatementBooleanTrue().

boolean org.objectweb.cjdbc.driver.Connection.readOnly = false [protected]
 

Is the connection in read-only mode ? Connection.java76 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.close(), org.objectweb.cjdbc.driver.Connection.isReadOnly(), org.objectweb.cjdbc.driver.Connection.setConnectionParametersOnRequest(), と org.objectweb.cjdbc.driver.Connection.setReadOnly().

int org.objectweb.cjdbc.driver.Connection.reconnectRetries = 0 [private]
 

Connection.java117 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.reconnect().

Socket org.objectweb.cjdbc.driver.Connection.socket [protected]
 

Connection with the controller. Connection.java104 行で定義されています。

参照元 org.objectweb.cjdbc.driver.ConnectionClosingThread.closeConnection(), org.objectweb.cjdbc.driver.Connection.getConnectedController(), と org.objectweb.cjdbc.driver.Connection.reconnect().

CJDBCInputStream org.objectweb.cjdbc.driver.Connection.socketInput [protected]
 

Socket input stream. Connection.java107 行で定義されています。

参照元 org.objectweb.cjdbc.driver.ConnectionClosingThread.closeConnection(), org.objectweb.cjdbc.driver.Connection.closeRemoteResultSet(), org.objectweb.cjdbc.driver.Connection.commit(), org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure(), org.objectweb.cjdbc.driver.Connection.fetchNextData(), org.objectweb.cjdbc.driver.Connection.getCatalog(), org.objectweb.cjdbc.driver.Connection.getCatalogs(), org.objectweb.cjdbc.driver.Connection.getColumns(), org.objectweb.cjdbc.driver.Connection.getControllerVersionNumber(), org.objectweb.cjdbc.driver.Connection.getDatabaseProductName(), org.objectweb.cjdbc.driver.Connection.getPrimaryKeys(), org.objectweb.cjdbc.driver.Connection.getProcedureColumns(), org.objectweb.cjdbc.driver.Connection.getProcedures(), org.objectweb.cjdbc.driver.Connection.getSchemas(), org.objectweb.cjdbc.driver.Connection.getTablePrivileges(), org.objectweb.cjdbc.driver.Connection.getTables(), org.objectweb.cjdbc.driver.Connection.getTableTypes(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.rollback(), org.objectweb.cjdbc.driver.Connection.setAutoCommit(), と org.objectweb.cjdbc.driver.Connection.setCatalog().

CJDBCOutputStream org.objectweb.cjdbc.driver.Connection.socketOutput [protected]
 

Socket output stream. Connection.java110 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.close(), org.objectweb.cjdbc.driver.ConnectionClosingThread.closeConnection(), org.objectweb.cjdbc.driver.Connection.closeRemoteResultSet(), org.objectweb.cjdbc.driver.Connection.commit(), org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure(), org.objectweb.cjdbc.driver.Connection.fetchNextData(), org.objectweb.cjdbc.driver.Connection.getCatalog(), org.objectweb.cjdbc.driver.Connection.getCatalogs(), org.objectweb.cjdbc.driver.Connection.getColumns(), org.objectweb.cjdbc.driver.Connection.getControllerVersionNumber(), org.objectweb.cjdbc.driver.Connection.getDatabaseProductName(), org.objectweb.cjdbc.driver.Connection.getPrimaryKeys(), org.objectweb.cjdbc.driver.Connection.getProcedureColumns(), org.objectweb.cjdbc.driver.Connection.getProcedures(), org.objectweb.cjdbc.driver.Connection.getSchemas(), org.objectweb.cjdbc.driver.Connection.getTablePrivileges(), org.objectweb.cjdbc.driver.Connection.getTables(), org.objectweb.cjdbc.driver.Connection.getTableTypes(), org.objectweb.cjdbc.driver.Connection.procedureOnStream(), org.objectweb.cjdbc.driver.Connection.readRequestOnStream(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.rollback(), org.objectweb.cjdbc.driver.Connection.setAutoCommit(), org.objectweb.cjdbc.driver.Connection.setCatalog(), と org.objectweb.cjdbc.driver.Connection.writeRequestOnStream().

final int org.objectweb.cjdbc.driver.Connection.STREAM_GC_LIMIT = 5 [static, private]
 

Connection.java114 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure(), org.objectweb.cjdbc.driver.Connection.getColumns(), org.objectweb.cjdbc.driver.Connection.getPrimaryKeys(), org.objectweb.cjdbc.driver.Connection.getProcedureColumns(), org.objectweb.cjdbc.driver.Connection.getProcedures(), org.objectweb.cjdbc.driver.Connection.getTablePrivileges(), org.objectweb.cjdbc.driver.Connection.getTables(), と org.objectweb.cjdbc.driver.Connection.setCatalog().

long org.objectweb.cjdbc.driver.Connection.transactionId = 0 [protected]
 

transaction identifier. Connection.java82 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.commit(), org.objectweb.cjdbc.driver.Connection.reconnect(), org.objectweb.cjdbc.driver.Connection.rollback(), と org.objectweb.cjdbc.driver.Connection.setAutoCommit().

String org.objectweb.cjdbc.driver.Connection.url = null [protected]
 

C-JDBC URL of the database. Connection.java97 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getURL(), org.objectweb.cjdbc.driver.Connection.reconnect(), と org.objectweb.cjdbc.driver.Connection.setCatalog().

String org.objectweb.cjdbc.driver.Connection.vdbPassword = null [protected]
 

Connection.java101 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.reconnect().

String org.objectweb.cjdbc.driver.Connection.vdbUser = null [protected]
 

Virtual database user used for this connection. Connection.java100 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.getPassword(), org.objectweb.cjdbc.driver.Connection.getUserName(), と org.objectweb.cjdbc.driver.Connection.reconnect().


このクラスの説明は次のファイルから生成されました:
CJDBCversion1.0.1に対してWed Aug 18 09:20:31 2004に生成されました。 doxygen 1.3.8