|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectca.idms.io.TraceObject
ca.idms.jdbc.IdmsJdbcObject
ca.idms.jdbc.IdmsResultObject
ca.idms.jdbc.IdmsStatement
public class IdmsStatement
Represents a JDBC statement.
IdmsJdbcObject,
IdmsConnection,
IdmsPreparedStatement,
IdmsResultSet| Field Summary |
|---|
| Fields inherited from class ca.idms.jdbc.IdmsJdbcObject |
|---|
FAKE_METHODS, FAKE_SUPPORT, fakeSupport, MESSAGES |
| Fields inherited from class ca.idms.io.TraceObject |
|---|
exclude, EXCLUDE, FALSE, include, INCLUDE, logWriter, PREFIX, PROPERTIES_FILE, PROPERTIES_KEY, snap, SNAP, SNAP_BYTES, SNAP_NATIVE, SNAP_OBJECT, SNAP_SQL, snapBytes, snapNative, snapObject, snapSql, stub, trace, TRACE, TRACE_FILE, TRACE_LIFE, TRACE_NATIVE, TRACE_PRODUCT, traceLife, traceNative, traceStream, TRUE |
| Fields inherited from interface java.sql.Statement |
|---|
CLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO |
| Fields inherited from interface ca.idms.qcli.SQLState |
|---|
SQL_00000, SQL_01000, SQL_01004, SQL_07001, SQL_07009, SQL_08001, SQL_08002, SQL_08003, SQL_08004, SQL_08006, SQL_08007, SQL_0A000, SQL_21000, SQL_22000, SQL_22001, SQL_22003, SQL_22005, SQL_22007, SQL_24000, SQL_25000, SQL_3C000, SQL_40000, SQL_42000, SQL_HY000, SQL_HY004, SQL_HY009, SQL_HY010, SQL_HY024, SQL_HY106, SQL_HYC00 |
| Method Summary | |
|---|---|
void |
addBatch(java.lang.String sql)
Adds an SQL statement to the list of batch updates. |
void |
cancel()
Cancel can be used by one thread to cancel a statement that is being executed by another thread. |
void |
clearBatch()
Clears the list of batch updates. |
void |
close()
Releases all local resources held by this Statement. |
boolean |
execute(java.lang.String sql)
Execute a SQL statement that may return multiple results. |
boolean |
execute(java.lang.String sql,
int key)
Executes an IDMS statement. |
boolean |
execute(java.lang.String sql,
int[] index)
Executes an IDMS statement. |
boolean |
execute(java.lang.String sql,
java.lang.String[] names)
Executes an IDMS statement. |
int[] |
executeBatch()
Executes the current set of batch updates. |
java.sql.ResultSet |
executeQuery(java.lang.String sql)
Execute a SQL statement that returns a single ResultSet. |
int |
executeUpdate(java.lang.String sql)
Execute a SQL INSERT, UPDATE or DELETE statement. |
int |
executeUpdate(java.lang.String sql,
int key)
Executes an IDMS update statement. |
int |
executeUpdate(java.lang.String sql,
int[] index)
Executes an IDMS update statement. |
int |
executeUpdate(java.lang.String sql,
java.lang.String[] names)
Executes an IDMS update statement. |
protected void |
finalize()
Cleans up when the statement is gc'd. |
protected java.lang.Object |
get(java.lang.reflect.Field f)
Overrides the default get method to allow the default snap method access to the value of a non-public variable. |
java.sql.Connection |
getConnection()
Gets the Connection. |
java.sql.ResultSet |
getGeneratedKeys()
CA IDMS does not support automatically generated keys. |
int |
getMaxFieldSize()
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. |
int |
getMaxRows()
The maxRows limit is the maximum number of rows that a ResultSet can contain. |
boolean |
getMoreResults()
Moves to the "next" ResultSet. |
boolean |
getMoreResults(int current)
Moves to the "next" ResultSet, disposing of any open ones as specified Starting with CA IDMS r17, multiple results are supported. |
int |
getQueryTimeout()
Gets the reply timeout for this IdmsStatement object. |
java.sql.ResultSet |
getResultSet()
Returns the current result as a ResultSet. |
int |
getResultSetConcurrency()
Gets the ResultSet concurrency. |
int |
getResultSetHoldability()
For CA IDMS ResultSet holdability is a Connection attribute. |
int |
getResultSetType()
Gets the ResultSet type. |
int |
getUpdateCount()
Returns the current result as an update count. |
boolean |
isPoolable()
Returns a value indicating whether or not the Statement should be pooled by a connection pool manager. |
void |
setCursorName(java.lang.String s)
Defines a cursor name to use for positioned updates and deletes. |
void |
setEscapeProcessing(boolean enable)
If escape scanning is on (the default), the driver will do escape substitution before sending the SQL to the database. |
void |
setMaxFieldSize(int max)
The maxFieldSize limit (in bytes) is set to limit the size of data that can be returned for any column value; it only applies to BINARY, VARBINARY, LONGVARBINARY, CHAR, VARCHAR, and LONGVARCHAR fields. |
void |
setMaxRows(int max)
The maxRows limit is set to limit the number of rows that any ResultSet can contain. |
void |
setPoolable(boolean enable)
Allows an application to set a hint to the connection pool manager as to whether a statement should be pooled or not. |
void |
setQueryTimeout(int seconds)
Sets the reply timeout for this Statement object. |
| Methods inherited from class ca.idms.jdbc.IdmsResultObject |
|---|
getFetchDirection, getFetchSize, isClosed, setFetchDirection, setFetchSize |
| Methods inherited from class ca.idms.jdbc.IdmsJdbcObject |
|---|
clearWarnings, getWarnings, hasCursor, hasUpdate, isStarted, isSuspended, isWrapperFor, notifyStatementError, unwrap |
| Methods inherited from class ca.idms.io.TraceObject |
|---|
getBoolean, getClasses, getInteger, getProperty, listProperties, message, parseList, print, print, print, println, println, snap, snap, snap, snap, snap, snap, snap, toHex, toHex, toHex, toHex, toHex, toString, trace, trace, trace, trace, trace, trace, traceEntry, unloadProperties |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface java.sql.Statement |
|---|
clearWarnings, getFetchDirection, getFetchSize, getWarnings, isClosed, setFetchDirection, setFetchSize |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Method Detail |
|---|
protected void finalize()
throws java.lang.Throwable
finalize in class TraceObjectjava.lang.Throwable - unlikely
protected java.lang.Object get(java.lang.reflect.Field f)
throws java.lang.IllegalAccessException
get in class IdmsResultObjectf - a Field returned by Class.getDeclaredFields
java.lang.IllegalAccessException - should not
really happen, but Field.get requires itTraceObject.snap,
TraceObject.snap()
public void cancel()
throws java.sql.SQLException
cancel in interface java.sql.Statementjava.sql.SQLException - if a database-access error occurs.
public void close()
throws java.sql.SQLException
close in interface java.sql.Statementjava.sql.SQLException - not really.
public boolean execute(java.lang.String sql)
throws java.sql.SQLException
execute in interface java.sql.Statementsql - SQL statement
java.sql.SQLException - if an error occurs.getResultSet(),
getUpdateCount(),
getMoreResults()
public java.sql.ResultSet executeQuery(java.lang.String sql)
throws java.sql.SQLException
executeQuery in interface java.sql.Statementsql - an SQL SELECT or CALL statement
java.sql.SQLException - if an error occurs or the statement does
not return exactly one result set.
public int executeUpdate(java.lang.String sql)
throws java.sql.SQLException
executeUpdate in interface java.sql.Statementsql - the SQL statement syntax
java.sql.SQLException - if a database-access error occurs.
public java.sql.ResultSet getResultSet()
throws java.sql.SQLException
getResultSet in interface java.sql.Statementjava.sql.SQLException - if a database-access error occurs.execute(java.lang.String),
executeQuery(java.lang.String)
public int getUpdateCount()
throws java.sql.SQLException
getUpdateCount in interface java.sql.Statementjava.sql.SQLException - if an error occurs.#see #executeUpdate
public boolean getMoreResults()
throws java.sql.SQLException
getMoreResults(CLOSE_CURRENT_RESULT), that is, it will close
the current ResultSet, if any.
getMoreResults in interface java.sql.Statementjava.sql.SQLException - if an error occurs.
public int getMaxFieldSize()
throws java.sql.SQLException
getMaxFieldSize in interface java.sql.Statementjava.sql.SQLException - not!
public void setMaxFieldSize(int max)
throws java.sql.SQLException
setMaxFieldSize in interface java.sql.Statementmax - the new max column size limit; zero means unlimited
java.sql.SQLException - not!
public int getMaxRows()
throws java.sql.SQLException
getMaxRows in interface java.sql.Statementjava.sql.SQLException - not!
public void setMaxRows(int max)
throws java.sql.SQLException
setMaxRows in interface java.sql.Statementmax - the new max rows limit; zero means unlimited
java.sql.SQLException - not!
public void setEscapeProcessing(boolean enable)
throws java.sql.SQLException
setEscapeProcessing in interface java.sql.Statementenable - true to enable; false to disable
java.sql.SQLException - not really.
public int getQueryTimeout()
throws java.sql.SQLException
getQueryTimeout in interface java.sql.Statementjava.sql.SQLException - not!setQueryTimeout(int)
public void setQueryTimeout(int seconds)
throws java.sql.SQLException
setQueryTimeout in interface java.sql.Statementseconds - the new query timeout limit in seconds; zero means unlimited
java.sql.SQLException - if seconds < 0
public void setCursorName(java.lang.String s)
throws java.sql.SQLException
This method does nothing if the CA IDMS system is prior to Release 14.0, since dynamic positioned updates and deletes are not supported.
setCursorName in interface java.sql.Statements - the new extended cursor name.
java.sql.SQLException - if a cursor name in is not unique.
public java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface java.sql.Statementjava.sql.SQLException - never
public int getResultSetType()
throws java.sql.SQLException
getResultSetType in interface java.sql.Statementjava.sql.SQLException - never
public int getResultSetConcurrency()
throws java.sql.SQLException
getResultSetConcurrency in interface java.sql.Statementjava.sql.SQLException - never
public java.sql.ResultSet getGeneratedKeys()
throws java.sql.SQLException
getGeneratedKeys in interface java.sql.Statementjava.sql.SQLException - never
public int getResultSetHoldability()
throws java.sql.SQLException
getResultSetHoldability in interface java.sql.Statementjava.sql.SQLException - not reallyIdmsConnection.getHoldability(),
IdmsConnection.getHoldability()
public boolean execute(java.lang.String sql,
int key)
throws java.sql.SQLException
execute(String).
execute in interface java.sql.Statementsql - SQL statementkey - auto generated key flag, ignored
java.sql.SQLException - if an error occursgetGeneratedKeys()
public boolean execute(java.lang.String sql,
int[] index)
throws java.sql.SQLException
execute(String).
execute in interface java.sql.Statementsql - SQL statementindex - auto generated ordinals array, ignored
java.sql.SQLException - if an error occursgetGeneratedKeys()
public boolean execute(java.lang.String sql,
java.lang.String[] names)
throws java.sql.SQLException
execute(String).
execute in interface java.sql.Statementsql - SQL statementnames - auto generated names array, ignored
java.sql.SQLException - if an error occursgetGeneratedKeys()
public int executeUpdate(java.lang.String sql,
int key)
throws java.sql.SQLException
executeUpdate(String).
executeUpdate in interface java.sql.Statementsql - SQL statementkey - auto generated key flag, ignored
java.sql.SQLException - if an error occursgetGeneratedKeys()
public int executeUpdate(java.lang.String sql,
int[] index)
throws java.sql.SQLException
executeUpdate(String).
executeUpdate in interface java.sql.Statementsql - SQL statementindex - auto generated ordinals array, ignored
java.sql.SQLException - if an error occursgetGeneratedKeys()
public int executeUpdate(java.lang.String sql,
java.lang.String[] names)
throws java.sql.SQLException
executeUpdate(String).
executeUpdate in interface java.sql.Statementsql - SQL statementnames - auto generated names array, ignored
java.sql.SQLException - if an error occursgetGeneratedKeys()
public boolean isPoolable()
throws java.sql.SQLException
isPoolable in interface java.sql.Statementjava.sql.SQLException - - if this method is called on a closed Statement
public void setPoolable(boolean enable)
throws java.sql.SQLException
setPoolable in interface java.sql.Statementenable - true to allow a statement to be pooled; false otherwise
java.sql.SQLException
public void addBatch(java.lang.String sql)
throws java.sql.SQLException
executeBatch() is invoked.
addBatch in interface java.sql.Statementsql - the update command.
java.sql.SQLException - not really
public void clearBatch()
throws java.sql.SQLException
clearBatch in interface java.sql.Statementjava.sql.SQLException - never
public int[] executeBatch()
throws java.sql.SQLException
This method is supported for J2EE compatibility and convenience.
Each statement in the batch is sent separately to the database,
so the performance advantage is limited to ending the IDMS-DC
task (pseudo converse) at the end of the batch instead of after
each statement when autoCommit is enabled.
The IdmsPreparedStatement.executeBatch() uses the bulk
feature to enhance performance for INSERT commands.
executeBatch in interface java.sql.Statementjava.sql.SQLException - if not connected or the batch is empty
java.sql.BatchUpdateException - if an error occurs processing a statement
public boolean getMoreResults(int current)
throws java.sql.SQLException
getMoreResults in interface java.sql.Statementcurrent - indicates what should happen to the current ResultSet
java.sql.SQLException - if an error occurs.
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||