Wrapper around an existing statement. Subclasses can override the
methods whose behavior they mean to change. The
methods pass through to the base underlying data
store statement.
| Method from org.apache.openjpa.lib.jdbc.DelegatingStatement Detail: |
public void addBatch(String str) throws SQLException {
_stmnt.addBatch(str);
}
|
protected void appendInfo(StringBuffer buf) {
if (_del != null)
_del.appendInfo(buf);
}
|
public void cancel() throws SQLException {
_stmnt.cancel();
}
|
public void clearBatch() throws SQLException {
_stmnt.clearBatch();
}
|
public void clearWarnings() throws SQLException {
_stmnt.clearWarnings();
}
|
public void close() throws SQLException {
_stmnt.close();
}
|
public boolean equals(Object other) {
if (other == this)
return true;
if (other instanceof DelegatingStatement)
other = ((DelegatingStatement) other).getInnermostDelegate();
return getInnermostDelegate().equals(other);
}
|
public boolean execute(String str) throws SQLException {
return _stmnt.execute(str);
}
|
public boolean execute(String s,
int i) throws SQLException {
throw new UnsupportedOperationException();
}
|
public boolean execute(String s,
int[] ia) throws SQLException {
throw new UnsupportedOperationException();
}
|
public boolean execute(String s,
String[] sa) throws SQLException {
throw new UnsupportedOperationException();
}
|
public int[] executeBatch() throws SQLException {
return _stmnt.executeBatch();
}
|
public ResultSet executeQuery(String str) throws SQLException {
return executeQuery(str, true);
}
|
protected ResultSet executeQuery(String sql,
boolean wrap) throws SQLException {
ResultSet rs;
if (_del != null)
rs = _del.executeQuery(sql, false);
else
rs = _stmnt.executeQuery(sql);
return wrapResult(rs, wrap);
}
Execute the query, with the option of not wrapping it in a
DelegatingResultSet , which is the default. |
public int executeUpdate(String str) throws SQLException {
return _stmnt.executeUpdate(str);
}
|
public int executeUpdate(String s,
int i) throws SQLException {
throw new UnsupportedOperationException();
}
|
public int executeUpdate(String s,
int[] ia) throws SQLException {
throw new UnsupportedOperationException();
}
|
public int executeUpdate(String s,
String[] sa) throws SQLException {
throw new UnsupportedOperationException();
}
|
public Connection getConnection() throws SQLException {
return _conn;
}
|
public Statement getDelegate() {
return _stmnt;
}
Return the wrapped statement. |
public int getFetchDirection() throws SQLException {
return _stmnt.getFetchDirection();
}
|
public int getFetchSize() throws SQLException {
return _stmnt.getFetchSize();
}
|
public ResultSet getGeneratedKeys() throws SQLException {
throw new UnsupportedOperationException();
}
|
public Statement getInnermostDelegate() {
return (_del == null) ? _stmnt : _del.getInnermostDelegate();
}
Return the base underlying data store statement. |
public int getMaxFieldSize() throws SQLException {
return _stmnt.getMaxFieldSize();
}
|
public int getMaxRows() throws SQLException {
return _stmnt.getMaxRows();
}
|
public boolean getMoreResults() throws SQLException {
return _stmnt.getMoreResults();
}
|
public boolean getMoreResults(int i) throws SQLException {
throw new UnsupportedOperationException();
}
|
public int getQueryTimeout() throws SQLException {
return _stmnt.getQueryTimeout();
}
|
public ResultSet getResultSet() throws SQLException {
return getResultSet(true);
}
|
protected ResultSet getResultSet(boolean wrap) throws SQLException {
ResultSet rs;
if (_del != null)
rs = _del.getResultSet(false);
else
rs = _stmnt.getResultSet();
return wrapResult(rs, wrap);
}
Get the last result set, with the option of not wrapping it in a
DelegatingResultSet , which is the default. |
public int getResultSetConcurrency() throws SQLException {
return _stmnt.getResultSetConcurrency();
}
|
public int getResultSetHoldability() throws SQLException {
throw new UnsupportedOperationException();
}
|
public int getResultSetType() throws SQLException {
return _stmnt.getResultSetType();
}
|
public int getUpdateCount() throws SQLException {
return _stmnt.getUpdateCount();
}
|
public SQLWarning getWarnings() throws SQLException {
return _stmnt.getWarnings();
}
|
public int hashCode() {
return getInnermostDelegate().hashCode();
}
|
public void setCursorName(String str) throws SQLException {
_stmnt.setCursorName(str);
}
|
public void setEscapeProcessing(boolean bool) throws SQLException {
_stmnt.setEscapeProcessing(bool);
}
|
public void setFetchDirection(int i) throws SQLException {
_stmnt.setFetchDirection(i);
}
|
public void setFetchSize(int i) throws SQLException {
_stmnt.setFetchSize(i);
}
|
public void setMaxFieldSize(int i) throws SQLException {
_stmnt.setMaxFieldSize(i);
}
|
public void setMaxRows(int i) throws SQLException {
_stmnt.setMaxRows(i);
}
|
public void setQueryTimeout(int i) throws SQLException {
_stmnt.setQueryTimeout(i);
}
|
public String toString() {
StringBuffer buf = new StringBuffer("stmnt ").append(hashCode());
appendInfo(buf);
return buf.toString();
}
|
protected ResultSet wrapResult(ResultSet rs,
boolean wrap) {
if (!wrap || rs == null)
return rs;
return new DelegatingResultSet(rs, this);
}
|