IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

com.ibm.btt.services.jdbc
Class Store

java.lang.Object
  extended by com.ibm.btt.base.BTTProcessorNotifier
      extended by com.ibm.btt.base.Service
          extended by com.ibm.btt.services.jdbc.JDBCService
              extended by com.ibm.btt.services.jdbc.Store
All Implemented Interfaces:
ProcessorNotifier, DatabaseConnect, StoreService, Poolable, java.io.Externalizable, java.io.Serializable
Direct Known Subclasses:
JDBCStore

public abstract class Store
extends JDBCService
implements StoreService, Poolable

The Store class is a subclass of the service that defines the abstract methods that are needed by any store service implementation. Since it is a service, it has an externalizer that allows you to define any store object attributes in an external XML file (these attributes values are then used when the store object is instantiated). It inherits all service attributes such as the name attribute that allows you to request a specific store service instance in the application hierarchy of contexts. A store object is then usually instantiated by providing the name of the service to be created to the ServiceExternalizer class. The ServiceExternalizer creates an instance of the class that is identified by the name (in this case, a store) and sets its attributes to the values read from the services XML file.

See Also:
Serialized Form

Field Summary
static java.lang.String COMPID
          Keeps the component identification that will be used by the traces tool.
protected  java.lang.String state
          Keeps the status of the store service.
protected  java.lang.String tableName
          Keeps the name of the store table.
 
Fields inherited from class com.ibm.btt.services.jdbc.JDBCService
addPstmt, addString, autoCommit, connectionProperties, databaseConnection, databaseURL, dataSourceName, metaData, password, poolName, sharedConnection, STMT_POOL_SIZE_DEFAULT, stmtPool, stmtPoolSize, updateString, user, waitRetry
 
Fields inherited from class com.ibm.btt.base.Service
externalizer, name
 
Fields inherited from class com.ibm.btt.base.BTTProcessorNotifier
handlersList
 
Constructor Summary
Store()
           
 
Method Summary
abstract  int addRecord(Context aContext, HashtableFormat aHashtableFormat)
          Adds a record to the store table.
abstract  int addRecord(Context aContext, java.lang.String aFormatName)
          Adds a record to the store table.
abstract  int addRecord(Hashtable aDataHashtable)
          Inserts the data from aHashtable as a new row into the current store table.
 void close()
          Sets the state of the Store object to INACTIVE.
abstract  void commit()
          Commits all changes to the database.
abstract  int deleteAllRetrievedForForwarding()
          Deletes all records marked as retrievedForForwarding from the store table.
abstract  int deleteRecord(int aRecordId)
          Deletes the aRecordId record from the store table.
abstract  int deleteRecords(java.lang.String aSelectionCriteria)
          Deletes all the records within the store table that match the selection criteria.
 boolean getInUse()
          Returns the value of inUse attribute.
 java.lang.String getTableName()
          Returns the tableName attribute value.
 void initialize()
          Performs any required actions after service instanciation and before starting using it.
 boolean isActive()
          Returns true if the current state of the Store instance is ACTIVE.
abstract  void markRecordRetrievedForForwarding(int aRecordId)
          Marks the aRecordId record with the retrievedForForwarding mark.
 void open()
          Sets the state of the Store instance to ACTIVE.
 void reset()
          Resets the store.
abstract  Hashtable retrieveFirstRecord()
          Returns the first record in the database.
abstract  int retrieveFirstRecord(Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the first record in the store table and returns its recordId.
abstract  int retrieveFirstRecord(Context aContext, java.lang.String aFormatName)
          Retrieves the first record in the store table and returns its recordId.
abstract  Hashtable retrieveFirstRecordForForwarding()
          Returns the first record in the database and identifies it as being retrieved for forwarding.
abstract  void retrieveFirstRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat)
          Returns the first record in the database and updates the aContext by unformatting the retrieved record using the aHashtableFormat.
abstract  void retrieveFirstRecordForForwarding(Context aContext, java.lang.String aFormatName)
          Returns the first record in the database and updates the aContext by unformatting the retrieved record using the format identified by aFormatName.
abstract  Hashtable retrieveNextRecord()
          Returns the next record from the current cursor in the store table.
abstract  int retrieveNextRecord(Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the next record from the current cursor in the store table and returns its recordId.
abstract  int retrieveNextRecord(Context aContextName, java.lang.String aFormatName)
          Retrieves the next record from the current cursor in the store table and returns its recordId.
abstract  Hashtable retrieveNextRecordForForwarding()
          Returns the next record from the current cursor in the store table and identifies it as being retrieved for forwarding.
abstract  void retrieveNextRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat)
          Returns the next record from the current cursor in the store table and updates the aContext by unformatting the retrieved record using the aHashtableFormat.
abstract  void retrieveNextRecordForForwarding(Context aContext, java.lang.String aFormatName)
          Returns the next record from the current cursor in the store table and updates the aContext by unformatting the retrieved record using the format identified by aFormatName.
abstract  Hashtable retrieveRecord(int aRecordId)
          Retrieves a record of the store table with an specific recordId.
abstract  void retrieveRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat)
          Retrieves a record of the store table with an specific recordId.
abstract  void retrieveRecord(int aRecordId, Context aContext, java.lang.String aFormatName)
          Retrieves a record of the store table with an specific recordId.
abstract  Hashtable retrieveRecord(java.lang.String aSelectionCriteria)
          Retrieves the first record of the store table that matches the selection criteria.
abstract  int retrieveRecord(java.lang.String aSelectionCriteria, Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the first record of the store table that matches the selection criteria and updates the aContext by unformatting the retrieved record using the aHashtableFormat.
abstract  int retrieveRecord(java.lang.String aSelectionCriteria, Context aContext, java.lang.String aFormatName)
          Retrieves the first record of the store table that matches the selection criteria and updates the aContext by unformatting the retrieved record using the format identified by aFormatName.
abstract  Vector retrieveRecordsForForwarding(java.lang.String aSearchCondition)
          Retrieves all of the records from the store table that match the search condition.
abstract  void retrieveRecordsForForwarding(java.lang.String aSearchCondition, Context aContext, HashtableIndexedCollectionFormat anOutputFormat)
          Retrieves all the records of the store table that match aSearchCondition.
abstract  void retrieveRecordsForForwarding(java.lang.String aSearchCondition, Context aContext, java.lang.String anOutputFormatName)
          Retrieves all the records of the store table that match aSearchCondition.
abstract  void rollback()
          Rolls back all changes made to the database.
 void setInUse(boolean b)
          Sets the value of the inUse attribute.
 void setTableName(java.lang.String aTableName)
          Sets the tableName attribute value of the Store instance to aTableName.
 void terminate()
          Performs any required actions before stopping the use of service instance.
abstract  int updateRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat)
          Updates the store table record that has an identifier that equals aRecordId with the data obtained by formatting the aContext with the aHashtableFormat.
abstract  int updateRecord(int aRecordId, Context aContext, java.lang.String aFormatName)
          Updates the store table record that has an identifier that equals aRecordId with the data obtained by formatting the aContext with the formatter identified by aFormatName.
abstract  int updateRecord(int aRecordId, Hashtable aDataHashtable)
          Updates the store table record that has an identifier that equals aRecordId with the data in aDataHashtable.
 
Methods inherited from class com.ibm.btt.services.jdbc.JDBCService
buildAddString, buildConnectionProperties, buildStatementArray, buildUpdateString, connect, connect, connect, connect, connect, connect, connect, disconnect, getAddPstmt, getAddString, getAutoCommit, getConnectionManager, getConnectionProperties, getConnMgrID, getDatabaseConnection, getDatabaseURL, getDataSourceName, getPassword, getPoolName, getSharedConnection, getUpdateString, getUser, isConnected, isWaitRetry, requestConnectionToConnectionManager, requestConnectionToConnectionManager, setAddPstmt, setAddString, setAutoCommit, setConnectionManager, setConnectionProperties, setConnMgrID, setDatabaseConnection, setDatabaseURL, setDataSourceName, setPassword, setPoolName, setSharedConnection, setStatementPoolSize, setUpdateString, setUser, setWaitRetry, verifyConnection
 
Methods inherited from class com.ibm.btt.base.Service
externalizer, getExternalizer, getTagName, initializeFrom, readExternal, readExternal, readObject, removeExternal, setExternalizer, toString, toStrings, toTags, writeExternal, writeExternal
 
Methods inherited from class com.ibm.btt.base.BTTProcessorNotifier
addHandler, getHandlersList, getName, removeHandler, setName, signalEvent, signalEvent, signalEvent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface com.ibm.btt.services.jdbc.StoreService
getAutoCommit, getColumnsTable, getFullTableName, getLastRecordNumber, getSchemaName, loadDriver, loadDriver, retrieveLastRecordNumber, retrieveRecord, retrieveRecord, retrieveRecord, retrieveRecordForForwarding, retrieveRecordForForwarding, retrieveRecordForForwarding, retrieveRecordForForwarding, retrieveRecordForForwarding, retrieveRecordForForwarding, setAutoCommit, setSchemaName, updateRecord, updateRecord, updateRecord
 
Methods inherited from interface com.ibm.btt.services.jdbc.DatabaseConnect
connect, connect, connect, connect, connect, connect, disconnect, getDatabaseURL, getDataSourceName, getPoolName, getSharedConnection, isConnected, isWaitRetry, setDatabaseURL, setDataSourceName, setPoolName, setSharedConnection, setWaitRetry
 
Methods inherited from interface com.ibm.btt.base.Externalizable
getName, setName
 

Field Detail

COMPID

public static final java.lang.String COMPID
Keeps the component identification that will be used by the traces tool.

See Also:
Constant Field Values

tableName

protected java.lang.String tableName
Keeps the name of the store table.


state

protected java.lang.String state
Keeps the status of the store service.

Constructor Detail

Store

public Store()
Method Detail

addRecord

public abstract int addRecord(Context aContext,
                              HashtableFormat aHashtableFormat)
                       throws DSEInvalidArgumentException,
                              DSEInvalidRequestException,
                              DSEInternalErrorException,
                              DSESQLException,
                              DSEInvalidClassException
Adds a record to the store table. The data to build the record is obtained by formatting the aContext using the aHashtableFormat. This method must be implemented by the subclass.

Specified by:
addRecord in interface StoreService
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 abstract int addRecord(Context aContext,
                              java.lang.String aFormatName)
                       throws DSEInvalidArgumentException,
                              DSEInvalidRequestException,
                              DSEInternalErrorException,
                              DSESQLException,
                              DSEInvalidClassException,
                              java.io.IOException
Adds a record to the store table. The data to build the record is obtained by formatting the aContext with the formatter identified by aFormatName. This method must be implemented by the subclass.

Specified by:
addRecord in interface StoreService
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 abstract int addRecord(Hashtable aDataHashtable)
                       throws DSEInvalidRequestException,
                              DSEInvalidArgumentException,
                              DSEInternalErrorException,
                              DSESQLException
Inserts the data from aHashtable as a new row into the current store table. The data Hashtable has the following format: key=data_field_name, value=data_field_value.

Specified by:
addRecord in interface StoreService
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 SQL Exception is caught

close

public void close()
           throws DSESQLException
Sets the state of the Store object to INACTIVE.

Specified by:
close in interface StoreService
Throws:
DSESQLException - if the close fails

commit

public abstract void commit()
                     throws DSESQLException
Commits all changes to the database. This method must be implemented by the subclass.

Specified by:
commit in interface StoreService
Throws:
DSESQLException - if commit fails

deleteAllRetrievedForForwarding

public abstract int deleteAllRetrievedForForwarding()
                                             throws DSEInternalErrorException,
                                                    DSEInvalidArgumentException,
                                                    DSESQLException
Deletes all records marked as retrievedForForwarding from the store table. This method must be implemented by the subclass.

Specified by:
deleteAllRetrievedForForwarding in interface StoreService
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 abstract int deleteRecord(int aRecordId)
                          throws DSEInternalErrorException,
                                 DSEInvalidArgumentException,
                                 DSESQLException
Deletes the aRecordId record from the store table.

Specified by:
deleteRecord in interface StoreService
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 abstract int deleteRecords(java.lang.String aSelectionCriteria)
                           throws DSEInternalErrorException,
                                  DSEInvalidArgumentException,
                                  DSESQLException
Deletes all the records within the store table that match the selection criteria. This method must be implemented by the subclass.

Specified by:
deleteRecords in interface StoreService
Parameters:
aSelectionCriteria - java.lang.String
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

getInUse

public boolean getInUse()
Returns the value of inUse attribute.

Specified by:
getInUse in interface Poolable
Returns:
boolean - The value of the inUse attribute

getTableName

public java.lang.String getTableName()
Returns the tableName attribute value.

Specified by:
getTableName in interface StoreService
Returns:
java.lang.String

initialize

public void initialize()
                throws DSEException
Performs any required actions after service instanciation and before starting using it.

Specified by:
initialize in interface Poolable
Throws:
com.ibm.dse.base.DSEException
DSEException

isActive

public boolean isActive()
Returns true if the current state of the Store instance is ACTIVE.

Specified by:
isActive in interface StoreService
Returns:
boolean

markRecordRetrievedForForwarding

public abstract void markRecordRetrievedForForwarding(int aRecordId)
                                               throws DSEInternalErrorException,
                                                      DSESQLException
Marks the aRecordId record with the retrievedForForwarding mark. This method must be implemented by the subclass.

Parameters:
aRecordId - int
Throws:
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

open

public void open()
          throws DSEInvalidRequestException
Sets the state of the Store instance to ACTIVE.

Specified by:
open in interface StoreService
Throws:
DSEInvalidRequestException

reset

public void reset()
           throws DSEException
Resets the store. This method is invoked when releasing the Poolable object.

Specified by:
reset in interface Poolable
Throws:
DSEException

retrieveFirstRecord

public abstract Hashtable retrieveFirstRecord()
                                       throws DSEInternalErrorException,
                                              DSEInvalidArgumentException,
                                              DSESQLException
Returns the first record in the database. This method must be implemented by the subclass.

Specified by:
retrieveFirstRecord in interface StoreService
Returns:
Hashtable - the Hashtable containing 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 abstract 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 an argument. The aContext is automatically updated with the retrieved record columns values. This method must be implemented by the subclass.

Specified by:
retrieveFirstRecord in interface StoreService
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 abstract int retrieveFirstRecord(Context aContext,
                                        java.lang.String aFormatName)
                                 throws DSEInvalidRequestException,
                                        DSEInvalidArgumentException,
                                        DSEInternalErrorException,
                                        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 aContext as an argument. The aContext is automatically updated with the retrieved record columns values. This method must be implemented by the subclass.

Specified by:
retrieveFirstRecord in interface StoreService
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 abstract Hashtable retrieveFirstRecordForForwarding()
                                                    throws DSEInternalErrorException,
                                                           DSEInvalidArgumentException,
                                                           DSESQLException
Returns the first record in the database and identifies it as being retrieved for forwarding.

Specified by:
retrieveFirstRecordForForwarding in interface StoreService
Returns:
Hashtable - the Hashtable containing 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 abstract void retrieveFirstRecordForForwarding(Context aContext,
                                                      HashtableFormat aHashtableFormat)
                                               throws DSEInternalErrorException,
                                                      DSEInvalidRequestException,
                                                      DSEInvalidArgumentException,
                                                      DSESQLException
Returns the first record in the database and updates the aContext by unformatting the retrieved record using the aHashtableFormat. It identifies the record in the database as being retrieved for forwarding. This method must be implemented by the subclass.

Specified by:
retrieveFirstRecordForForwarding in interface StoreService
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 abstract void retrieveFirstRecordForForwarding(Context aContext,
                                                      java.lang.String aFormatName)
                                               throws DSEInvalidRequestException,
                                                      DSEInternalErrorException,
                                                      DSEInvalidArgumentException,
                                                      DSESQLException,
                                                      java.io.IOException
Returns the first record in the database and updates the aContext by unformatting the retrieved record using the format identified by aFormatName. It identifies the record in the database as being retrieved for forwarding. This method must be implemented by the subclass.

Specified by:
retrieveFirstRecordForForwarding in interface StoreService
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

retrieveNextRecord

public abstract Hashtable retrieveNextRecord()
                                      throws DSEInternalErrorException,
                                             DSEInvalidRequestException,
                                             DSEInvalidArgumentException,
                                             DSESQLException
Returns the next record from the current cursor in the store table.

Specified by:
retrieveNextRecord in interface StoreService
Returns:
Hashtable - the Hashtable containing 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 abstract 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 aContext as an argument. The context aContext is automatically updated with the retrieved record columns values. This method must be implemented by the subclass.

Specified by:
retrieveNextRecord in interface StoreService
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 abstract int retrieveNextRecord(Context aContextName,
                                       java.lang.String aFormatName)
                                throws DSEInvalidRequestException,
                                       DSEInternalErrorException,
                                       DSEInvalidArgumentException,
                                       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 aContext as an argument. The aContext is automatically updated with the retrieved record columns values. This method must be implemented by the subclass.

Specified by:
retrieveNextRecord in interface StoreService
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 abstract Hashtable retrieveNextRecordForForwarding()
                                                   throws DSEInternalErrorException,
                                                          DSEInvalidRequestException,
                                                          DSEInvalidArgumentException,
                                                          DSESQLException
Returns the next record from the current cursor in the store table and identifies it as being retrieved for forwarding.

Specified by:
retrieveNextRecordForForwarding in interface StoreService
Returns:
Hashtable - the Hashtable containing 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

retrieveNextRecordForForwarding

public abstract 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 aContext by unformatting the retrieved record using the aHashtableFormat. It also identifies the record as being retrieved for forwarding. This method must be implemented by the subclass.

Specified by:
retrieveNextRecordForForwarding in interface StoreService
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 abstract 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 aContext by unformatting the retrieved record using the format identified by aFormatName. It also identifies the record as being retrieved for forwarding. This method must be implemented by the subclass.

Specified by:
retrieveNextRecordForForwarding in interface StoreService
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 abstract Hashtable retrieveRecord(int aRecordId)
                                  throws DSEInternalErrorException,
                                         DSEInvalidArgumentException,
                                         DSESQLException
Retrieves a record of the store table with an specific recordId. This method must be implemented by the subclass.

Specified by:
retrieveRecord in interface StoreService
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 abstract 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. This method must be implemented by the subclass.

Specified by:
retrieveRecord in interface StoreService
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 abstract 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. This method must be implemented by the subclass.

Specified by:
retrieveRecord in interface StoreService
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 abstract Hashtable retrieveRecord(java.lang.String aSelectionCriteria)
                                  throws DSEInternalErrorException,
                                         DSEInvalidArgumentException,
                                         DSESQLException
Retrieves the first record of the store table that matches the selection criteria. This method must be implemented by the subclass.

Specified by:
retrieveRecord in interface StoreService
Parameters:
aSelectionCriteria - java.lang.String
Returns:
Hashtable - the hash table that contains 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

retrieveRecord

public abstract 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 updates the aContext by unformatting the retrieved record using the aHashtableFormat. The method returns the recordId of the retrieved record. This method must be implemented by the subclass.

Specified by:
retrieveRecord in interface StoreService
Parameters:
aSelectionCriteria - java.lang.String
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

retrieveRecord

public abstract int retrieveRecord(java.lang.String aSelectionCriteria,
                                   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 aContext by unformatting the retrieved record using the format identified by aFormatName. The method returns the recordId of the retrieved record. This method must be implemented by the subclass.

Specified by:
retrieveRecord in interface StoreService
Parameters:
aSearchCriteria - 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

retrieveRecordsForForwarding

public abstract 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.

Specified by:
retrieveRecordsForForwarding in interface StoreService
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 abstract 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.

Specified by:
retrieveRecordsForForwarding in interface StoreService
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
DSEObjectNotFoundException

retrieveRecordsForForwarding

public abstract 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.

Specified by:
retrieveRecordsForForwarding in interface StoreService
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
DSEObjectNotFoundException

rollback

public abstract void rollback()
                       throws DSESQLException
Rolls back all changes made to the database. This method must be implemented by the subclass.

Specified by:
rollback in interface StoreService
Throws:
DSESQLException - if an SQL Exception is caught

setInUse

public void setInUse(boolean b)
Sets the value of the inUse attribute.

Specified by:
setInUse in interface Poolable
Parameters:
b - The new value of the attribute inUse

setTableName

public void setTableName(java.lang.String aTableName)
Sets the tableName attribute value of the Store instance to aTableName.

Specified by:
setTableName in interface StoreService
Parameters:
aTableName - java.lang.String the name

terminate

public void terminate()
               throws DSEException
Performs any required actions before stopping the use of service instance.

Specified by:
terminate in interface ProcessorNotifier
Specified by:
terminate in interface Poolable
Overrides:
terminate in class Service
Throws:
com.ibm.dse.base.DSEException
DSEException

updateRecord

public abstract int updateRecord(int aRecordId,
                                 Context aContext,
                                 HashtableFormat aHashtableFormat)
                          throws DSEInvalidRequestException,
                                 DSEInternalErrorException,
                                 DSEInvalidArgumentException,
                                 DSESQLException,
                                 DSEInvalidClassException
Updates the store table record that has an identifier that equals aRecordId with the data obtained by formatting the aContext with the aHashtableFormat. This method must be implemented by the subclass.

Specified by:
updateRecord in interface StoreService
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 abstract int updateRecord(int aRecordId,
                                 Context aContext,
                                 java.lang.String aFormatName)
                          throws DSEInvalidRequestException,
                                 DSEInternalErrorException,
                                 DSEInvalidArgumentException,
                                 DSESQLException,
                                 DSEInvalidClassException,
                                 java.io.IOException
Updates the store table record that has an identifier that equals aRecordId with the data obtained by formatting the aContext with the formatter identified by aFormatName. This method must be implemented by the subclass.

Specified by:
updateRecord in interface StoreService
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 abstract int updateRecord(int aRecordId,
                                 Hashtable aDataHashtable)
                          throws DSEInvalidRequestException,
                                 DSEInternalErrorException,
                                 DSEInvalidArgumentException,
                                 DSESQLException
Updates the store table record that has an identifier that equals aRecordId with the data in aDataHashtable. This method must be implemented by the subclass.

Specified by:
updateRecord in interface StoreService
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

IBM WebSphere Multichannel Bank Transformation Toolkit Javadoc

(c) Copyright IBM Corporation 1998, 2009