Package org.firebirdsql.gds.ng.wire
Class AbstractFbWireStatement
- java.lang.Object
- 
- org.firebirdsql.gds.ng.AbstractFbStatement
- 
- org.firebirdsql.gds.ng.wire.AbstractFbWireStatement
 
 
- 
- All Implemented Interfaces:
- FbStatement,- ExceptionListenable,- FbWireStatement
 - Direct Known Subclasses:
- V10Statement
 
 public abstract class AbstractFbWireStatement extends AbstractFbStatement implements FbWireStatement - Since:
- 3.0
- Author:
- Mark Rotteveel
 
- 
- 
Field Summary- 
Fields inherited from class org.firebirdsql.gds.ng.AbstractFbStatementexceptionListenerDispatcher, statementListenerDispatcher
 
- 
 - 
Constructor SummaryConstructors Constructor Description AbstractFbWireStatement(FbWireDatabase database)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description protected byte[]calculateBlr(RowDescriptor rowDescriptor)Returns the (possibly cached) blr byte array for aRowDescriptor, ornullif the parameter is null.protected byte[]calculateBlr(RowDescriptor rowDescriptor, RowValue rowValue)Returns the blr byte array for aRowValue, ornullif the parameter is null.voidclose()Close and deallocate this statement.RowDescriptoremptyRowDescriptor()FbWireDatabasegetDatabase()intgetHandle()protected XdrInputStreamgetXdrIn()Gets the XdrInputStream.protected XdrOutputStreamgetXdrOut()Gets the XdrOutputStream.protected booleanisValidTransactionClass(java.lang.Class<? extends FbTransaction> transactionClass)Method to decide if a transaction implementation class is valid for the statement implementation.protected voidsetHandle(int handle)- 
Methods inherited from class org.firebirdsql.gds.ng.AbstractFbStatementaddExceptionListener, addStatementListener, checkStatementValid, checkStatementValid, closeCursor, closeCursor, createExecutionPlanProcessor, createSqlCountProcessor, ensureClosedCursor, finalize, free, getAllowedTimeout, getExecutionPlan, getExplainedExecutionPlan, getFieldDescriptor, getParameterDescriptionInfoRequestItems, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getState, getStatementInfoRequestItems, getStatementWarningCallback, getSynchronizationObject, getTimeout, getTransaction, getTransactionListener, getType, hasFields, hasSingletonResult, isAllRowsFetched, isPrepareAllowed, parseStatementInfo, queueRowData, removeExceptionListener, removeStatementListener, reset, reset, resetAll, setAllRowsFetched, setFieldDescriptor, setParameterDescriptor, setRowDescriptor, setTimeout, setTransaction, setType, signalExecute, signalFetch, switchState, validateParameters
 - 
Methods inherited from class java.lang.Objectclone, equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 - 
Methods inherited from interface org.firebirdsql.gds.ng.listeners.ExceptionListenableaddExceptionListener, removeExceptionListener
 - 
Methods inherited from interface org.firebirdsql.gds.ng.FbStatementaddStatementListener, closeCursor, closeCursor, ensureClosedCursor, execute, fetchRows, getDefaultSqlInfoSize, getExecutionPlan, getExplainedExecutionPlan, getFieldDescriptor, getMaxSqlInfoSize, getParameterDescriptor, getRowDescriptor, getSqlCounts, getSqlInfo, getSqlInfo, getState, getTimeout, getTransaction, getType, prepare, removeStatementListener, setCursorName, setTimeout, setTransaction, validateParameters
 
- 
 
- 
- 
- 
Constructor Detail- 
AbstractFbWireStatementpublic AbstractFbWireStatement(FbWireDatabase database) 
 
- 
 - 
Method Detail- 
getXdrInprotected final XdrInputStream getXdrIn() throws java.sql.SQLException Gets the XdrInputStream.- Returns:
- Instance of XdrInputStream
- Throws:
- java.sql.SQLException- If no connection is opened or when exceptions occur retrieving the InputStream
 
 - 
getXdrOutprotected final XdrOutputStream getXdrOut() throws java.sql.SQLException Gets the XdrOutputStream.- Returns:
- Instance of XdrOutputStream
- Throws:
- java.sql.SQLException- If no connection is opened or when exceptions occur retrieving the OutputStream
 
 - 
getDatabasepublic final FbWireDatabase getDatabase() - Specified by:
- getDatabasein interface- FbStatement
- Returns:
- The database connection that created this statement
 
 - 
getHandlepublic final int getHandle() - Specified by:
- getHandlein interface- FbStatement
- Returns:
- The Firebird statement handle identifier
 
 - 
setHandleprotected final void setHandle(int handle) 
 - 
calculateBlrprotected final byte[] calculateBlr(RowDescriptor rowDescriptor) throws java.sql.SQLException Returns the (possibly cached) blr byte array for aRowDescriptor, ornullif the parameter is null.- Parameters:
- rowDescriptor- The row descriptor.
- Returns:
- blr byte array or nullwhenrowDescriptorisnull
- Throws:
- java.sql.SQLException- When the- RowDescriptorcontains an unsupported field type.
 
 - 
calculateBlrprotected final byte[] calculateBlr(RowDescriptor rowDescriptor, RowValue rowValue) throws java.sql.SQLException Returns the blr byte array for aRowValue, ornullif the parameter is null.Contrary to calculateBlr(org.firebirdsql.gds.ng.fields.RowDescriptor), it is not allowed to cache this value as it depends on the actual row value.- Parameters:
- rowValue- The row value.
- Returns:
- blr byte array or nullwhenrowValueisnull
- Throws:
- java.sql.SQLException- When the- RowValuecontains an unsupported field type.
 
 - 
closepublic void close() throws java.sql.SQLExceptionDescription copied from interface:FbStatementClose and deallocate this statement.- Specified by:
- closein interface- FbStatement
- Overrides:
- closein class- AbstractFbStatement
- Throws:
- java.sql.SQLException
 
 - 
isValidTransactionClassprotected boolean isValidTransactionClass(java.lang.Class<? extends FbTransaction> transactionClass) Description copied from class:AbstractFbStatementMethod to decide if a transaction implementation class is valid for the statement implementation.Eg a V10Statementwill only work with anFbWireTransactionimplementation.- Specified by:
- isValidTransactionClassin class- AbstractFbStatement
- Parameters:
- transactionClass- Class of the transaction
- Returns:
- truewhen the transaction class is valid for the statement implementation.
 
 - 
emptyRowDescriptorpublic final RowDescriptor emptyRowDescriptor() - Specified by:
- emptyRowDescriptorin interface- FbStatement
- Returns:
- A potentially cached empty row descriptor for this statement or database.
 
 
- 
 
-