com.ibm.dse.services.jdbc
Interface StoreService

All Known Implementing Classes:
Store

public interface StoreService
extends DatabaseConnect

The StoreService interface provides the public methods that are used for store services. Each class that includes the JournalService interface must implement all of these methods.


Method Summary
 int addRecord(Context aContext, HashtableFormat aHashtableFormat)
          Adds a record into the store database table using the data available in the context aContext.
 int addRecord(Context aContext, java.lang.String aFormatName)
          Adds a record into the store table.
 int addRecord(Hashtable aDataHashtable)
          Adds a record into the store table with the data in aDataHashtable.
 void close()
          Closes the store service, which means that no more database operations can be performed using it.
 void commit()
          Commits all changes to the database.
 int deleteAllRetrievedForForwarding()
          Deletes all of the records in the store table that are marked as retrievedForForwarding.
 int deleteRecord(int aRecordId)
          Deletes the record in the store table that is identified by aRecordId.
 int deleteRecords(java.lang.String aSearchCondition)
          Deletes the records in the store table that match the search criteria.
 boolean getAutoCommit()
          Returns the autoCommit attribute value.
 Hashtable getColumnsTable()
          Returns the columnsTable attribute value.
 java.lang.String getFullTableName()
          Gets the full table name (schemaName + tableName).
 int getLastRecordNumber()
          Returns the last record number that has been retrieved from the database.
 java.lang.String getSchemaName()
          Returns the schema attribute value.
 java.lang.String getTableName()
          Returns the store table name.
 boolean isActive()
          Answer true if the store is ready to run any database operation.
 void loadDriver()
          Loads the default database JDBC Driver set by the user in the StoreConstants class.
 void loadDriver(java.lang.String aDriverName)
          Loads the database JDBC Driver provided as an argument.
 void open()
          Sets the store instance so it is ready to receive any database operation request.
 Hashtable retrieveFirstRecord()
          Return the first record of the store table.
 int retrieveFirstRecord(Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the first record in the store table and returns its recordId.
 int retrieveFirstRecord(Context aContext, java.lang.String aForamtName)
          Retrieves the first record in the store table and returns its recordId.
 Hashtable retrieveFirstRecordForForwarding()
          Returns the first record in the store table and identifies it as being retrieved by the forwarder application.
 void retrieveFirstRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat)
          Returns the first record in the database and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat.
 void retrieveFirstRecordForForwarding(Context aContext, java.lang.String aFoematName)
          Returns the first record in the database and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName.
 int retrieveLastRecordNumber()
          Returns the last record number in the store table.
 Hashtable retrieveNextRecord()
          Returns the next record from the current store table cursor.
 int retrieveNextRecord(Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the next record from the current cursor in the store table and returns its recordId.
 int retrieveNextRecord(Context aContext, java.lang.String aFormatName)
          Retrieves the next record from the current cursor in the store table and returns its recordId.
 Hashtable retrieveNextRecordForForwarding()
          Returns the next record from the current store table cursor and identifies it as being retrieved by the forwarder application.
 void retrieveNextRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat)
          Returns the next record from the current cursor in the store table and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat.It also identifies the record as being retrieved for forwarding.
 void retrieveNextRecordForForwarding(Context aContext, java.lang.String aFormatName)
          Returns the next record from the current cursor in the store table and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName.
 Hashtable retrieveRecord(int aRecordId)
          Retrieves a record of the store table with an specific recordId.
 void retrieveRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat)
          Retrieves a record of the store table with an specific recordId.
 void retrieveRecord(int aRecordId, Context aContext, java.lang.String aFormatName)
          Retrieves a record of the store table with an specific recordId.
 Hashtable retrieveRecord(java.lang.String aSearchCondition)
          Retrieves the first record from the store table that matches the selection criteria.
 int retrieveRecord(java.lang.String aSelectionCriteria, Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the first record of the store table that matches the selection criteria and returns its recordId.
 int retrieveRecord(java.lang.String aSelectionCriteria, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector)
          Retrieves the columns in aColumnsVector of the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat.
 int retrieveRecord(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName)
          Retrieves the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName.
 int retrieveRecord(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName, Vector aColumnsVector)
          Retrieves the columns in aColumnsVector of the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName.
 Hashtable retrieveRecord(java.lang.String aSearchCondition, Vector aColumnsVector)
          Retrieves the columns in aColumnsVector of the first record from the store table that matches the selection criteria.
 Hashtable retrieveRecordForForwarding(int aRecordId)
          Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding.
 void retrieveRecordForForwarding(int aRecordId, Context aContext, HashtableFormat aHashtableFormat)
          Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding.
 void retrieveRecordForForwarding(int aRecordId, Context aContext, java.lang.String aFormatName)
          Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding.
 Hashtable retrieveRecordForForwarding(java.lang.String aSelectionCriteria)
          Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding.
 int retrieveRecordForForwarding(java.lang.String aSelectionCriteria, Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding.
 int retrieveRecordForForwarding(java.lang.String aSelectionCriteria, Context aContext, java.lang.String aFormatName)
          Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding.
 Vector retrieveRecordsForForwarding(java.lang.String aSearchCondition)
          Retrieves all of the records from the store table that match the search condition.
 void retrieveRecordsForForwarding(java.lang.String aSearchCondition, Context aContext, HashtableIndexedCollectionFormat anOutputFormat)
          Retrieves all the records of the store table that match aSearchCondition.
 void retrieveRecordsForForwarding(java.lang.String aSearchCondition, Context aContext, java.lang.String anOutputFormatName)
          Retrieves all the records of the store table that match aSearchCondition.
 void rollback()
          Rolls back all database changes.
 void setAutoCommit(boolean aBoolean)
          Sets the autoCommit attribute value to aBoolean.
 void setSchemaName(java.lang.String s)
          Sets the schema attribute to the string provided as an argument.
 void setTableName(java.lang.String aTableName)
          Sets the name of the store table.
 int updateRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat)
          Updates the record of the store table, which is identified by aRecordId, with the data obtained by the formatting the context aContext data with the formatter aHashtableFormat.
 int updateRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector)
          Updates the columns in aColumnsVector for the store table record that has an identifier that equals aRecordId with the data obtained by formatting the context aContext, with the formatter aHashtableFormat.
 int updateRecord(int aRecordId, Context aContext, java.lang.String aFormatName)
          Updates the record from the store table, which is identified by aRecordId, with the data obtained by formatting the context aContext data with the formatter identified by aFormatName.
 int updateRecord(int aRecordId, Context aContext, java.lang.String aFormatName, Vector aColumnsVector)
          Updates the columns in aColumnsVector for the store table record that has an identifier that equals aRecordId, with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
 int updateRecord(int aRecordId, Hashtable aDataHashtable)
          Updates the record from the store table, which is identified by aRecordId, with the data contained in aDataHashtable hash table.
 int updateRecord(int aRecordId, Hashtable aDataHashtable, Vector aColumnsVector)
          Updates the columns in aColumnVector for the store table record that has an identifier that equals aRecordId, with the data in aDataHashtable.
 
Methods inherited from interface com.ibm.dse.services.jdbc.DatabaseConnect
connect, connect, connect, connect, connect, connect, disconnect, getDatabaseURL, getDataSourceName, getPoolName, getSharedConnection, isConnected, isWaitRetry, setDatabaseURL, setDataSourceName, setPoolName, setSharedConnection, setWaitRetry
 

Method Detail

addRecord

public int addRecord(Context aContext,
                     HashtableFormat aHashtableFormat)
              throws DSEInvalidArgumentException,
                     DSEInvalidRequestException,
                     DSEInternalErrorException,
                     DSESQLException,
                     DSEInvalidClassException
Adds a record into the store database table using the data available in the context aContext.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Returns:
int - the row number where the record is inserted
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSEInvalidClassException - if there is an error in the formatting process

addRecord

public int addRecord(Context aContext,
                     java.lang.String aFormatName)
              throws DSEInvalidArgumentException,
                     DSEInvalidRequestException,
                     DSEInternalErrorException,
                     DSESQLException,
                     DSEInvalidClassException,
                     java.io.IOException
Adds a record into the store table. The process should use the store format with name aFormatName and the data in aContext to build the store record and insert it into the store database table.
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Returns:
int - the row number where the record is inserted
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSEInvalidClassException - if there is an error in the formatting process
java.io.IOException - if there is an error instanciating the formatter from its external definition

addRecord

public int addRecord(Hashtable aDataHashtable)
              throws DSEInvalidRequestException,
                     DSEInvalidArgumentException,
                     DSEInternalErrorException,
                     DSESQLException
Adds a record into the store table with the data in aDataHashtable.
Parameters:
aDataHashtable - Hashtable
Returns:
int - the row number where the record is inserted
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

close

public void close()
Closes the store service, which means that no more database operations can be performed using it.

commit

public void commit()
            throws DSESQLException
Commits all changes to the database.
Throws:
DSESQLException - if commit fails

deleteAllRetrievedForForwarding

public int deleteAllRetrievedForForwarding()
                                    throws DSEInvalidArgumentException,
                                           DSEInternalErrorException,
                                           DSESQLException
Deletes all of the records in the store table that are marked as retrievedForForwarding.
Returns:
int - the row count (number of deleted records)
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSESQLException - if an SQLException is caught

deleteRecord

public int deleteRecord(int aRecordId)
                 throws DSEInvalidArgumentException,
                        DSEInternalErrorException,
                        DSESQLException
Deletes the record in the store table that is identified by aRecordId.
Parameters:
aRecordId - int
Returns:
int - the row count (number of deleted records)
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSESQLException - if an SQLException is caught

deleteRecords

public int deleteRecords(java.lang.String aSearchCondition)
                  throws DSEInvalidArgumentException,
                         DSEInternalErrorException,
                         DSESQLException
Deletes the records in the store table that match the search criteria.
Parameters:
aSearchCondition - java.lang.String, the search criteria in SQL format
Returns:
int - the row count (number of deleted records)
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSESQLException - if an SQLException is caught

getAutoCommit

public boolean getAutoCommit()
Returns the autoCommit attribute value.
Returns:
boolean

getColumnsTable

public Hashtable getColumnsTable()
Returns the columnsTable attribute value.
Returns:
com.ibm.dse.base.Hashtable

getFullTableName

public java.lang.String getFullTableName()
Gets the full table name (schemaName + tableName).

getLastRecordNumber

public int getLastRecordNumber()
Returns the last record number that has been retrieved from the database.
Parameters:
aRecordNumber - int

getSchemaName

public java.lang.String getSchemaName()
Returns the schema attribute value.
Returns:
java.lang.String

getTableName

public java.lang.String getTableName()
Returns the store table name.
Returns:
java.lang.String the name

isActive

public boolean isActive()
Answer true if the store is ready to run any database operation.
Returns:
boolean

loadDriver

public void loadDriver()
                throws DSEInternalErrorException
Loads the default database JDBC Driver set by the user in the StoreConstants class.
Throws:
DSEInternalErrorException - if an internal program error occurs

loadDriver

public void loadDriver(java.lang.String aDriverName)
                throws DSEInternalErrorException
Loads the database JDBC Driver provided as an argument.
Parameters:
aDriverName - java.lang.String, the driver name (full path)
Throws:
DSEInternalErrorException - if an internal program error occurs

open

public void open()
          throws DSEInternalErrorException,
                 DSEInvalidRequestException
Sets the store instance so it is ready to receive any database operation request.
Throws:
DSEInternalErrorException - if an internal program error occurs

retrieveFirstRecord

public Hashtable retrieveFirstRecord()
                              throws DSEInternalErrorException,
                                     DSEInvalidArgumentException,
                                     DSESQLException
Return the first record of the store table.
Returns:
com.ibm.dse.base.Hashtable - the hash table with the retrieved record values
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveFirstRecord

public int retrieveFirstRecord(Context aContext,
                               HashtableFormat aHashtableFormat)
                        throws DSEInvalidRequestException,
                               DSEInternalErrorException,
                               DSEInvalidArgumentException,
                               DSESQLException
Retrieves the first record in the store table and returns its recordId. The method calls the unformat method of the formatter aHashtableFormat, passing the context aContext as argument. The context aContext is automatically updated with the retrieved record columns values.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Returns:
int - the recordId of the first record
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveFirstRecord

public int retrieveFirstRecord(Context aContext,
                               java.lang.String aForamtName)
                        throws DSEInvalidRequestException,
                               DSEInternalErrorException,
                               DSEInvalidArgumentException,
                               DSESQLException,
                               java.io.IOException
Retrieves the first record in the store table and returns its recordId. The method calls the unformat method of the formatter defined by aFormatName, passing the context aContext as argument. The context aContext is automatically updated with the retrieved record columns values.
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Returns:
int - the recordId of the first record
Throws:
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSESQLException - if an SQL Exception is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveFirstRecordForForwarding

public Hashtable retrieveFirstRecordForForwarding()
                                           throws DSEInternalErrorException,
                                                  DSEInvalidArgumentException,
                                                  DSESQLException
Returns the first record in the store table and identifies it as being retrieved by the forwarder application.
Returns:
Hashtable - the hash table with the retrieved record values
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveFirstRecordForForwarding

public void retrieveFirstRecordForForwarding(Context aContext,
                                             HashtableFormat aHashtableFormat)
                                      throws DSEInternalErrorException,
                                             DSEInvalidRequestException,
                                             DSEInvalidArgumentException,
                                             DSESQLException
Returns the first record in the database and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat. It identifies the record in the database as being retrieved for forwarding.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveFirstRecordForForwarding

public void retrieveFirstRecordForForwarding(Context aContext,
                                             java.lang.String aFoematName)
                                      throws DSEInvalidRequestException,
                                             DSEInvalidArgumentException,
                                             DSEInternalErrorException,
                                             DSESQLException,
                                             java.io.IOException
Returns the first record in the database and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. It identifies the record in the database as being retrieved for forwarding.
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Throws:
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSESQLException - if an SQL Exception is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveLastRecordNumber

public int retrieveLastRecordNumber()
                             throws DSESQLException,
                                    DSEInternalErrorException
Returns the last record number in the store table.
Returns:
int the Hashtable containing the record values
Throws:
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

retrieveNextRecord

public Hashtable retrieveNextRecord()
                             throws DSEInternalErrorException,
                                    DSEInvalidArgumentException,
                                    DSEInvalidRequestException,
                                    DSESQLException
Returns the next record from the current store table cursor.
Returns:
Hashtable - the hash table with the retrieved record values
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInvalidRequestException - if the request is not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveNextRecord

public int retrieveNextRecord(Context aContext,
                              HashtableFormat aHashtableFormat)
                       throws DSEInvalidRequestException,
                              DSEInternalErrorException,
                              DSEInvalidArgumentException,
                              DSESQLException
Retrieves the next record from the current cursor in the store table and returns its recordId. The method calls the unformat method of the aHashtableFormat formatter and passes the context aContext as argument. The context aContext is automatically updated with the retrieved record columns values.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Returns:
int - the recordId of the retrieved record
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveNextRecord

public int retrieveNextRecord(Context aContext,
                              java.lang.String aFormatName)
                       throws DSEInvalidRequestException,
                              DSEInvalidArgumentException,
                              DSEInternalErrorException,
                              DSESQLException,
                              java.io.IOException
Retrieves the next record from the current cursor in the store table and returns its recordId. The method calls the unformat method of the formatter defined by aFormatName, passing the context aContext as argument. The context aContext is automatically updated with the retrieved record columns values.
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Returns:
int - the recordId of the retrieved record
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - if an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveNextRecordForForwarding

public Hashtable retrieveNextRecordForForwarding()
                                          throws DSEInternalErrorException,
                                                 DSEInvalidArgumentException,
                                                 DSEInvalidRequestException,
                                                 DSESQLException
Returns the next record from the current store table cursor and identifies it as being retrieved by the forwarder application.
Returns:
Hashtable - the hash table with the retrieved record values
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - is an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - is an SQLException is caught

retrieveNextRecordForForwarding

public void retrieveNextRecordForForwarding(Context aContext,
                                            HashtableFormat aHashtableFormat)
                                     throws DSEInvalidRequestException,
                                            DSEInternalErrorException,
                                            DSEInvalidArgumentException,
                                            DSESQLException
Returns the next record from the current cursor in the store table and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat.It also identifies the record as being retrieved for forwarding.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveNextRecordForForwarding

public void retrieveNextRecordForForwarding(Context aContext,
                                            java.lang.String aFormatName)
                                     throws DSEInvalidRequestException,
                                            DSEInternalErrorException,
                                            DSEInvalidArgumentException,
                                            DSESQLException,
                                            java.io.IOException
Returns the next record from the current cursor in the store table and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. It also identifies the record as being retrieved for forwarding.
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - is an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - is an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecord

public Hashtable retrieveRecord(int aRecordId)
                         throws DSEInternalErrorException,
                                DSEInvalidArgumentException,
                                DSESQLException
Retrieves a record of the store table with an specific recordId.
Parameters:
aRecordId - int, the record Identifier
Returns:
Hashtable - the Hashtable containing the record columns values
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecord

public void retrieveRecord(int aRecordId,
                           Context aContext,
                           HashtableFormat aHashtableFormat)
                    throws DSEInvalidRequestException,
                           DSEInternalErrorException,
                           DSEInvalidArgumentException,
                           DSESQLException
Retrieves a record of the store table with an specific recordId. The retrieved record is unformated into aContext using aHashtableFormat
Parameters:
aContext - com.ibm.dse.base.Context
aSelectionCriteria - java.lang.String
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecord

public void retrieveRecord(int aRecordId,
                           Context aContext,
                           java.lang.String aFormatName)
                    throws DSEInternalErrorException,
                           DSEInvalidArgumentException,
                           DSEInvalidRequestException,
                           DSESQLException,
                           java.io.IOException
Retrieves a record of the store table with an specific recordId. The retrieved record is unformated into aContext using a formatter named aFormatName
Parameters:
aRecordId - int
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - if an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecord

public Hashtable retrieveRecord(java.lang.String aSearchCondition)
                         throws DSEInternalErrorException,
                                DSEInvalidArgumentException,
                                DSESQLException
Retrieves the first record from the store table that matches the selection criteria.
Parameters:
aSearchCondition - java.lang.String the search condition
Returns:
Hashtable - the hash table with the retrieved record values
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

retrieveRecord

public int retrieveRecord(java.lang.String aSelectionCriteria,
                          Context aContext,
                          HashtableFormat aHashtableFormat)
                   throws DSEInvalidRequestException,
                          DSEInternalErrorException,
                          DSEInvalidArgumentException,
                          DSESQLException
Retrieves the first record of the store table that matches the selection criteria and returns its recordId. The retrieved record is unformated into aContext using aHashtableFormat
Parameters:
aSelectionCriteria - java.lang.String
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Returns:
int the recordId
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecord

public int retrieveRecord(java.lang.String aSelectionCriteria,
                          Context aContext,
                          HashtableFormat aHashtableFormat,
                          Vector aColumnsVector)
                   throws DSEInvalidRequestException,
                          DSEInternalErrorException,
                          DSEInvalidArgumentException,
                          DSESQLException
Retrieves the columns in aColumnsVector of the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat. The method returns the recordId of the retrieved record.
Parameters:
aSelectionCriteria - java.lang.String
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
aColumnsVector - com.ibm.dse.base.Vector, the vector that contains the columns to be retrieved
Returns:
int - the recordId of the retrieved record.
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecord

public int retrieveRecord(java.lang.String aSearchCondition,
                          Context aContext,
                          java.lang.String aFormatName)
                   throws DSEInvalidRequestException,
                          DSEInternalErrorException,
                          DSEInvalidArgumentException,
                          DSESQLException,
                          java.io.IOException
Retrieves the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. The method returns the recordId of the retrieved record.
Parameters:
aSearchCondition - java.lang.String
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Returns:
int - the recordId of the retrieved record.
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - if an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecord

public int retrieveRecord(java.lang.String aSearchCondition,
                          Context aContext,
                          java.lang.String aFormatName,
                          Vector aColumnsVector)
                   throws DSEInvalidRequestException,
                          DSEInternalErrorException,
                          DSEInvalidArgumentException,
                          DSESQLException,
                          java.io.IOException
Retrieves the columns in aColumnsVector of the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. The method returns the recordId of the retrieved record.
Parameters:
aSearchCondition - java.lang.String
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
aColumnsVector - com.ibm.dse.base.Vector, the vector that contains the columns to be retrieved
Returns:
int - the recordId of the retrieved record
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - if an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecord

public Hashtable retrieveRecord(java.lang.String aSearchCondition,
                                Vector aColumnsVector)
                         throws DSEInternalErrorException,
                                DSEInvalidArgumentException,
                                DSESQLException
Retrieves the columns in aColumnsVector of the first record from the store table that matches the selection criteria.
Parameters:
aSearchCondition - java.lang.String the search condition
aColumnsVector - com.ibm.dse.base.Vector, the vector that contains the columns to be retrieved
Returns:
Hashtable - the hash table with the retrieved record values
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecordForForwarding

public Hashtable retrieveRecordForForwarding(int aRecordId)
                                      throws DSEInternalErrorException,
                                             DSEInvalidArgumentException,
                                             DSESQLException
Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding.
Parameters:
aRecordId - int, the record Identifier
Returns:
Hashtable - the Hashtable containing the record columns values
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecordForForwarding

public void retrieveRecordForForwarding(int aRecordId,
                                        Context aContext,
                                        HashtableFormat aHashtableFormat)
                                 throws DSEInvalidRequestException,
                                        DSEInternalErrorException,
                                        DSEInvalidArgumentException,
                                        DSESQLException
Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding. The retrieved record is unformated into aContext using aHashtableFormat
Parameters:
aContext - com.ibm.dse.base.Context
aSelectionCriteria - java.lang.String
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecordForForwarding

public void retrieveRecordForForwarding(int aRecordId,
                                        Context aContext,
                                        java.lang.String aFormatName)
                                 throws DSEInternalErrorException,
                                        DSEInvalidArgumentException,
                                        DSEInvalidRequestException,
                                        DSESQLException,
                                        java.io.IOException
Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding. The retrieved record is unformated into aContext using a formatter named aFormatName
Parameters:
aRecordId - int
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - if an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecordForForwarding

public Hashtable retrieveRecordForForwarding(java.lang.String aSelectionCriteria)
                                      throws DSEInternalErrorException,
                                             DSEInvalidArgumentException,
                                             DSESQLException
Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding.
Parameters:
aSelectionCriteria - java.lang.String, the selection criteria in SQL format
Returns:
Hashtable - the Hashtable containing the record columns values
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

retrieveRecordForForwarding

public int retrieveRecordForForwarding(java.lang.String aSelectionCriteria,
                                       Context aContext,
                                       HashtableFormat aHashtableFormat)
                                throws DSEInvalidRequestException,
                                       DSEInternalErrorException,
                                       DSEInvalidArgumentException,
                                       DSESQLException,
                                       java.io.IOException
Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding. The method returns the recordId of the record retrieved. The retrieved record is unformated into aContext using aHashtableFormat
Parameters:
aContext - com.ibm.dse.base.Context
aSelectionCriteria - java.lang.String
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Returns:
int the recordId
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - if an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecordForForwarding

public int retrieveRecordForForwarding(java.lang.String aSelectionCriteria,
                                       Context aContext,
                                       java.lang.String aFormatName)
                                throws DSEInternalErrorException,
                                       DSEInvalidArgumentException,
                                       DSEInvalidRequestException,
                                       DSESQLException,
                                       java.io.IOException
Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding. The method returns the recordId of the record retrieved. The retrieved record is unformated into aContext using a formatter named aFormatName
Parameters:
aSelectionCriteria - java.lang.String
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Returns:
int the recordId
Throws:
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSESQLException - if an SQLException is caught
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecordsForForwarding

public Vector retrieveRecordsForForwarding(java.lang.String aSearchCondition)
                                    throws DSEInternalErrorException,
                                           DSEInvalidRequestException,
                                           DSEInvalidArgumentException,
                                           DSESQLException
Retrieves all of the records from the store table that match the search condition.
Parameters:
aSearchCondition - java.lang.String
Returns:
Vector - a vector with all retrieved records as hash tables
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

retrieveRecordsForForwarding

public void retrieveRecordsForForwarding(java.lang.String aSearchCondition,
                                         Context aContext,
                                         HashtableIndexedCollectionFormat anOutputFormat)
                                  throws DSEInternalErrorException,
                                         DSEInvalidRequestException,
                                         DSEInvalidArgumentException,
                                         DSESQLException,
                                         DSEObjectNotFoundException,
                                         java.io.IOException
Retrieves all the records of the store table that match aSearchCondition. The retrieved records are then unformatted into the context aContext using anOutputFormat.
Parameters:
aSearchCondition - java.lang.String, the search condition in SQL format
aContext - com.ibm.dse.base.Context the context to where the retrieved records will be unformatted
anOutputFormat - com.ibm.dse.base.HashtableIndexedCollectionFormat, the formatter to unformat the retrieved records
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSESObjectNotFoundException - if an object is not found
java.io.IOException - if there is an error instanciating the formatter from its external definition

retrieveRecordsForForwarding

public void retrieveRecordsForForwarding(java.lang.String aSearchCondition,
                                         Context aContext,
                                         java.lang.String anOutputFormatName)
                                  throws DSEInternalErrorException,
                                         DSEInvalidRequestException,
                                         DSEInvalidArgumentException,
                                         DSESQLException,
                                         DSEObjectNotFoundException,
                                         java.io.IOException
Retrieves all the records of the store table that match aSearchCondition. The retrieved records are then unformatted into the context aContext using the format named anOutputFormatName.
Parameters:
aSearchCondition - java.lang.String, the search condition in SQL format
aContext - com.ibm.dse.base.Context the context to where the retrieved records will be unformatted
anOutputFormatName - java.lang.String, the name of the formatter to unformat the retrieved records
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSESObjectNotFoundException - if an object is not found
java.io.IOException - if there is an error instanciating the formatter from its external definition

rollback

public void rollback()
              throws DSESQLException
Rolls back all database changes.
Throws:
DSESQLException - when rollback fails

setAutoCommit

public void setAutoCommit(boolean aBoolean)
Sets the autoCommit attribute value to aBoolean.
Parameters:
aBoolean - boolean

setSchemaName

public void setSchemaName(java.lang.String s)
Sets the schema attribute to the string provided as an argument.
Parameters:
s - java.lang.String

setTableName

public void setTableName(java.lang.String aTableName)
Sets the name of the store table.
Parameters:
aTableName - java.lang.String

updateRecord

public int updateRecord(int aRecordId,
                        Context aContext,
                        HashtableFormat aHashtableFormat)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException,
                        DSEInvalidClassException
Updates the record of the store table, which is identified by aRecordId, with the data obtained by the formatting the context aContext data with the formatter aHashtableFormat.
Parameters:
aRecordId - int
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSEInvalidClassException - if there is an error in the formatting process

updateRecord

public int updateRecord(int aRecordId,
                        Context aContext,
                        HashtableFormat aHashtableFormat,
                        Vector aColumnsVector)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSEInvalidClassException,
                        DSESQLException
Updates the columns in aColumnsVector for the store table record that has an identifier that equals aRecordId with the data obtained by formatting the context aContext, with the formatter aHashtableFormat.
Parameters:
aRecordId - int
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSEInvalidClassException - if there is an error in the formatting process

updateRecord

public int updateRecord(int aRecordId,
                        Context aContext,
                        java.lang.String aFormatName)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException,
                        DSEInvalidClassException,
                        java.io.IOException
Updates the record from the store table, which is identified by aRecordId, with the data obtained by formatting the context aContext data with the formatter identified by aFormatName.
Parameters:
aRecordId - int
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSEInvalidClassException - if there is an error in the formatting process
java.io.IOException - if there is an error instanciating the formatter from its external definition

updateRecord

public int updateRecord(int aRecordId,
                        Context aContext,
                        java.lang.String aFormatName,
                        Vector aColumnsVector)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException,
                        DSEInvalidClassException,
                        java.io.IOException
Updates the columns in aColumnsVector for the store table record that has an identifier that equals aRecordId, with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
Parameters:
aRecordId - int
aContext - com.ibm.dse.base.Context
aFormatName - String, the name of the formatter to be used
aColumnsVector - com.ibm.dse.base.Vector, the columns to be updated
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught
DSEInvalidClassException - if there is an error in the formatting process
java.io.IOException - if there is an error instanciating the formatter from its external definition

updateRecord

public int updateRecord(int aRecordId,
                        Hashtable aDataHashtable)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException
Updates the record from the store table, which is identified by aRecordId, with the data contained in aDataHashtable hash table. The data hashtable has the format: key=data_field_name, value=data_field_value.
Parameters:
aRecordId - int
aDataHashtable - com.ibm.dse.base.Hashtable
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught

updateRecord

public int updateRecord(int aRecordId,
                        Hashtable aDataHashtable,
                        Vector aColumnsVector)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException
Updates the columns in aColumnVector for the store table record that has an identifier that equals aRecordId, with the data in aDataHashtable.
Parameters:
aRecordId - int
aDataHashtable - com.ibm.dse.base.Hashtable, the hashtable that contains the new data
aColumnsVector - com.ibm.dse.base.Vector, the columns to be updated
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQLException is caught