public class UserStatement
extends java.lang.Object
implements java.sql.Statement
Modifier and Type | Field and Description |
---|---|
protected UserConnection |
_conn |
protected boolean |
_isPoolable |
protected java.sql.Statement |
_stmt |
protected static L10N |
L |
Modifier and Type | Method and Description |
---|---|
void |
addBatch(java.lang.String sql) |
void |
cancel() |
void |
clearBatch() |
void |
clearWarnings() |
void |
close()
Closes the statement.
|
void |
closeOnCompletion() |
boolean |
execute(java.lang.String sql)
executes the given sql.
|
boolean |
execute(java.lang.String query,
int resultType)
executes the given query with its result type.
|
boolean |
execute(java.lang.String query,
int[] columns)
executes the given query with the columns given for
primary key generation.
|
boolean |
execute(java.lang.String query,
java.lang.String[] columns)
executes the given query with the columns given for
primary key generation.
|
int[] |
executeBatch()
Executes the batched sql.
|
java.sql.ResultSet |
executeQuery(java.lang.String sql)
queries the database with the given sql.
|
int |
executeUpdate(java.lang.String sql)
updates the database with the given sql.
|
int |
executeUpdate(java.lang.String query,
int resultType)
Execute an update with the given result type.
|
int |
executeUpdate(java.lang.String query,
int[] columns)
Execute an update checking the given columns for primary keys.
|
int |
executeUpdate(java.lang.String query,
java.lang.String[] columns)
Execute an update checking the given columns for primary keys.
|
java.sql.Connection |
getConnection()
Returns the underlying connection.
|
int |
getFetchDirection()
Returns the current fetch direction.
|
int |
getFetchSize()
Returns the fetch size.
|
java.sql.ResultSet |
getGeneratedKeys()
Returns the generated keys for the update.
|
int |
getMaxFieldSize()
Returns the maximum field size.
|
int |
getMaxRows()
Returns the maximum rows returned by a query.
|
boolean |
getMoreResults()
Returns true if more results are available.
|
boolean |
getMoreResults(int count)
Returns the next count results.
|
int |
getQueryTimeout()
Returns the current query timeout.
|
java.sql.ResultSet |
getResultSet()
Returns the result set of the last query.
|
int |
getResultSetConcurrency()
Returns the statement's result set concurrency setting.
|
int |
getResultSetHoldability()
Returns the result set holdability.
|
int |
getResultSetType()
Returns the statement's result set type.
|
java.sql.Statement |
getStatement()
Returns the underlying statement.
|
int |
getUpdateCount()
Returns the update count of the last query.
|
java.sql.SQLWarning |
getWarnings()
Returns the current sql warnings.
|
boolean |
isClosed() |
boolean |
isCloseOnCompletion() |
boolean |
isPoolable() |
boolean |
isWrapperFor(java.lang.Class<?> iface) |
protected void |
killPool()
Marks the connection as non-poolable.
|
protected void |
onRuntimeException(java.lang.RuntimeException e) |
protected void |
onSqlException(java.sql.SQLException e) |
void |
setCursorName(java.lang.String name)
Sets the current cursor name.
|
void |
setEscapeProcessing(boolean enable)
Enables escape processing.
|
void |
setFetchDirection(int direction)
Sets the fetch direction.
|
void |
setFetchSize(int rows)
Sets the fetch size.
|
void |
setMaxFieldSize(int max)
Sets the maximum field size.
|
void |
setMaxRows(int max)
Sets the maximum rows returned by a query.
|
void |
setPoolable(boolean poolable) |
void |
setQueryTimeout(int seconds)
Sets the query timeout.
|
java.lang.String |
toString() |
<T> T |
unwrap(java.lang.Class<T> iface) |
protected static final L10N L
protected UserConnection _conn
protected java.sql.Statement _stmt
protected boolean _isPoolable
public void setPoolable(boolean poolable)
setPoolable
in interface java.sql.Statement
public boolean isPoolable()
isPoolable
in interface java.sql.Statement
public java.sql.Statement getStatement()
public void addBatch(java.lang.String sql) throws java.sql.SQLException
addBatch
in interface java.sql.Statement
java.sql.SQLException
public void cancel() throws java.sql.SQLException
cancel
in interface java.sql.Statement
java.sql.SQLException
public void clearBatch() throws java.sql.SQLException
clearBatch
in interface java.sql.Statement
java.sql.SQLException
public void clearWarnings() throws java.sql.SQLException
clearWarnings
in interface java.sql.Statement
java.sql.SQLException
public void close() throws java.sql.SQLException
close
in interface java.lang.AutoCloseable
close
in interface java.sql.Statement
java.sql.SQLException
public java.sql.ResultSet executeQuery(java.lang.String sql) throws java.sql.SQLException
executeQuery
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String sql) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String query, int resultType) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String query, int[] columns) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public int executeUpdate(java.lang.String query, java.lang.String[] columns) throws java.sql.SQLException
executeUpdate
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String sql) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String query, int resultType) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String query, int[] columns) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public boolean execute(java.lang.String query, java.lang.String[] columns) throws java.sql.SQLException
execute
in interface java.sql.Statement
java.sql.SQLException
public int[] executeBatch() throws java.sql.SQLException
executeBatch
in interface java.sql.Statement
java.sql.SQLException
public java.sql.ResultSet getResultSet() throws java.sql.SQLException
getResultSet
in interface java.sql.Statement
java.sql.SQLException
public int getUpdateCount() throws java.sql.SQLException
getUpdateCount
in interface java.sql.Statement
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface java.sql.Statement
java.sql.SQLException
public int getFetchDirection() throws java.sql.SQLException
getFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public void setFetchDirection(int direction) throws java.sql.SQLException
setFetchDirection
in interface java.sql.Statement
java.sql.SQLException
public int getFetchSize() throws java.sql.SQLException
getFetchSize
in interface java.sql.Statement
java.sql.SQLException
public void setFetchSize(int rows) throws java.sql.SQLException
setFetchSize
in interface java.sql.Statement
java.sql.SQLException
public int getMaxFieldSize() throws java.sql.SQLException
getMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public void setMaxFieldSize(int max) throws java.sql.SQLException
setMaxFieldSize
in interface java.sql.Statement
java.sql.SQLException
public int getMaxRows() throws java.sql.SQLException
getMaxRows
in interface java.sql.Statement
java.sql.SQLException
public void setMaxRows(int max) throws java.sql.SQLException
setMaxRows
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults() throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
public int getQueryTimeout() throws java.sql.SQLException
getQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
public void setQueryTimeout(int seconds) throws java.sql.SQLException
setQueryTimeout
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetConcurrency() throws java.sql.SQLException
getResultSetConcurrency
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetType() throws java.sql.SQLException
getResultSetType
in interface java.sql.Statement
java.sql.SQLException
public java.sql.SQLWarning getWarnings() throws java.sql.SQLException
getWarnings
in interface java.sql.Statement
java.sql.SQLException
public void setCursorName(java.lang.String name) throws java.sql.SQLException
setCursorName
in interface java.sql.Statement
java.sql.SQLException
public void setEscapeProcessing(boolean enable) throws java.sql.SQLException
setEscapeProcessing
in interface java.sql.Statement
java.sql.SQLException
public boolean getMoreResults(int count) throws java.sql.SQLException
getMoreResults
in interface java.sql.Statement
java.sql.SQLException
public java.sql.ResultSet getGeneratedKeys() throws java.sql.SQLException
getGeneratedKeys
in interface java.sql.Statement
java.sql.SQLException
public int getResultSetHoldability() throws java.sql.SQLException
getResultSetHoldability
in interface java.sql.Statement
java.sql.SQLException
public boolean isClosed() throws java.sql.SQLException
isClosed
in interface java.sql.Statement
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public void closeOnCompletion() throws java.sql.SQLException
closeOnCompletion
in interface java.sql.Statement
java.sql.SQLException
public boolean isCloseOnCompletion() throws java.sql.SQLException
isCloseOnCompletion
in interface java.sql.Statement
java.sql.SQLException
protected void onSqlException(java.sql.SQLException e)
protected void onRuntimeException(java.lang.RuntimeException e)
protected void killPool()
public java.lang.String toString()
toString
in class java.lang.Object