    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.

##

LocalStatement()
  Constructs a new local statement.

##

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

##

LocalStatement

     public LocalStatement()

  Constructs a new local statement. The statement wrapped by a local statement is null by default.

##

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

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

getMaxFieldSize

     public int getMaxFieldSize()

  Returns the value set in the last call to setMaxField size, or 0 by default.

  Overrides:
    getMaxFieldSize in class RTStatementWrapper

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

getMaxRows

     public int getMaxRows()

  Returns the value set in the last call to setMaxRows size, or 0 by default.

  Overrides:
    getMaxRows in class RTStatementWrapper

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

getQueryTimeout

     public int getQueryTimeout()

  Returns the value set in the last call to setQueryTimeout size, or 0 by default.

  Overrides:
    getQueryTimeout in class RTStatementWrapper

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

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

cancel

     public void cancel()

  Local statements do nt require cancellation. This call is a no-op.

  Overrides:
    cancel in class RTStatementWrapper

getWarnings

     public SQLWarning getWarnings()

  Local statements do not produce warnings.

  Returns:
    null
  Overrides:
    getWarnings in class RTStatementWrapper

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