All Packages    This Package  Previous  Next  

Class sqlj.runtime.profile.ref.LocalStatement

java.lang.Object
   |
   +----sqlj.runtime.profile.ref.RTStatementWrapper
           |
           +----sqlj.runtime.profile.ref.LocalStatement

public class LocalStatement
extends RTStatementWrapper
A local statement is a statement that is executed locally, without requiring the standard RDBMS round-trip. As such, it provides default behavior for many of the RTStatement methods that only have meaning in the context of remote execution.

It is expected that subclasses will implement the proper execute method.

Note: Methods that are not directly implemented in this class or a subclass will throw a null pointer exception when executed.


Constructor Index

 o LocalStatement()
Constructs a new local statement.

Method Index

 o cancel()
Local statements do nt require cancellation.
 o clearWarnings()
Since local statements have no warnings, this operation is a no-op
 o executeComplete()
This is a no-op since the statement is local.
 o getJDBCCallableStatement()
Since there is no underlying JDBC statement, this method always throws an exception.
 o getJDBCPreparedStatement()
Since there is no underlying JDBC statement, this method always throws an exception.
 o getMaxFieldSize()
Returns the value set in the last call to setMaxField size, or 0 by default.
 o getMaxRows()
Returns the value set in the last call to setMaxRows size, or 0 by default.
 o getQueryTimeout()
Returns the value set in the last call to setQueryTimeout size, or 0 by default.
 o getWarnings()
Local statements do not produce warnings.
 o setMaxFieldSize(int)
Sets the max field size.
 o setMaxRows(int)
Sets the max rows.
 o setQueryTimeout(int)
Sets the query timeout.

Constructors

 o LocalStatement
 public LocalStatement()
Constructs a new local statement. The statement wrapped by a local statement is null by default.

Methods

 o getJDBCPreparedStatement
 public PreparedStatement getJDBCPreparedStatement() throws SQLException
Since there is no underlying JDBC statement, this method always throws an exception.

Throws: SQLException
whenever called
Overrides:
getJDBCPreparedStatement in class RTStatementWrapper
 o getJDBCCallableStatement
 public CallableStatement getJDBCCallableStatement() throws SQLException
Since there is no underlying JDBC statement, this method always throws an exception.

Throws: SQLException
whenever called
Overrides:
getJDBCCallableStatement in class RTStatementWrapper
 o getMaxFieldSize
 public int getMaxFieldSize()
Returns the value set in the last call to setMaxField size, or 0 by default.

Overrides:
getMaxFieldSize in class RTStatementWrapper
 o setMaxFieldSize
 public void setMaxFieldSize(int max)
Sets the max field size. Since the execution is local, this has no direct effect on the execution of the statement.

Overrides:
setMaxFieldSize in class RTStatementWrapper
 o getMaxRows
 public int getMaxRows()
Returns the value set in the last call to setMaxRows size, or 0 by default.

Overrides:
getMaxRows in class RTStatementWrapper
 o setMaxRows
 public void setMaxRows(int max)
Sets the max rows. Since the execution is local, this has no direct effect on the execution of the statement.

Overrides:
setMaxRows in class RTStatementWrapper
 o getQueryTimeout
 public int getQueryTimeout()
Returns the value set in the last call to setQueryTimeout size, or 0 by default.

Overrides:
getQueryTimeout in class RTStatementWrapper
 o setQueryTimeout
 public void setQueryTimeout(int seconds)
Sets the query timeout. Since the execution is local, this has no direct effect on the execution of the statement.

Overrides:
setQueryTimeout in class RTStatementWrapper
 o executeComplete
 public void executeComplete()
This is a no-op since the statement is local. There is no state to clean up.

Overrides:
executeComplete in class RTStatementWrapper
 o cancel
 public void cancel()
Local statements do nt require cancellation. This call is a no-op.

Overrides:
cancel in class RTStatementWrapper
 o getWarnings
 public SQLWarning getWarnings()
Local statements do not produce warnings.

Returns:
null
Overrides:
getWarnings in class RTStatementWrapper
 o clearWarnings
 public void clearWarnings()
Since local statements have no warnings, this operation is a no-op

Overrides:
clearWarnings in class RTStatementWrapper

All Packages    This Package  Previous  Next