|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.firebirdsql.gds.impl.AbstractGDS
org.firebirdsql.gds.impl.wire.AbstractJavaGDSImpl
public abstract class AbstractJavaGDSImpl
Describe class GDS_Impl here.
| Nested Class Summary | |
|---|---|
protected static class |
AbstractJavaGDSImpl.DbAttachInfo
|
| Field Summary | |
|---|---|
static String |
PURE_JAVA_TYPE_NAME
|
| Constructor Summary | |
|---|---|
AbstractJavaGDSImpl()
|
|
| Method Summary | |
|---|---|
static void |
calculateBLR(XSQLDA xsqlda)
|
static void |
calculateIOLength(XSQLDA xsqlda)
|
protected void |
connect(isc_db_handle_impl db,
AbstractJavaGDSImpl.DbAttachInfo dbai,
DatabaseParameterBuffer databaseParameterBuffer)
|
void |
connect(isc_db_handle_impl db,
String host,
Integer port,
String filename,
DatabaseParameterBuffer databaseParameterBuffer)
|
BlobParameterBuffer |
createBlobParameterBuffer()
Create a new BlobParameterBuffer instance for setting blob
parameters in the current GDS implementation. |
DatabaseParameterBuffer |
createDatabaseParameterBuffer()
Create a new DatabaseParameterBuffer instance for setting
database parameters in the current GDS implementation. |
EventHandle |
createEventHandle(String eventName)
Create a new EventHandle specific to a given
GDS implementation. |
IscBlobHandle |
createIscBlobHandle()
Factory method to create a new IscBlobHandle instance
specific to the implementation of this interface. |
IscDbHandle |
createIscDbHandle()
Factory method to create a new IscDbHandle instance specific to
the implementation of this interface. |
IscStmtHandle |
createIscStmtHandle()
Factory method to create a new IscStmtHandle instance
specific to the implementation of this interface. |
IscSvcHandle |
createIscSvcHandle()
Factory method to create a new IscSvcHandle instance
that is linked to the current GDS implemenation. |
IscTrHandle |
createIscTrHandle()
Factory method to create a new IscTrHandle instance that
is linked to the current GDS implementation. |
ServiceParameterBuffer |
createServiceParameterBuffer()
Create a new ServiceParameterBuffer instance for setting
service parameters in the current GDS implementation. |
ServiceRequestBuffer |
createServiceRequestBuffer(int taskIdentifier)
Create a new ServiceRequestBuffer instance for setting
service request parameters in the current GDS implementation. |
void |
disconnect(isc_db_handle_impl db)
|
abstract Socket |
getSocket(String server,
int port)
Returns a newly created socket. |
void |
getSqlCounts(IscStmtHandle stmt_handle)
Fetch count information for a statement. |
void |
internalAttachDatabase(AbstractJavaGDSImpl.DbAttachInfo dbai,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
|
void |
internalAttachDatabase(String host,
Integer port,
String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
|
void |
isc_dsql_alloc_statement2(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
|
void |
iscAttachDatabase(String connectString,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
Attach to an existing database via a filename. |
byte[] |
iscBlobInfo(IscBlobHandle handle,
byte[] items,
int buffer_length)
Retrieve data about an existing blob. |
void |
iscCancelEvents(IscDbHandle dbHandle,
EventHandle eventHandle)
Cancel event listening based on an EventHandle. |
void |
iscCloseBlob(IscBlobHandle blob_handle)
Close an open blob. |
void |
iscCommitRetaining(IscTrHandle tr_handle)
|
void |
iscCommitTransaction(IscTrHandle tr_handle)
Commit a transaction. |
void |
iscCreateBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
Create a new blob within a given transaction. |
void |
iscCreateDatabase(String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
isc_create_database creates a database based on the file
name and Clumplet of database properties supplied. |
byte[] |
iscDatabaseInfo(IscDbHandle handle,
byte[] items,
int buffer_length)
Get information about the database to which IscDbHandle is
attached. |
void |
iscDetachDatabase(IscDbHandle db_handle)
Detach the given database handle from its database. |
void |
iscDropDatabase(IscDbHandle db_handle)
Drop (delete) the database to which IscDbHandle is attached. |
void |
iscDsqlAllocateStatement(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
Allocate a dynamic SQL (DSQL) statement on the database to which IscDbHandle is attached. |
XSQLDA |
iscDsqlDescribe(IscStmtHandle stmt_handle,
int da_version)
Retrieve data for a statement. |
XSQLDA |
iscDsqlDescribeBind(IscStmtHandle stmt_handle,
int da_version)
Retrieve data for a bind statement. |
void |
iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
|
void |
iscDsqlExecute(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda)
Execute a statement with only outgoing data. |
void |
iscDsqlExecute2(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
Execute a statement with outgoing and incoming data. |
void |
iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA xsqlda)
Execute a string SQL statement directly, without first allocating a statement handle. |
void |
iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA xsqlda)
|
void |
iscDsqlFetch(IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda,
int fetchSize)
Retrieve record data from a statement. |
void |
iscDsqlFreeStatement(IscStmtHandle stmt_handle,
int option)
Free a statement in the database that is pointed to by a valid handle. |
XSQLDA |
iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
byte[] statement,
int dialect)
Prepare a string SQL statement for execution in the database. |
XSQLDA |
iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
int dialect)
Prepare a string SQL statement for execution in the database. |
XSQLDA |
iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
String encoding,
int dialect)
|
void |
iscDsqlSetCursorName(IscStmtHandle stmt_handle,
String cursor_name,
int type)
Set the name to be used for a given statement. |
byte[] |
iscDsqlSqlInfo(IscStmtHandle stmt_handle,
byte[] items,
int buffer_length)
Retrieve data about a statement. |
void |
iscEventBlock(EventHandle eventHandle)
Initialize the internal databastructures for an EventHandle. |
void |
iscEventCounts(EventHandle eventHandle)
Retrieve count information after an event has occurred. |
byte[] |
iscExpandDpb(byte[] dpb,
int dpb_length,
int param,
Object[] params)
|
byte[] |
iscGetSegment(IscBlobHandle blob_handle,
int requested)
Fetch a segment of a blob. |
int |
iscInteger(byte[] buffer,
int pos,
int length)
|
void |
iscOpenBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
Open a blob within a given transaction. |
void |
iscPrepareTransaction(IscTrHandle tr_handle)
|
void |
iscPrepareTransaction2(IscTrHandle tr_handle,
byte[] bytes)
|
void |
iscPutSegment(IscBlobHandle blob_handle,
byte[] buffer)
Write a segment of data to a blob. |
int |
iscQueueEvents(IscDbHandle dbHandle,
EventHandle eventHandle,
EventHandler eventHandler)
Queue an EventHandler. |
void |
iscReconnectTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
long transactionId)
Reconnect "in limbo" transaction using new database handle. |
void |
iscRollbackRetaining(IscTrHandle tr_handle)
|
void |
iscRollbackTransaction(IscTrHandle tr_handle)
Rollback a transaction. |
void |
iscSeekBlob(IscBlobHandle handle,
int position,
int seekMode)
Seek to a given position in a blob. |
void |
iscServiceAttach(String service,
IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer)
Attach to a Service Manager. |
void |
iscServiceDetach(IscSvcHandle serviceHandle)
Detach from a Service Manager. |
void |
iscServiceQuery(IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer,
ServiceRequestBuffer serviceRequestBuffer,
byte[] resultBuffer)
Query a service manager |
void |
iscServiceStart(IscSvcHandle serviceHandle,
ServiceRequestBuffer serviceRequestBuffer)
Start a service operation. |
void |
iscStartTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
TransactionParameterBuffer tpb)
Start a transaction based on a handle to a transaction. |
byte[] |
iscTransactionInformation(IscTrHandle tr_handle,
byte[] requestBuffer,
int bufferLen)
|
int |
iscVaxInteger(byte[] buffer,
int pos,
int length)
Retrieve an integer value from a sequence of bytes. |
TransactionParameterBuffer |
newTransactionParameterBuffer()
Create new TransactionParameterBuffer instance for setting
transaction parameters in the current GDS implementation. |
protected int |
nextOperation(isc_db_handle_impl db)
|
protected int |
nextOperation(isc_svc_handle_impl svc)
|
protected void |
openSocket(isc_db_handle_impl db,
AbstractJavaGDSImpl.DbAttachInfo dbai,
boolean debug,
int socketBufferSize)
|
void |
receiveResponse(isc_db_handle_impl db,
int op)
|
void |
receiveResponse(isc_svc_handle_impl svc,
int op)
|
| Methods inherited from class org.firebirdsql.gds.impl.AbstractGDS |
|---|
close, getGdsType, getType, readExternal, readResolve, writeExternal |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.firebirdsql.gds.GDS |
|---|
close |
| Field Detail |
|---|
public static final String PURE_JAVA_TYPE_NAME
| Constructor Detail |
|---|
public AbstractJavaGDSImpl()
| Method Detail |
|---|
public void iscCreateDatabase(String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
isc_create_database creates a database based on the file
name and Clumplet of database properties supplied. The supplied db handle
is attached to the newly created database.
iscCreateDatabase in interface GDSfile_name - a String the file name, including host and
port, for the database. The expected format is
host:port:path_to_file. The value for host is localhost if not
supplied. The value for port is 3050 if not supplied.db_handle - an isc_db_handle The db handle to attach to the
new database.databaseParameterBuffer - a Clumplet The parameters for the new database
and the attachment to it. See docs for dpb (database parameter
block.)
GDSException - if an error occurs
public void internalAttachDatabase(String host,
Integer port,
String file_name,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
GDSException
public void iscAttachDatabase(String connectString,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
GDS
iscAttachDatabase in interface GDSconnectString - The filename for the database, including host and port. The
expected format is
<host name>/<port>:<file path>.
The value for host is localhost if not supplied. The value for
port is 3050 if not supplied.db_handle - The handle to attach to the databasedatabaseParameterBuffer - parameters for the database attachment
GDSException - if an error occurs while attaching to the database
public void internalAttachDatabase(AbstractJavaGDSImpl.DbAttachInfo dbai,
IscDbHandle db_handle,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
GDSException
public byte[] iscDatabaseInfo(IscDbHandle handle,
byte[] items,
int buffer_length)
throws GDSException
GDSIscDbHandle is
attached. The requested parameters are values set in items,
and the values in the returned byte-array correspond to the requested
parameters in items
iscDatabaseInfo in interface GDShandle - Handle to the database for which info is to be retrieveditems - An array of values from the isc_info_* constant
fields from ISCConstantsbuffer_length - The size of the byte array that is to be returned
items
GDSException - if an error occurs while retrieving database info
public byte[] iscBlobInfo(IscBlobHandle handle,
byte[] items,
int buffer_length)
throws GDSException
GDSitems, and the corresponding values are
returned. The values in items should be
isc_info_blob_* constants from ISCConstants.
iscBlobInfo in interface GDShandle - Handle to the blob for which data is to be retrieveditems - Parameters to be fetched about the blobbuffer_length - Length of the byte array to be returned
items
GDSException - if an error occurs while fetching data about the blob
public void iscSeekBlob(IscBlobHandle handle,
int position,
int seekMode)
throws GDSException
GDSseekMode is used in
the same way as the system fseek call, i.e.:
position is the offset number of bytes to seek to,
relative to the position described by seekMode. Seeking
can only be done in a forward direction.
iscSeekBlob in interface GDShandle - Handle to the blob for which seeking will be doneposition - The offset number of bytes to seek toseekMode - Describes the base point to be used in seeking, should be
negative if seekMode is equal to 2
GDSException - if an error occurs while seeking
public void iscDetachDatabase(IscDbHandle db_handle)
throws GDSException
GDS
iscDetachDatabase in interface GDSdb_handle - The handle to be detached
GDSException - if an error occurs while detaching from the database
public void iscDropDatabase(IscDbHandle db_handle)
throws GDSException
GDSIscDbHandle is attached.
iscDropDatabase in interface GDSdb_handle - Handle to the database to be dropped
GDSException - if an error occurs while dropping the database
public byte[] iscExpandDpb(byte[] dpb,
int dpb_length,
int param,
Object[] params)
throws GDSException
GDSException
public void iscStartTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
TransactionParameterBuffer tpb)
throws GDSException
GDS
iscStartTransaction in interface GDStr_handle - Handle to the transaction that is to be starteddb_handle - Handle to the database in which the transaction is to be
startedtpb - Transaction Parameter Block in the form of a byte array,
contains parameter data for the transaction attributes
GDSException - if an error occurs while starting the transactionGDS.createIscTrHandle()
public void iscReconnectTransaction(IscTrHandle tr_handle,
IscDbHandle db_handle,
long transactionId)
throws GDSException
GDS
iscReconnectTransaction in interface GDStr_handle - transaction handle that will be reconnected.db_handle - database handle in which "in limbo" transaction will be
reconnected.transactionId - ID of the transaction to reconnect.
GDSException - if something went wrong.
public void iscCommitTransaction(IscTrHandle tr_handle)
throws GDSException
GDS
iscCommitTransaction in interface GDStr_handle - Handle to the transaction to be committed.
GDSException - if an error occurs while committing the transactionGDS.iscRollbackTransaction(IscTrHandle)
public void iscCommitRetaining(IscTrHandle tr_handle)
throws GDSException
iscCommitRetaining in interface GDSGDSException
public void iscPrepareTransaction(IscTrHandle tr_handle)
throws GDSException
iscPrepareTransaction in interface GDSGDSException
public void iscPrepareTransaction2(IscTrHandle tr_handle,
byte[] bytes)
throws GDSException
iscPrepareTransaction2 in interface GDSGDSException
public void iscRollbackTransaction(IscTrHandle tr_handle)
throws GDSException
GDS
iscRollbackTransaction in interface GDStr_handle - Handle to the transaction that is to be rolled back
GDSException - if an error occurs while rolling backGDS.iscCommitTransaction(IscTrHandle)
public void iscRollbackRetaining(IscTrHandle tr_handle)
throws GDSException
iscRollbackRetaining in interface GDSGDSException
public byte[] iscTransactionInformation(IscTrHandle tr_handle,
byte[] requestBuffer,
int bufferLen)
throws GDSException
iscTransactionInformation in interface GDSGDSException
public void iscDsqlAllocateStatement(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
throws GDSException
GDSIscDbHandle is attached.
iscDsqlAllocateStatement in interface GDSdb_handle - Handle to the database where the statement is to be allocatedstmt_handle - Handle to attach to the newly allocated statement
GDSException - if an error occurs while allocating the statement
public void isc_dsql_alloc_statement2(IscDbHandle db_handle,
IscStmtHandle stmt_handle)
throws GDSException
GDSException
public XSQLDA iscDsqlDescribe(IscStmtHandle stmt_handle,
int da_version)
throws GDSException
GDS
iscDsqlDescribe in interface GDSstmt_handle - Handle to the statement about which data is to be retrievedda_version - Version of the XSQLDA to be retrieved
GDSException - if an error occurs while retrieving statement data
public XSQLDA iscDsqlDescribeBind(IscStmtHandle stmt_handle,
int da_version)
throws GDSException
GDS
iscDsqlDescribeBind in interface GDSstmt_handle - Handle to the bind statement about which bind data is to be
retrievedda_version - Version of the XSQLDA to be retrieved
GDSException - if an error occurs while retrieving statement data
public void iscDsqlExecute(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda)
throws GDSException
GDS
iscDsqlExecute in interface GDStr_handle - Handle to the transaction in which the statement is to be
executedstmt_handle - Handle to the statement to be executedda_version - Version of XSQLDA to be usedxsqlda - Input data for executing the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecute2(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
int da_version,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDS
iscDsqlExecute2 in interface GDStr_handle - Handle to the transaction in which the statement is to be
executedstmt_handle - Handle to the statement to be executedda_version - Version of XSQLDA to be usedin_xsqlda - Data to be sent to the database for the statementout_xsqlda - Holder for data to be received from executing the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA xsqlda)
throws GDSException
GDS
iscDsqlExecuteImmediate in interface GDSdb_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - SQL command to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsxsqlda - Data to be sent to the database for the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA xsqlda)
throws GDSException
iscDsqlExecuteImmediate in interface GDSGDSException
public void iscDsqlExecuteImmediate(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA xsqlda)
throws GDSException
GDS
iscDsqlExecuteImmediate in interface GDSdb_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - byte array holding the SQL to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsxsqlda - Data to be sent to the database for the statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDS
iscDsqlExecImmed2 in interface GDSdb_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - byte array holding the SQL to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsin_xsqlda - Data to be sent to the database for the statementout_xsqlda - Placeholder for data retrieved from executing the SQL
statement
GDSException - if an error occurs while executing the statement
public void iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
String statement,
String encoding,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
iscDsqlExecImmed2 in interface GDSGDSException
public void iscDsqlExecImmed2(IscDbHandle db_handle,
IscTrHandle tr_handle,
byte[] statement,
int dialect,
XSQLDA in_xsqlda,
XSQLDA out_xsqlda)
throws GDSException
GDS
iscDsqlExecImmed2 in interface GDSdb_handle - Handle to the database where the statement is to be executedtr_handle - Handle to the transaction in which the statement is to be
executedstatement - byte array holding the SQL to be executeddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstantsin_xsqlda - Data to be sent to the database for the statementout_xsqlda - Holder for data retrieved from the database
GDSException - if an error occurs while executing the statement
public void iscDsqlFetch(IscStmtHandle stmt_handle,
int da_version,
XSQLDA xsqlda,
int fetchSize)
throws GDSException
GDSfetchSize records will be fetched.
iscDsqlFetch in interface GDSstmt_handle - Handle to the statement for which records are to be fetchedda_version - Version of XSQLDA to be usedxsqlda - Holder for records that are fetchedfetchSize - The maximum number of records to be fetched
GDSException - if an error occurs while fetching the recordspublic static void calculateIOLength(XSQLDA xsqlda)
public void iscDsqlFreeStatement(IscStmtHandle stmt_handle,
int option)
throws GDSException
GDSoption. option should be one of
ISCConstants.DSQL_drop or ISCConstants.DSQL_close.
iscDsqlFreeStatement in interface GDSstmt_handle - Handle to the statement to be freedoption - Option to be used when freeing the statement. If the value is
ISCConstants.DSQL_drop, the statement will be
deallocated, if the value is ISCConstants.DSQL_close,
the statement will only be closed
GDSException
public XSQLDA iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
int dialect)
throws GDSException
GDS
iscDsqlPrepare in interface GDStr_handle - Handle to the transaction in which the SQL statement is to be
preparedstmt_handle - Handle to the statement for which the SQL is to be preparedstatement - The SQL statement to be prepareddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstants
GDSException - if an error occurs while preparing the SQL
public XSQLDA iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
String statement,
String encoding,
int dialect)
throws GDSException
iscDsqlPrepare in interface GDSGDSException
public XSQLDA iscDsqlPrepare(IscTrHandle tr_handle,
IscStmtHandle stmt_handle,
byte[] statement,
int dialect)
throws GDSException
GDS
iscDsqlPrepare in interface GDStr_handle - Handle to the transaction in which the SQL statement is to be
preparedstmt_handle - Handle to the statement for which the SQL is to be preparedstatement - byte-array with containing the SQL to be prepareddialect - Interbase dialect for the SQL, should be one of the
SQL_DIALECT_* constants from
ISCConstants
GDSException - if an error occurs while preparing the SQL
public void iscDsqlSetCursorName(IscStmtHandle stmt_handle,
String cursor_name,
int type)
throws GDSException
GDS
iscDsqlSetCursorName in interface GDSstmt_handle - Handle to the statement for which the cursor name is to be setcursor_name - Name to set for the cursortype - Reserved for future use
GDSException - if an error occurs while setting the cursor name
public byte[] iscDsqlSqlInfo(IscStmtHandle stmt_handle,
byte[] items,
int buffer_length)
throws GDSException
GDSisc_info_sql_* constants defined in
ISCConstants. An array with corresponding values for the
requested parameters is returned.
iscDsqlSqlInfo in interface GDSstmt_handle - Handle to the statement about which data is to be retrieveditems - Array of parameters whose values are to be retrievedbuffer_length - The length of the byte-array to be returned
GDSException - if an error occurs while retrieving the statement info
public void getSqlCounts(IscStmtHandle stmt_handle)
throws GDSException
GDS
getSqlCounts in interface GDSstmt_handle - Handle to the statement for which count data is to be
retrieved
GDSException - if an error occurs while retrieving the count data
public int iscVaxInteger(byte[] buffer,
int pos,
int length)
GDS
iscVaxInteger in interface GDSbuffer - The byte array from which the integer is to be retrievedpos - The offset starting position from which to start retrieving
byte valueslength - The number of bytes to use in retrieving the integer value.
public int iscInteger(byte[] buffer,
int pos,
int length)
public void iscCreateBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
throws GDSException
GDS
iscCreateBlob2 in interface GDSdb_handle - Handle to the database in which the blob will be createdtr_handle - Handle to the transaction in which the blob will be createdblob_handle - Handle to be attached to the newly created blobblobParameterBuffer - contains parameters for creation of the new blob, can be null
GDSException - if an error occurs while creating the blob
public void iscOpenBlob2(IscDbHandle db_handle,
IscTrHandle tr_handle,
IscBlobHandle blob_handle,
BlobParameterBuffer blobParameterBuffer)
throws GDSException
GDS
iscOpenBlob2 in interface GDSdb_handle - Handle to the database in which the blob will be openedtr_handle - Handle to the transaction in which the blob will be openedblob_handle - Handle to the blob to be openedblobParameterBuffer - Contains parameters for the blob
GDSException - if an error occurs while opening the blob
public byte[] iscGetSegment(IscBlobHandle blob_handle,
int requested)
throws GDSException
GDS
iscGetSegment in interface GDSblob_handle - Handle to the blob from which a segment is to be fetchedrequested - The maximum number of bytes to attempt to fetch
maxread
GDSException - if an error occurs while fetching the blob segment
public void iscPutSegment(IscBlobHandle blob_handle,
byte[] buffer)
throws GDSException
GDS
iscPutSegment in interface GDSblob_handle - Handle to the blob to which data is to be writtenbuffer - Data to be written to the blob
GDSException - if an error occurs while writing to the blob
public void iscCloseBlob(IscBlobHandle blob_handle)
throws GDSException
GDS
iscCloseBlob in interface GDSblob_handle - Handle to the blob to be closed
GDSException - if an error occurs while closing the blobpublic IscDbHandle createIscDbHandle()
GDSIscDbHandle instance specific to
the implementation of this interface.
createIscDbHandle in interface GDSIscDbHandlepublic IscTrHandle createIscTrHandle()
GDSIscTrHandle instance that
is linked to the current GDS implementation.
createIscTrHandle in interface GDSIscTrHandle instancepublic IscStmtHandle createIscStmtHandle()
GDSIscStmtHandle instance
specific to the implementation of this interface.
createIscStmtHandle in interface GDSIscStmtHandle instancepublic IscBlobHandle createIscBlobHandle()
GDSIscBlobHandle instance
specific to the implementation of this interface.
createIscBlobHandle in interface GDSIscBlobHandle instance
public void connect(isc_db_handle_impl db,
String host,
Integer port,
String filename,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
GDSException
protected void connect(isc_db_handle_impl db,
AbstractJavaGDSImpl.DbAttachInfo dbai,
DatabaseParameterBuffer databaseParameterBuffer)
throws GDSException
GDSException
public abstract Socket getSocket(String server,
int port)
throws IOException,
UnknownHostException
server - The server string.port - The port to connect to.
IOException
UnknownHostException
protected void openSocket(isc_db_handle_impl db,
AbstractJavaGDSImpl.DbAttachInfo dbai,
boolean debug,
int socketBufferSize)
throws IOException,
SocketException,
GDSException
IOException
SocketException
GDSException
public void disconnect(isc_db_handle_impl db)
throws IOException
IOException
public void receiveResponse(isc_db_handle_impl db,
int op)
throws GDSException
GDSException
protected int nextOperation(isc_db_handle_impl db)
throws IOException
IOException
public static void calculateBLR(XSQLDA xsqlda)
throws GDSException
GDSExceptionpublic DatabaseParameterBuffer createDatabaseParameterBuffer()
GDSDatabaseParameterBuffer instance for setting
database parameters in the current GDS implementation.
createDatabaseParameterBuffer in interface GDSDatabaseParameterBufferpublic TransactionParameterBuffer newTransactionParameterBuffer()
GDSTransactionParameterBuffer instance for setting
transaction parameters in the current GDS implementation.
newTransactionParameterBuffer in interface GDSTransactionParameterBuffer.public BlobParameterBuffer createBlobParameterBuffer()
GDSBlobParameterBuffer instance for setting blob
parameters in the current GDS implementation.
createBlobParameterBuffer in interface GDSBlobParameterBufferpublic ServiceParameterBuffer createServiceParameterBuffer()
GDSServiceParameterBuffer instance for setting
service parameters in the current GDS implementation.
createServiceParameterBuffer in interface GDSServiceParameterBufferpublic ServiceRequestBuffer createServiceRequestBuffer(int taskIdentifier)
GDSServiceRequestBuffer instance for setting
service request parameters in the current GDS implementation. The
returned ServiceRequestBuffer is linked to a specific
Services API task, and must be one of the isc_info_svc_*
or isc_action_svc constants from ISCConstants.
createServiceRequestBuffer in interface GDStaskIdentifier - The specific Services API task for which the
ServiceRequestBuffer is created
ServiceRequestBuffer
public void iscServiceAttach(String service,
IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer)
throws GDSException
GDS
iscServiceAttach in interface GDSservice - The name/path to the service managerserviceHandle - Handle to be linked to the attached service managerserviceParameterBuffer - Contains parameters for attaching to the service manager
GDSException - if an error occurs while attaching
public void receiveResponse(isc_svc_handle_impl svc,
int op)
throws GDSException
GDSException
protected int nextOperation(isc_svc_handle_impl svc)
throws IOException
IOException
public void iscServiceDetach(IscSvcHandle serviceHandle)
throws GDSException
GDS
iscServiceDetach in interface GDSserviceHandle - Handle to the service manager that is to be detached
GDSException - if an error occurs while detaching
public void iscServiceStart(IscSvcHandle serviceHandle,
ServiceRequestBuffer serviceRequestBuffer)
throws GDSException
GDS
iscServiceStart in interface GDSserviceHandle - Handle to the service manager where the operation is to be
startedserviceRequestBuffer - parameters about the service to be started
GDSException
public void iscServiceQuery(IscSvcHandle serviceHandle,
ServiceParameterBuffer serviceParameterBuffer,
ServiceRequestBuffer serviceRequestBuffer,
byte[] resultBuffer)
throws GDSException
GDS
iscServiceQuery in interface GDSserviceHandle - Handle to the service manager to be queriedserviceParameterBuffer - parameters about the serviceserviceRequestBuffer - parameters requested in the queryresultBuffer - buffer to hold the query results
GDSException - if an error occurs while queryingpublic IscSvcHandle createIscSvcHandle()
GDSIscSvcHandle instance
that is linked to the current GDS implemenation.
createIscSvcHandle in interface GDSIscSvcHandle instance
public int iscQueueEvents(IscDbHandle dbHandle,
EventHandle eventHandle,
EventHandler eventHandler)
throws GDSException
GDS
iscQueueEvents in interface GDSdbHandle - Handle to the database where events are to be listened foreventHandle - Handle for event managementeventHandler - Callback to be called when an event occurs
GDSException - If a database communication error occurs
public void iscEventBlock(EventHandle eventHandle)
throws GDSException
GDSEventHandle.
iscEventBlock in interface GDSeventHandle - The event handle to be initialized
GDSException - If a database communication error occurs
public void iscEventCounts(EventHandle eventHandle)
throws GDSException
GDS
iscEventCounts in interface GDSeventHandle - The handle containing event data
GDSException - If a database communication error occurs
public void iscCancelEvents(IscDbHandle dbHandle,
EventHandle eventHandle)
throws GDSException
GDSEventHandle.
iscCancelEvents in interface GDSdbHandle - Handle to the database where events are being
listened foreventHandle - Datastructure for handling event data
GDSException - If a database communication error occurspublic EventHandle createEventHandle(String eventName)
GDSEventHandle specific to a given
GDS implementation.
createEventHandle in interface GDSEventHandle
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||