Package org.apache.openjpa.lib.jdbc
Class DelegatingStatement
java.lang.Object
org.apache.openjpa.lib.jdbc.DelegatingStatement
- All Implemented Interfaces:
- AutoCloseable,- Statement,- Wrapper,- Closeable
- Direct Known Subclasses:
- LoggingConnectionDecorator.LoggingConnection.LoggingStatement
Wrapper around an existing statement. Subclasses can override the
 methods whose behavior they mean to change. The 
equals and
 hashCode methods pass through to the base underlying data
 store statement.- Author:
- Abe White
- 
Field SummaryFields inherited from interface java.sql.StatementCLOSE_ALL_RESULTS, CLOSE_CURRENT_RESULT, EXECUTE_FAILED, KEEP_CURRENT_RESULT, NO_GENERATED_KEYS, RETURN_GENERATED_KEYS, SUCCESS_NO_INFO
- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionvoidprotected voidappendInfo(StringBuffer buf) voidcancel()voidvoidvoidclose()voidbooleanbooleanbooleanbooleanbooleanint[]executeQuery(String str) protected ResultSetexecuteQuery(String sql, boolean wrap) Execute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.intexecuteUpdate(String str) intexecuteUpdate(String s, int i) intexecuteUpdate(String s, int[] ia) intexecuteUpdate(String s, String[] sa) Return the wrapped statement.intintReturn the base underlying data store statement.intintbooleanbooleangetMoreResults(int i) intprotected ResultSetgetResultSet(boolean wrap) Get the last result set, with the option of not wrapping it in aDelegatingResultSet, which is the default.intintintintinthashCode()voidinitialize(Statement stmnt, Connection conn) booleanisClosed()booleanbooleanbooleanisWrapperFor(Class<?> iface) voidsetCursorName(String str) voidsetEscapeProcessing(boolean bool) voidsetFetchDirection(int i) voidsetFetchSize(int i) voidsetMaxFieldSize(int i) voidsetMaxRows(int i) voidsetPoolable(boolean b) voidsetQueryTimeout(int i) toString()<T> Tprotected ResultSetwrapResult(ResultSet rs, boolean wrap) Methods inherited from class java.lang.Objectclone, finalize, getClass, notify, notifyAll, wait, wait, waitMethods inherited from interface java.sql.StatementenquoteIdentifier, enquoteLiteral, enquoteNCharLiteral, executeLargeBatch, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, executeLargeUpdate, getLargeMaxRows, getLargeUpdateCount, isSimpleIdentifier, setLargeMaxRows
- 
Constructor Details- 
DelegatingStatement
 
- 
- 
Method Details- 
initialize
- 
wrapResult
- 
getDelegateReturn the wrapped statement.
- 
getInnermostDelegateReturn the base underlying data store statement.
- 
hashCodepublic int hashCode()
- 
equals
- 
toString
- 
appendInfo
- 
executeQuery- Specified by:
- executeQueryin interface- Statement
- Throws:
- SQLException
 
- 
executeQueryExecute the query, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Throws:
- SQLException
 
- 
executeUpdate- Specified by:
- executeUpdatein interface- Statement
- Throws:
- SQLException
 
- 
execute- Specified by:
- executein interface- Statement
- Throws:
- SQLException
 
- 
close- Specified by:
- closein interface- AutoCloseable
- Specified by:
- closein interface- Closeable
- Specified by:
- closein interface- Statement
- Throws:
- SQLException
 
- 
getMaxFieldSize- Specified by:
- getMaxFieldSizein interface- Statement
- Throws:
- SQLException
 
- 
setMaxFieldSize- Specified by:
- setMaxFieldSizein interface- Statement
- Throws:
- SQLException
 
- 
getMaxRows- Specified by:
- getMaxRowsin interface- Statement
- Throws:
- SQLException
 
- 
setMaxRows- Specified by:
- setMaxRowsin interface- Statement
- Throws:
- SQLException
 
- 
setEscapeProcessing- Specified by:
- setEscapeProcessingin interface- Statement
- Throws:
- SQLException
 
- 
getQueryTimeout- Specified by:
- getQueryTimeoutin interface- Statement
- Throws:
- SQLException
 
- 
setQueryTimeout- Specified by:
- setQueryTimeoutin interface- Statement
- Throws:
- SQLException
 
- 
cancel- Specified by:
- cancelin interface- Statement
- Throws:
- SQLException
 
- 
getWarnings- Specified by:
- getWarningsin interface- Statement
- Throws:
- SQLException
 
- 
clearWarnings- Specified by:
- clearWarningsin interface- Statement
- Throws:
- SQLException
 
- 
setCursorName- Specified by:
- setCursorNamein interface- Statement
- Throws:
- SQLException
 
- 
getResultSet- Specified by:
- getResultSetin interface- Statement
- Throws:
- SQLException
 
- 
getResultSetGet the last result set, with the option of not wrapping it in aDelegatingResultSet, which is the default.- Throws:
- SQLException
 
- 
getUpdateCount- Specified by:
- getUpdateCountin interface- Statement
- Throws:
- SQLException
 
- 
getMoreResults- Specified by:
- getMoreResultsin interface- Statement
- Throws:
- SQLException
 
- 
setFetchDirection- Specified by:
- setFetchDirectionin interface- Statement
- Throws:
- SQLException
 
- 
getFetchDirection- Specified by:
- getFetchDirectionin interface- Statement
- Throws:
- SQLException
 
- 
setFetchSize- Specified by:
- setFetchSizein interface- Statement
- Throws:
- SQLException
 
- 
getFetchSize- Specified by:
- getFetchSizein interface- Statement
- Throws:
- SQLException
 
- 
getResultSetConcurrency- Specified by:
- getResultSetConcurrencyin interface- Statement
- Throws:
- SQLException
 
- 
getResultSetType- Specified by:
- getResultSetTypein interface- Statement
- Throws:
- SQLException
 
- 
addBatch- Specified by:
- addBatchin interface- Statement
- Throws:
- SQLException
 
- 
clearBatch- Specified by:
- clearBatchin interface- Statement
- Throws:
- SQLException
 
- 
executeBatch- Specified by:
- executeBatchin interface- Statement
- Throws:
- SQLException
 
- 
getConnection- Specified by:
- getConnectionin interface- Statement
- Throws:
- SQLException
 
- 
getMoreResults- Specified by:
- getMoreResultsin interface- Statement
- Throws:
- SQLException
 
- 
getGeneratedKeys- Specified by:
- getGeneratedKeysin interface- Statement
- Throws:
- SQLException
 
- 
executeUpdate- Specified by:
- executeUpdatein interface- Statement
- Throws:
- SQLException
 
- 
executeUpdate- Specified by:
- executeUpdatein interface- Statement
- Throws:
- SQLException
 
- 
executeUpdate- Specified by:
- executeUpdatein interface- Statement
- Throws:
- SQLException
 
- 
execute- Specified by:
- executein interface- Statement
- Throws:
- SQLException
 
- 
execute- Specified by:
- executein interface- Statement
- Throws:
- SQLException
 
- 
execute- Specified by:
- executein interface- Statement
- Throws:
- SQLException
 
- 
getResultSetHoldability- Specified by:
- getResultSetHoldabilityin interface- Statement
- Throws:
- SQLException
 
- 
isWrapperFor- Specified by:
- isWrapperForin interface- Wrapper
- Throws:
- SQLException
 
- 
unwrap- Specified by:
- unwrapin interface- Wrapper
- Throws:
- SQLException
 
- 
isClosed- Specified by:
- isClosedin interface- Statement
- Throws:
- SQLException
 
- 
setPoolable- Specified by:
- setPoolablein interface- Statement
- Throws:
- SQLException
 
- 
isPoolable- Specified by:
- isPoolablein interface- Statement
- Throws:
- SQLException
 
- 
isCloseOnCompletion- Specified by:
- isCloseOnCompletionin interface- Statement
- Throws:
- SQLException
 
- 
closeOnCompletion- Specified by:
- closeOnCompletionin interface- Statement
- Throws:
- SQLException
 
 
-