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

org.objectweb.cjdbc.driver.Statementに対する継承グラフ

Inheritance graph
[凡例]
org.objectweb.cjdbc.driver.Statementのコラボレーション図

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

説明

A Statement object is used for executing a static SQL statement and obtaining the results produced by it.

Only one ResultSet per Statement can be open at any point in time. Therefore, if the reading of one ResultSet is interleaved with the reading of another, each must have been generated by different Statements. All Statements execute methods implicitly close a statement's current ResultSet if an open one exists.

参照:
java.sql.Statement

DriverResultSet

作者:
Emmanuel Cecchet

Vadim Kassin

バージョン:
1.0

Statement.java60 行で定義されています。

Public メソッド

 Statement (Connection c)
void addBatch (String sql) throws SQLException
void cancel () throws SQLException
void clearBatch () throws SQLException
void clearWarnings () throws SQLException
int[] executeBatch () throws SQLException
void close () throws SQLException
boolean execute (String sql) throws SQLException
java.sql.ResultSet executeQuery (String sql) throws SQLException
int executeUpdate (String sql) throws SQLException
java.sql.Connection getConnection () throws SQLException
int getFetchDirection () throws SQLException
int getFetchSize () throws SQLException
int getMaxFieldSize () throws SQLException
int getMaxRows () throws SQLException
boolean getMoreResults () throws SQLException
int getQueryTimeout () throws SQLException
java.sql.ResultSet getResultSet () throws SQLException
int getResultSetConcurrency () throws SQLException
int getResultSetType () throws SQLException
int getUpdateCount () throws SQLException
SQLWarning getWarnings () throws SQLException
void setCursorName (String name) throws SQLException
void setEscapeProcessing (boolean enable) throws SQLException
void setFetchDirection (int direction) throws SQLException
void setFetchSize (int rows) throws SQLException
void setMaxFieldSize (int max) throws SQLException
void setMaxRows (int max) throws SQLException
void setQueryTimeout (int seconds) throws SQLException
void setResultSetConcurrency (int value) throws SQLException
void setResultSetType (int value) throws SQLException
boolean getMoreResults (int current) throws SQLException
java.sql.ResultSet getGeneratedKeys () throws SQLException
int executeUpdate (String sql, int autoGeneratedKeys) throws SQLException
int executeUpdate (String sql, int columnIndexes[]) throws SQLException
int executeUpdate (String sql, String columnNames[]) throws SQLException
boolean execute (String sql, int autoGeneratedKeys) throws SQLException
boolean execute (String sql, int columnIndexes[]) throws SQLException
boolean execute (String sql, String columnNames[]) throws SQLException
int getResultSetHoldability () throws SQLException

Protected メソッド

java.sql.ResultSet executeQuery (String sqlSkeleton, String sqlQuery) throws SQLException
int executeUpdateWithSkeleton (String sqlSkeleton, String sqlQuery) throws SQLException

Protected 変数

Connection connection = null
boolean escapeProcessing = true
java.sql.ResultSet generatedKeys = null
int generatedKeysFlag = java.sql.Statement.NO_GENERATED_KEYS

Private 変数

Vector batch = null
SQLWarning warnings = null
java.sql.ResultSet result = null
int updateCount = -1
int timeout = 0
int fetchSize = 0
String cursorName
int resultSetType
int maxFieldSize = 0
int maxRows = 0


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

org.objectweb.cjdbc.driver.Statement.Statement Connection  c  ) 
 

Creates a new Statement instance.

引数:
c the Connection that created us
Statement.java108 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.connection, と org.objectweb.cjdbc.driver.Statement.resultSetType.

00109 { 00110 connection = c; 00111 resultSetType = java.sql.ResultSet.TYPE_FORWARD_ONLY; 00112 }


メソッド

void org.objectweb.cjdbc.driver.Statement.addBatch String  sql  )  throws SQLException
 

Adds sql to the current list of commands.

引数:
sql an SQL statement that returns an update count (INSERT or UPDATE)
例外:
SQLException if an error occurs
Statement.java120 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.batch.

00121 { 00122 if (batch == null) 00123 batch = new Vector(); 00124 batch.addElement(sql.trim()); 00125 }

void org.objectweb.cjdbc.driver.Statement.cancel  )  throws SQLException
 

Could be use by one thread to cancel a statement that is being executed by another thread. We don't support that for instance.

例外:
SQLException if an error occurs
Statement.java133 行で定義されています。
00134 { 00135 throw new NotImplementedException("cancel()"); 00136 }

void org.objectweb.cjdbc.driver.Statement.clearBatch  )  throws SQLException
 

Empties the current list of commands.

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

参照先 org.objectweb.cjdbc.driver.Statement.batch.

00144 { 00145 if (batch != null) 00146 batch.removeAllElements(); 00147 }

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

After this call, getWarnings returns null until a new warning is reported for this Statement.

例外:
SQLException if a database access error occurs (why?)
Statement.java155 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.warnings.

00156 { 00157 warnings = null; 00158 }

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

In many cases, it is desirable to immediately release a Statement's database and JDBC resources instead of waiting for this to happen when it is automatically closed. The close method provides this immediate release.

Note: A Statement is automatically closed when it is garbage collected. When a Statement is closed, its current ResultSet, if one exists, is also closed.

例外:
SQLException if a database access error occurs (why?)

org.objectweb.cjdbc.driver.PreparedStatementで再定義されています。

Statement.java209 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.connection, と org.objectweb.cjdbc.driver.Statement.result.

00210 { 00211 // Force the ResultSet to close 00212 if (result != null) 00213 result.close(); 00214 00215 // Disasociate it from us (For Garbage Collection) 00216 result = null; 00217 connection = null; 00218 }

boolean org.objectweb.cjdbc.driver.Statement.execute String  sql,
String  columnNames[]
throws SQLException
 

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the names of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement.

In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

引数:
sql any SQL statement
columnNames an array of the names of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
戻り値:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
例外:
SQLException if a database access error occurs
参照:
getResultSet

getUpdateCount

getMoreResults

getGeneratedKeys

から:
JDK 1.4
Statement.java892 行で定義されています。
00893 { 00894 throw new NotImplementedException("execute"); 00895 }

boolean org.objectweb.cjdbc.driver.Statement.execute String  sql,
int  columnIndexes[]
throws SQLException
 

Executes the given SQL statement, which may return multiple results, and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. This array contains the indexes of the columns in the target table that contain the auto-generated keys that should be made available. The driver will ignore the array if the given SQL statement is not an INSERT statement.

Under some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

引数:
sql any SQL statement
columnIndexes an array of the indexes of the columns in the inserted row that should be made available for retrieval by a call to the method getGeneratedKeys
戻り値:
true if the first result is a ResultSet object; false if it is an update count or there are no results
例外:
SQLException if a database access error occurs
参照:
getResultSet

getUpdateCount

getMoreResults

から:
JDK 1.4
Statement.java854 行で定義されています。
00855 { 00856 throw new NotImplementedException("execute"); 00857 }

boolean org.objectweb.cjdbc.driver.Statement.execute String  sql,
int  autoGeneratedKeys
throws SQLException
 

Executes the given SQL statement, which may return multiple results, and signals the driver that any auto-generated keys should be made available for retrieval. The driver will ignore this signal if the SQL statement is not an INSERT statement.

In some (uncommon) situations, a single SQL statement may return multiple result sets and/or update counts. Normally you can ignore this unless you are (1) executing a stored procedure that you know may return multiple results or (2) you are dynamically executing an unknown SQL string.

The execute method executes an SQL statement and indicates the form of the first result. You must then use the methods getResultSet or getUpdateCount to retrieve the result, and getMoreResults to move to any subsequent result(s).

引数:
sql any SQL statement
autoGeneratedKeys a constant indicating whether auto-generated keys should be made available for retrieval using the method getGeneratedKeys; one of the following constants: Statement.RETURN_GENERATED_KEYS or Statement.NO_GENERATED_KEYS
戻り値:
true if the first result is a ResultSet object; false if it is an update count or there are no results
例外:
SQLException if a database access error occurs
参照:
getResultSet

getUpdateCount

getMoreResults

getGeneratedKeys

から:
JDK 1.4
Statement.java815 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.execute(), と org.objectweb.cjdbc.driver.Statement.generatedKeysFlag.

00816 { 00817 generatedKeysFlag = autoGeneratedKeys; 00818 return execute(sql); 00819 }

boolean org.objectweb.cjdbc.driver.Statement.execute String  sql  )  throws SQLException
 

Execute a SQL statement that may return multiple results.

引数:
sql any SQL statement
戻り値:
true if the result is a ResultSet or false if it is an integer
例外:
SQLException if an error occurs
Statement.java227 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdate(), org.objectweb.cjdbc.driver.Statement.result, と org.objectweb.cjdbc.driver.Statement.updateCount.

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

00228 { 00229 if (sql.regionMatches(true, 0, "select", 0, 6) 00230 || (sql.regionMatches(true, 0, "{call", 0, 5))) 00231 { 00232 result = executeQuery(sql); 00233 return true; 00234 } 00235 else 00236 { 00237 updateCount = executeUpdate(sql); 00238 return false; 00239 } 00240 }

int [] org.objectweb.cjdbc.driver.Statement.executeBatch  )  throws SQLException
 

Execute a batch of commands

戻り値:
an array containing update count that corresponding to the commands that executed successfully
例外:
SQLException if an error occurs
Statement.java167 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.batch, と org.objectweb.cjdbc.driver.Statement.result.

00168 { 00169 if (batch == null || batch.isEmpty()) 00170 throw new SQLException("Error: batch is empty"); 00171 00172 int size = batch.size(); 00173 int[] result = new int[size]; 00174 int i = 0; 00175 00176 try 00177 { 00178 for (i = 0; i < size; i++) 00179 result[i] = this.executeUpdate((String) batch.elementAt(i)); 00180 return result; 00181 } 00182 catch (SQLException e) 00183 { 00184 String message = "Batch failed for request " + i + ": " 00185 + batch.elementAt(i) + " (" + e + ")"; 00186 00187 int[] updateCounts = new int[i]; 00188 System.arraycopy(result, 0, updateCounts, 0, i); 00189 00190 throw new BatchUpdateException(message, updateCounts); 00191 } 00192 finally 00193 { 00194 batch.removeAllElements(); 00195 } 00196 }

java.sql.ResultSet org.objectweb.cjdbc.driver.Statement.executeQuery String  sqlSkeleton,
String  sqlQuery
throws SQLException [protected]
 

Execute a SQL statement that returns a single ResultSet

引数:
sqlSkeleton the SQL request squeleton or null
sqlQuery typically a static SQL SELECT statement that is already trimed
戻り値:
a ResulSet that contains the data produced by the query
例外:
SQLException if a database access error occurs
Statement.java263 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.Statement.cursorName, org.objectweb.cjdbc.driver.Statement.escapeProcessing, org.objectweb.cjdbc.driver.Connection.execReadRequest(), org.objectweb.cjdbc.driver.Connection.execReadStoredProcedure(), org.objectweb.cjdbc.driver.Statement.fetchSize, org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR, org.objectweb.cjdbc.driver.Statement.maxRows, org.objectweb.cjdbc.driver.Connection.needSqlSkeleton, org.objectweb.cjdbc.driver.Statement.result, org.objectweb.cjdbc.driver.Statement.timeout, と org.objectweb.cjdbc.driver.Statement.updateCount.

00265 { 00266 updateCount = -1; // invalidate the last write result 00267 if (result != null) 00268 { // Discard the previous result 00269 result.close(); 00270 result = null; 00271 } 00272 00273 if (sqlQuery.regionMatches(true, 0, "select", 0, 6)) 00274 { 00275 SelectRequest request = new SelectRequest(sqlQuery, escapeProcessing, 00276 timeout, connection.LINE_SEPARATOR); 00277 if (connection.needSqlSkeleton) 00278 request.setSqlSkeleton(sqlSkeleton); 00279 request.setMaxRows(maxRows); 00280 request.setFetchSize(fetchSize); 00281 request.setCursorName(cursorName); 00282 result = connection.execReadRequest(request); 00283 } 00284 else if (sqlQuery.regionMatches(true, 0, "{call", 0, 5)) 00285 { 00286 StoredProcedure proc = new StoredProcedure(sqlQuery, escapeProcessing, 00287 timeout, connection.LINE_SEPARATOR); 00288 proc.setMaxRows(maxRows); 00289 result = connection.execReadStoredProcedure(proc); 00290 } 00291 else 00292 throw new SQLException( 00293 "executeQuery only accepts statements starting with 'select' or '{call' (" 00294 + sqlQuery + ")"); 00295 00296 if (result instanceof DriverResultSet) 00297 ((DriverResultSet) result).setStatement(this); 00298 return result; 00299 }

java.sql.ResultSet org.objectweb.cjdbc.driver.Statement.executeQuery String  sql  )  throws SQLException
 

Execute a SQL statement that returns a single ResultSet

引数:
sql typically a static SQL SELECT statement
戻り値:
a ResulSet that contains the data produced by the query
例外:
SQLException if a database access error occurs
Statement.java249 行で定義されています。

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

00250 { 00251 return executeQuery(null, sql.trim()); 00252 }

int org.objectweb.cjdbc.driver.Statement.executeUpdate String  sql,
String  columnNames[]
throws SQLException
 

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT statement.

引数:
sql an SQL INSERT,UPDATE or DELETE statement or an SQL statement that returns nothing
columnNames an array of the names of the columns that should be returned from the inserted row
戻り値:
either the row count for INSERT, UPDATE, or DELETE statements, or 0 for SQL statements that return nothing
例外:
SQLException if a database access error occurs
から:
JDK 1.4
Statement.java776 行で定義されています。
00778 { 00779 throw new NotImplementedException("executeUpdate"); 00780 }

int org.objectweb.cjdbc.driver.Statement.executeUpdate String  sql,
int  columnIndexes[]
throws SQLException
 

Executes the given SQL statement and signals the driver that the auto-generated keys indicated in the given array should be made available for retrieval. The driver will ignore the array if the SQL statement is not an INSERT statement.

引数:
sql an SQL INSERT,UPDATE or DELETE statement or an SQL statement that returns nothing, such as an SQL DDL statement
columnIndexes an array of column indexes indicating the columns that should be returned from the inserted row
戻り値:
either the row count for INSERT, UPDATE, or DELETE statements, or 0 for SQL statements that return nothing
例外:
SQLException if a database access error occurs or the SQL statement returns a ResultSet object
から:
JDK 1.4
Statement.java754 行で定義されています。
00755 { 00756 throw new NotImplementedException("executeUpdate"); 00757 }

int org.objectweb.cjdbc.driver.Statement.executeUpdate String  sql,
int  autoGeneratedKeys
throws SQLException
 

Executes the given SQL statement and signals the driver with the given flag about whether the auto-generated keys produced by this Statement object should be made available for retrieval.

引数:
sql must be an SQL INSERT,UPDATE or DELETE statement or an SQL statement that returns nothing
autoGeneratedKeys a flag indicating whether auto-generated keys should be made available for retrieval; one of the following constants: Statement.RETURN_GENERATED_KEYS Statement.NO_GENERATED_KEYS
戻り値:
either the row count for INSERT, UPDATE or DELETE statements, or 0 for SQL statements that return nothing
例外:
SQLException if a database access error occurs, the given SQL statement returns a ResultSet object, or the given constant is not one of those allowed
から:
JDK 1.4
Statement.java729 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.executeUpdate(), と org.objectweb.cjdbc.driver.Statement.generatedKeysFlag.

00731 { 00732 generatedKeysFlag = autoGeneratedKeys; 00733 return executeUpdate(sql); 00734 }

int org.objectweb.cjdbc.driver.Statement.executeUpdate String  sql  )  throws SQLException
 

Execute a SQL INSERT, UPDATE or DELETE statement. In addition SQL statements that return nothing such as SQL DDL statements can be executed

引数:
sql a SQL statement
戻り値:
either a row count, or 0 for SQL commands
例外:
SQLException if a database access error occurs
Statement.java309 行で定義されています。

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

参照元 org.objectweb.cjdbc.driver.Statement.execute(), と org.objectweb.cjdbc.driver.Statement.executeUpdate().

00310 { 00311 return executeUpdateWithSkeleton(null, sql.trim()); 00312 }

int org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton String  sqlSkeleton,
String  sqlQuery
throws SQLException [protected]
 

Execute a SQL INSERT, UPDATE or DELETE statement. In addition SQL statements that return nothing such as SQL DDL statements can be executed

引数:
sqlSkeleton the SQL request squeleton or null
sqlQuery a static SQL statement that is already trimed
戻り値:
either a row count, or 0 for SQL commands
例外:
SQLException if a database access error occurs
Statement.java323 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.connection, org.objectweb.cjdbc.driver.Statement.escapeProcessing, org.objectweb.cjdbc.driver.Connection.execWriteRequest(), org.objectweb.cjdbc.driver.Connection.execWriteRequestWithKeys(), org.objectweb.cjdbc.driver.Connection.execWriteStoredProcedure(), org.objectweb.cjdbc.driver.Statement.generatedKeys, org.objectweb.cjdbc.driver.Statement.generatedKeysFlag, org.objectweb.cjdbc.driver.Connection.LINE_SEPARATOR, org.objectweb.cjdbc.driver.Connection.needSqlSkeleton, org.objectweb.cjdbc.driver.Statement.result, org.objectweb.cjdbc.driver.Statement.timeout, と org.objectweb.cjdbc.driver.Statement.updateCount.

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

00325 { 00326 if (result != null) 00327 { // Discard the previous result 00328 result.close(); 00329 result = null; 00330 } 00331 00332 // Check that the command starts with 00333 // insert/update/delete/create/drop/{call 00334 String lower = sqlQuery.substring(0, 00335 6 < sqlQuery.length() ? 6 : sqlQuery.length()).toLowerCase(); 00336 AbstractWriteRequest request; 00337 if (lower.equals("insert")) 00338 request = new InsertRequest(sqlQuery, escapeProcessing, timeout, 00339 connection.LINE_SEPARATOR); 00340 else if (lower.equals("update")) 00341 request = new UpdateRequest(sqlQuery, escapeProcessing, timeout, 00342 connection.LINE_SEPARATOR); 00343 else if (lower.equals("delete")) 00344 request = new DeleteRequest(sqlQuery, escapeProcessing, timeout, 00345 connection.LINE_SEPARATOR); 00346 else if (lower.startsWith("create")) 00347 request = new CreateRequest(sqlQuery, escapeProcessing, timeout, 00348 connection.LINE_SEPARATOR); 00349 else if (lower.startsWith("drop")) 00350 request = new DropRequest(sqlQuery, escapeProcessing, timeout, 00351 connection.LINE_SEPARATOR); 00352 else if (lower.startsWith("alter")) 00353 request = new AlterRequest(sqlQuery, escapeProcessing, timeout, 00354 connection.LINE_SEPARATOR); 00355 else if (lower.startsWith("{call")) 00356 { // Call stored procedure and return 00357 updateCount = connection.execWriteStoredProcedure(new StoredProcedure( 00358 sqlQuery, escapeProcessing, timeout, connection.LINE_SEPARATOR)); 00359 return updateCount; 00360 } 00361 else 00362 throw new SQLException( 00363 "executeUpdate only accepts statements starting with insert/update/delete/create/drop/{call (" 00364 + sqlQuery + ")"); 00365 00366 if (connection.needSqlSkeleton) 00367 request.setSqlSkeleton(sqlSkeleton); 00368 00369 if (generatedKeysFlag == Statement.RETURN_GENERATED_KEYS) 00370 { // Get the auto generated key back 00371 generatedKeys = connection.execWriteRequestWithKeys(request); 00372 00373 /* 00374 * Usually it is one autoincrement field and one generated key but if it 00375 * is not acceptable - better way to make another function for return 00376 * count of updates Or leave execWriteRequestWithKeys to return count and 00377 * add function for return ResultSet 00378 */ 00379 return 1; 00380 } 00381 else 00382 { // No generated keys 00383 updateCount = connection.execWriteRequest(request); 00384 return updateCount; 00385 } 00386 }

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

Retrieve the connection that created this Statement object

戻り値:
a java.sql.Connection object
例外:
SQLException never
Statement.java394 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.connection.

00395 { 00396 return connection; 00397 }

int org.objectweb.cjdbc.driver.Statement.getFetchDirection  )  throws SQLException
 

Not supported yet.

戻り値:
nothing
例外:
SQLException not supported
Statement.java405 行で定義されています。
00406 { 00407 throw new NotImplementedException("getFetchDirection()"); 00408 }

int org.objectweb.cjdbc.driver.Statement.getFetchSize  )  throws SQLException
 

参照:
java.sql.Statement#getFetchSize()
Statement.java413 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.fetchSize.

00414 { 00415 return fetchSize; 00416 }

java.sql.ResultSet org.objectweb.cjdbc.driver.Statement.getGeneratedKeys  )  throws SQLException
 

Retrieves any auto-generated keys created as a result of executing this Statement object. If this Statement object did not generate any keys, an empty ResultSet object is returned.

戻り値:
a ResultSet object containing the auto-generated key(s) generated by the execution of this Statement object
例外:
SQLException if a database access error occurs
から:
JDK 1.4
Statement.java704 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.generatedKeys.

00705 { 00706 return generatedKeys; 00707 }

int org.objectweb.cjdbc.driver.Statement.getMaxFieldSize  )  throws SQLException
 

The maxFieldSize limit (in bytes) is the maximum amount of data returned for any column value; it only applies to BINARY, VARBINARY,LONGVARBINARY,CHAR, VARCHAR and LONGVARCHAR columns. If the limit is exceeded, the excess data is silently discarded.

Note: We don't do anything with this value yet.

戻り値:
the current max column size limit; zero means unlimited
例外:
SQLException if a database access error occurs
Statement.java430 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.maxFieldSize.

00431 { 00432 return maxFieldSize; 00433 }

int org.objectweb.cjdbc.driver.Statement.getMaxRows  )  throws SQLException
 

The maxRows limit is set to limit the number of rows that any ResultSet can contain. If the limit is exceeded, the excess rows are silently dropped.

戻り値:
the current maximum row limit; zero means unlimited
例外:
SQLException if a database access error occurs
Statement.java443 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.maxRows.

00444 { 00445 return maxRows; 00446 }

boolean org.objectweb.cjdbc.driver.Statement.getMoreResults int  current  )  throws SQLException
 

Moves to this Statement object's next result, deals with any current ResultSet object(s) according to the instructions specified by the given flag, and returns true if the next result is a ResultSet object.

There are no more results when the following is true:

        (!getMoreResults() && (getUpdateCount() == -1)

 

引数:
current one of the following Statement constants indicating what should happen to current ResultSet objects obtained using the method getResultSet</code: CLOSE_CURRENT_RESULT, KEEP_CURRENT_RESULT, or CLOSE_ALL_RESULTS
戻り値:
true if the next result is a ResultSet object; false if it is an update count or there are no more results
例外:
SQLException if a database access error occurs
から:
JDK 1.4
参照:
execute
Statement.java687 行で定義されています。
00688 { 00689 throw new NotImplementedException("getMoreResults"); 00690 }

boolean org.objectweb.cjdbc.driver.Statement.getMoreResults  )  throws SQLException
 

Multiple results are not suppoted so this method always return false and reset the update count to -1. Any open ResultSet is implicitly closed.

戻り値:
false
例外:
SQLException if an error occurs
Statement.java455 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.result, と org.objectweb.cjdbc.driver.Statement.updateCount.

00456 { 00457 if (result != null) 00458 result.close(); 00459 updateCount = -1; 00460 return false; 00461 }

int org.objectweb.cjdbc.driver.Statement.getQueryTimeout  )  throws SQLException
 

The queryTimeout limit is the number of seconds the driver will wait for a Statement to execute. If the limit is exceeded, a SQLException is thrown.

戻り値:
the current query timeout limit in seconds; 0 = unlimited
例外:
SQLException if a database access error occurs
Statement.java471 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.timeout.

00472 { 00473 return timeout; 00474 }

java.sql.ResultSet org.objectweb.cjdbc.driver.Statement.getResultSet  )  throws SQLException
 

Returns the current result as a ResultSet.

戻り値:
the current result set; null if there are no more
例外:
SQLException never
Statement.java482 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.result.

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

00483 { 00484 return result; 00485 }

int org.objectweb.cjdbc.driver.Statement.getResultSetConcurrency  )  throws SQLException
 

Retrieve the concurrency mode for the ResultSet.

戻り値:
CONCUR_READ_ONLY
例外:
SQLException never
Statement.java493 行で定義されています。
00494 { 00495 return java.sql.ResultSet.CONCUR_READ_ONLY; 00496 }

int org.objectweb.cjdbc.driver.Statement.getResultSetHoldability  )  throws SQLException
 

Retrieves the result set holdability for ResultSet objects generated by this Statement object.

戻り値:
either ResultSet.HOLD_CURSORS_OVER_COMMIT or ResultSet.CLOSE_CURSORS_AT_COMMIT
例外:
SQLException if a database access error occurs
から:
JDK 1.4
Statement.java906 行で定義されています。
00907 { 00908 throw new NotImplementedException("getResultSetHoldability"); 00909 }

int org.objectweb.cjdbc.driver.Statement.getResultSetType  )  throws SQLException
 

Retrieve the type of the generated ResultSet.

戻り値:
one of TYPE_FORWARD_ONLY or TYPE_SCROLL_INSENSITIVE
例外:
SQLException never
Statement.java505 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.resultSetType.

00506 { 00507 return resultSetType; 00508 }

int org.objectweb.cjdbc.driver.Statement.getUpdateCount  )  throws SQLException
 

Returns the current result as an update count, if the result is a ResultSet or there are no more results, -1 is returned. It should only be called once per result.

戻り値:
the current result as an update count.
例外:
SQLException if a database access error occurs
Statement.java518 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.updateCount.

00519 { 00520 return updateCount; 00521 }

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

The first warning reported by calls on this Statement is returned. A Statement's execute methods clear its SQLWarning chain. Subsequent Statement warnings will be chained to this SQLWarning.

The Warning chain is automatically cleared each time a statement is (re)executed.

Note: if you are processing a ResultSet then any warnings associated with ResultSet reads will be chained on the ResultSet object.

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

参照先 org.objectweb.cjdbc.driver.Statement.warnings.

00539 { 00540 return warnings; 00541 }

void org.objectweb.cjdbc.driver.Statement.setCursorName String  name  )  throws SQLException
 

Defines the SQL cursor name that will be used by subsequent execute methods. This name can then be used in SQL positioned update/delete statements to identify the current row in the ResultSet generated by this statement. If a database doesn't support positioned update/delete, this method is a no-op.

引数:
name the new cursor name
例外:
SQLException not supported
Statement.java554 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.cursorName.

00555 { 00556 cursorName = name; 00557 }

void org.objectweb.cjdbc.driver.Statement.setEscapeProcessing boolean  enable  )  throws SQLException
 

If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database.

引数:
enable true to enable; false to disable
例外:
SQLException if a database access error occurs
Statement.java566 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.escapeProcessing.

00567 { 00568 escapeProcessing = enable; 00569 }

void org.objectweb.cjdbc.driver.Statement.setFetchDirection int  direction  )  throws SQLException
 

This hint is silently ignored and assumes FETCH_FORWARD which is the way C-JDBC has been optimized for.

引数:
direction ignored
例外:
SQLException not supported
Statement.java578 行で定義されています。
00579 { 00580 }

void org.objectweb.cjdbc.driver.Statement.setFetchSize int  rows  )  throws SQLException
 

Set the default fetch size for the produced ResultSet.

引数:
rows ignored
例外:
SQLException not supported
Statement.java588 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.fetchSize.

00589 { 00590 fetchSize = rows; 00591 }

void org.objectweb.cjdbc.driver.Statement.setMaxFieldSize int  max  )  throws SQLException
 

Sets the maxFieldSize.

引数:
max the new max column size limit; 0 means unlimited
例外:
SQLException if a database access error occurs
Statement.java599 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.maxFieldSize.

00600 { 00601 maxFieldSize = max; 00602 }

void org.objectweb.cjdbc.driver.Statement.setMaxRows int  max  )  throws SQLException
 

Sets the maximum number of rows.

引数:
max the new max rows limit; 0 means unlimited
例外:
SQLException if a database access error occurs
Statement.java610 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.maxRows.

00611 { 00612 maxRows = max; 00613 }

void org.objectweb.cjdbc.driver.Statement.setQueryTimeout int  seconds  )  throws SQLException
 

Sets the queryTimeout limit.

引数:
seconds the new query timeout limit in seconds (0 means no timeout)
例外:
SQLException if a database access error occurs
Statement.java621 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.timeout.

00622 { 00623 timeout = seconds; 00624 }

void org.objectweb.cjdbc.driver.Statement.setResultSetConcurrency int  value  )  throws SQLException
 

引数:
value an int value
例外:
SQLException if an error occurs
Statement.java630 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Connection.createStatement(), org.objectweb.cjdbc.driver.Connection.prepareCall(), と org.objectweb.cjdbc.driver.Connection.prepareStatement().

00631 { 00632 if (value != java.sql.ResultSet.CONCUR_READ_ONLY) 00633 throw new SQLException( 00634 "CONCUR_READ_ONLY is the only supported conccurency mode"); 00635 }

void org.objectweb.cjdbc.driver.Statement.setResultSetType int  value  )  throws SQLException
 

引数:
value an int value
例外:
SQLException if an error occurs
Statement.java641 行で定義されています。

参照先 org.objectweb.cjdbc.driver.Statement.resultSetType.

参照元 org.objectweb.cjdbc.driver.Connection.createStatement(), org.objectweb.cjdbc.driver.Connection.prepareCall(), と org.objectweb.cjdbc.driver.Connection.prepareStatement().

00642 { 00643 if (value == java.sql.ResultSet.TYPE_SCROLL_SENSITIVE) 00644 throw new SQLException( 00645 "TYPE_SCROLL_SENSITIVE is not a supported ResultSet type"); 00646 resultSetType = value; 00647 }


変数

Vector org.objectweb.cjdbc.driver.Statement.batch = null [private]
 

Vector for batch commands Statement.java66 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.addBatch(), org.objectweb.cjdbc.driver.Statement.clearBatch(), と org.objectweb.cjdbc.driver.Statement.executeBatch().

Connection org.objectweb.cjdbc.driver.Statement.connection = null [protected]
 

The connection that created us Statement.java63 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.close(), org.objectweb.cjdbc.driver.DriverResultSet.close(), org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), org.objectweb.cjdbc.driver.DriverResultSet.getBytes(), org.objectweb.cjdbc.driver.Statement.getConnection(), org.objectweb.cjdbc.driver.DriverResultSet.getObject(), org.objectweb.cjdbc.driver.DriverResultSet.next(), と org.objectweb.cjdbc.driver.Statement.Statement().

String org.objectweb.cjdbc.driver.Statement.cursorName [private]
 

Cursor name used jointly with fetch size Statement.java83 行で定義されています。

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

boolean org.objectweb.cjdbc.driver.Statement.escapeProcessing = true [protected]
 

Should the driver to escape processing before sending to the DB? Statement.java97 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), と org.objectweb.cjdbc.driver.Statement.setEscapeProcessing().

int org.objectweb.cjdbc.driver.Statement.fetchSize = 0 [private]
 

Default ResultSet fetch size Statement.java81 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.getFetchSize(), と org.objectweb.cjdbc.driver.Statement.setFetchSize().

java.sql.ResultSet org.objectweb.cjdbc.driver.Statement.generatedKeys = null [protected]
 

Auto generated keys Statement.java100 行で定義されています。

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

int org.objectweb.cjdbc.driver.Statement.generatedKeysFlag = java.sql.Statement.NO_GENERATED_KEYS [protected]
 

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

参照元 org.objectweb.cjdbc.driver.Statement.execute(), org.objectweb.cjdbc.driver.Statement.executeUpdate(), と org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton().

int org.objectweb.cjdbc.driver.Statement.maxFieldSize = 0 [private]
 

Maximum field size (unused) Statement.java89 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.getMaxFieldSize(), と org.objectweb.cjdbc.driver.Statement.setMaxFieldSize().

int org.objectweb.cjdbc.driver.Statement.maxRows = 0 [private]
 

Maximum number of rows (unused) Statement.java92 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.getMaxRows(), と org.objectweb.cjdbc.driver.Statement.setMaxRows().

java.sql.ResultSet org.objectweb.cjdbc.driver.Statement.result = null [private]
 

The current result for a read request Statement.java72 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.close(), org.objectweb.cjdbc.driver.Statement.execute(), org.objectweb.cjdbc.driver.Statement.executeBatch(), org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), org.objectweb.cjdbc.driver.Statement.getMoreResults(), と org.objectweb.cjdbc.driver.Statement.getResultSet().

int org.objectweb.cjdbc.driver.Statement.resultSetType [private]
 

Type of the ResultSet defaults to TYPE_FORWARD_ONLY Statement.java86 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.getResultSetType(), org.objectweb.cjdbc.driver.Statement.setResultSetType(), と org.objectweb.cjdbc.driver.Statement.Statement().

int org.objectweb.cjdbc.driver.Statement.timeout = 0 [private]
 

Query timeout in seconds (0 means no timeout) Statement.java78 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), org.objectweb.cjdbc.driver.Statement.getQueryTimeout(), と org.objectweb.cjdbc.driver.Statement.setQueryTimeout().

int org.objectweb.cjdbc.driver.Statement.updateCount = -1 [private]
 

The update count for a write request Statement.java75 行で定義されています。

参照元 org.objectweb.cjdbc.driver.Statement.execute(), org.objectweb.cjdbc.driver.Statement.executeQuery(), org.objectweb.cjdbc.driver.Statement.executeUpdateWithSkeleton(), org.objectweb.cjdbc.driver.Statement.getMoreResults(), と org.objectweb.cjdbc.driver.Statement.getUpdateCount().

SQLWarning org.objectweb.cjdbc.driver.Statement.warnings = null [private]
 

The warnings chain Statement.java69 行で定義されています。

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


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