com.ibm.dse.services.jdbc
Class Journal

java.lang.Object
  |
  +--com.ibm.dse.base.DSENotifier
        |
        +--com.ibm.dse.base.Service
              |
              +--com.ibm.dse.services.jdbc.JDBCService
                    |
                    +--com.ibm.dse.services.jdbc.Journal
Direct Known Subclasses:
JDBCJournal

public abstract class Journal
extends JDBCService
implements JournalService

The Journal class is an abstract class that provides all of the data and methods required to build a financial Electronic Journal. The Journal class is a subclass of Service. Because of this, it has an externalizer that allows you to define any journal object attributes in an external XML file (these attributes values are then used when the journal object is instantiated), and it inherits all Service attributes; for example, the name attribute that allows you to request a specific journal service instance in the application hierarchy of contexts. A journal 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 journal) 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.
 java.sql.Date date
          Keeps the date that will be used by the Journal service to decide which table generation the current journal instance will have to work with.
 java.lang.String entity
          Keeps the entity information for the current journal instance.
protected  int lastRecordNumber
          Keeps the number of the last record inserted in the current journal table.
 
Fields inherited from class com.ibm.dse.services.jdbc.JDBCService
autoCommit, connectionProperties, databaseConnection, databaseURL, dataSourceName, metaData, password, poolName, sharedConnection, user, waitRetry
 
Fields inherited from class com.ibm.dse.base.Service
externalizer
 
Fields inherited from class com.ibm.dse.base.DSENotifier
handlersList, name
 
Constructor Summary
Journal()
           
 
Method Summary
abstract  int addRecord(Context aContext, HashtableFormat aHashtableFormat)
          It should call the formatter (HashtableFormat parameter) format method by passing aContext as an argument, and then use the returned object (a Hashtable instance) to build the journal record and insert it into the journal table.
abstract  int addRecord(Context aContext, java.lang.String aFormatName)
          It should instantiate the journal format with the name aFormatName and call its format method by passing aContext as an argument.
abstract  int addRecord(Hashtable aDataHashtable)
          It should insert the data in aDataHashtable as a new row in the current journal table.
 void close()
          Closes the journal (set its status to inactive).
abstract  void commit()
          It should commit all changes to the database.
protected abstract  java.lang.String controlTableName()
          It should return the control table name that is used internally by the journal service.
abstract  java.sql.Date currentGenerationDate()
          It should return the last date that the journal service was used by a specific entity.
 java.sql.Date getDate()
          Returns the date attribute value.
 java.lang.String getEntity()
          Returns the entity attribute value.
abstract  java.lang.String getJDBCDriver()
          Returns the value of the attribute that keeps the name of the JDBC Driver being used by the service.
protected  int getLastRecordNumber()
          Returns the lastRecordNumber attribute value.
abstract  java.lang.String getSchemaName()
          Returns the schemaName attribute value.
protected  java.lang.String getState()
          Returns the state attribute value.
abstract  java.lang.String getTableName()
          Returns the current journal table name.
 boolean isActive()
          Answers true if the journal is in an active state.
abstract  boolean isCreateSchema()
          Answers whether a schema has been created for the journal schema in the database.
protected abstract  boolean isValidEntity()
          It should check whether the entity set for the journal instance is a valid entity or not based on the journal tables previously created.
 void open()
          Decides which table should use the journal instance.
abstract  void openOnCurrentTable()
          Sets the journal instance attributes that work with the database table that is currently in use.
abstract  void openOnNextTable()
          Sets the journal instance attributes that work with the next table generation that is available for the specific journal definition.
abstract  int queryLastRecordNumber()
          Retrieves the last record number from the current journal table.
abstract  Hashtable retrieveLastRecord()
          Returns the last record in the current journal table in a Hashtable instance.
abstract  void retrieveLastRecord(Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the last record from the current journal table; it uses the formatter aHashtableFormat to unformat the retrieved record and update the context aContext.
abstract  void retrieveLastRecord(Context aContextName, java.lang.String aFormatName)
          Updates the context aContext with the values in the last record of the current journal table, by using the formatter named aFormatName.
abstract  Vector retrieveLastRecords(int aNumber)
          Returns a vector containing the last aNumber records in the current journal table.
abstract  Hashtable retrieveRecord(int aRecordNumber)
          Returns the record that is identified by aRecordNumber from the current journal table.
abstract  void retrieveRecord(int aRecordNumber, Context aContext, HashtableFormat aHashtableFormat)
          Returns the record from the current journal table that is identified by aRecordNumber.
abstract  void retrieveRecord(int aRecordNumber, Context aContext, java.lang.String aFormatName)
          Returns the record from the current journal table that is identified by aRecordNumber.
abstract  Vector retrieveRecords(java.lang.String aSearchCondition)
          Returns a Vector with a set of hash tables built from the records in the current journal table and that match the selection criteria.
abstract  void rollback()
          Rolls back all changes made to the database using the current connection.
abstract  void setCreateSchema(boolean newCreateSchema)
          Sets the createSchema attribute that keeps information about the existence of a schema in the database keeping the journal tables.
abstract  void setEntity(java.lang.String anEntityName)
          Sets the entity attribute value to anEntityName.
abstract  void setJDBCDriver(java.lang.String newJDBCDriver)
          Sets the value of the attribute that keeps the name of the JDBC Driver being used by the service.
protected  void setLastRecordNumber(int aRecordNumber)
          Sets the lastRecordNumber attribute value to aRecordNumber.
abstract  void setSchemaName(java.lang.String aSchemaName)
          Sets the schemaName attribute to aSchemaName.
protected  void setState(java.lang.String aState)
          Sets the state attribute value of the journal instance to aState.
protected abstract  void setTableName(java.lang.String aTableName)
          Sets the name of the table that will use the journal instance.
protected  java.sql.Date today()
          Returns today's date.
abstract  int updateLastRecord(Context aContext, HashtableFormat aHashtableFormat)
          Updates the last record of the current journal table with the data in context aContext.
abstract  int updateLastRecord(Context aContext, java.lang.String aFormatName)
          Updates the contents of the last journal table record with the data in context aContext.
abstract  int updateLastRecord(Hashtable aDataHashtable)
          Updates the contents of the last journal table record with the data in aDataHashtable.
abstract  int updateRecord(int aRecordNumber, Context aContext, HashtableFormat aHashtableFormat)
          Updates the record identified by aRecordNumber within the journal table with the data in context aContext.
abstract  int updateRecord(int aRecordNumber, Context aContext, java.lang.String aFormatName)
          Updates the contents of the journal record that is identified by aRecordNumber with the data obtained by formatting the context aContext with the aFormatName formatter.
abstract  int updateRecord(int aRecordNumber, Hashtable aDataHashtable)
          Updates the contents of the journal record that is identified by aRecordNumber with the data in aDataHashtable.
abstract  int updateRecords(java.lang.String aSearchCondition, Context aContext, HashtableFormat aHashtableFormat)
          Updates all of the current journal table records, which match the search condition that is passed as an argument, with the data obtained by formatting aContext using the journal format aHashtableFormat .To be implemented by the subclass.
abstract  int updateRecords(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName)
          Updates the contents of all of the journal records that match the specified search condition with the data in the context aContext.
abstract  int updateRecords(java.lang.String aSearchCondition, Hashtable aDataHashtable)
          Updates the contents of all the journal records that match the specified search condition with the data in aDataHashtable.
 
Methods inherited from class com.ibm.dse.services.jdbc.JDBCService
buildConnectionProperties, connect, connect, connect, connect, connect, connect, disconnect, getAutoCommit, getConnectionManager, getConnectionProperties, getDatabaseConnection, getDatabaseURL, getDataSourceName, getPassword, getPoolName, getSharedConnection, getUser, isConnected, isWaitRetry, requestConnectionToConnectionManager, requestConnectionToConnectionManager, setAutoCommit, setConnectionManager, setConnectionProperties, setDatabaseConnection, setDatabaseURL, setDataSourceName, setPassword, setPoolName, setSharedConnection, setUser, setWaitRetry, verifyConnection
 
Methods inherited from class com.ibm.dse.base.Service
externalizer, getExternalizer, getTagName, initializeFrom, readExternal, readExternal, readObject, removeExternal, setExternalizer, terminate, toString, toStrings, toTags, writeExternal, writeExternal
 
Methods inherited from class com.ibm.dse.base.DSENotifier
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
 

Field Detail

COMPID

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

date

public java.sql.Date date
Keeps the date that will be used by the Journal service to decide which table generation the current journal instance will have to work with.

entity

public java.lang.String entity
Keeps the entity information for the current journal instance.

lastRecordNumber

protected int lastRecordNumber
Keeps the number of the last record inserted in the current journal table.
Constructor Detail

Journal

public Journal()
Method Detail

addRecord

public abstract int addRecord(Context aContext,
                              HashtableFormat aHashtableFormat)
                       throws DSEInvalidArgumentException,
                              DSEInvalidRequestException,
                              DSEInternalErrorException,
                              DSESQLException
It should call the formatter (HashtableFormat parameter) format method by passing aContext as an argument, and then use the returned object (a Hashtable instance) to build the journal record and insert it into the journal table. To be implemented by the subclass.
Specified by:
addRecord in interface JournalService
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
Returns:
int - the row number where the journal 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

addRecord

public abstract int addRecord(Context aContext,
                              java.lang.String aFormatName)
                       throws DSEInvalidArgumentException,
                              DSEInvalidRequestException,
                              DSEInternalErrorException,
                              DSESQLException
It should instantiate the journal format with the name aFormatName and call its format method by passing aContext as an argument. The returned object, a Hashtable instance, can then be used to build and insert the journal record in the journal table. To be implemented by the subclass.
Specified by:
addRecord in interface JournalService
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String
Returns:
int - the row number where the journal 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

addRecord

public abstract int addRecord(Hashtable aDataHashtable)
                       throws DSEInvalidRequestException,
                              DSEInvalidArgumentException,
                              DSEInternalErrorException,
                              DSESQLException
It should insert the data in aDataHashtable as a new row in the current journal table. To be implemented by the subclass.
Specified by:
addRecord in interface JournalService
Parameters:
aDataHashtable - com.ibm.dse.base.Hashtable
Returns:
int - the row number where the journal 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()
Closes the journal (set its status to inactive). No more journalling operations can be performed on it.
Specified by:
close in interface JournalService

commit

public abstract void commit()
                     throws DSESQLException
It should commit all changes to the database. To be implemented by the subclass.
Specified by:
commit in interface JournalService
Throws:
DSESQLException - if an SQL Exception is caught

controlTableName

protected abstract java.lang.String controlTableName()
It should return the control table name that is used internally by the journal service. To be implemented by the subclass.
Returns:
java.lang.String the name

currentGenerationDate

public abstract java.sql.Date currentGenerationDate()
                                             throws DSEInternalErrorException,
                                                    DSESQLException
It should return the last date that the journal service was used by a specific entity. To be implemented by the subclass.
Returns:
java.sql.Date - the current table generation date
Throws:
DSESQLException - if an SQL Exception is caught
DSEInternalErrorException - if an internal program error occurs

getDate

public java.sql.Date getDate()
Returns the date attribute value.
Returns:
java.sql.Date

getEntity

public java.lang.String getEntity()
Returns the entity attribute value.
Returns:
java.lang.String

getJDBCDriver

public abstract java.lang.String getJDBCDriver()
Returns the value of the attribute that keeps the name of the JDBC Driver being used by the service.
Specified by:
getJDBCDriver in interface JournalService
Returns:
java.lang.String

getLastRecordNumber

protected int getLastRecordNumber()
Returns the lastRecordNumber attribute value.
Returns:
int

getSchemaName

public abstract java.lang.String getSchemaName()
Returns the schemaName attribute value.
Specified by:
getSchemaName in interface JournalService
Returns:
java.lang.String

getState

protected java.lang.String getState()
Returns the state attribute value.
Returns:
java.lang.String

getTableName

public abstract java.lang.String getTableName()
Returns the current journal table name. To be implemented by the subclass.
Specified by:
getTableName in interface JournalService
Returns:
java.lang.String

isActive

public boolean isActive()
Answers true if the journal is in an active state.
Specified by:
isActive in interface JournalService
Returns:
boolean

isCreateSchema

public abstract boolean isCreateSchema()
Answers whether a schema has been created for the journal schema in the database.
Specified by:
isCreateSchema in interface JournalService
Returns:
boolean

isValidEntity

protected abstract boolean isValidEntity()
                                  throws DSEInternalErrorException,
                                         DSESQLException
It should check whether the entity set for the journal instance is a valid entity or not based on the journal tables previously created. To be implemented by the subclass.
Returns:
boolean
Throws:
DSEInternalErrorException - if an internal program error is detected
DSESQLException - if a SQL Exception is caught

open

public void open()
          throws DSEInternalErrorException,
                 DSEInvalidRequestException,
                 DSEInvalidArgumentException,
                 DSESQLException
Decides which table should use the journal instance. First, it checks if the journal is active. If it is already active it checks if the date returned by the method currentGenerationDate() equals the date returned by the method today(). If this is true, then it calls the openOnCurrentTable() method. If not, it calls the openOnNextTable() method.
Specified by:
open in interface JournalService
Throws:
DSEInvalidRequestException - if the entity name is not valid
DSEInternalErrorException - if an internal program error occurs
DSEInvalidArgumentException - if an argument is not valid
DSESQLException - if a SQL Exception occurs

openOnCurrentTable

public abstract void openOnCurrentTable()
                                 throws DSEInvalidRequestException,
                                        DSEInternalErrorException,
                                        DSEInvalidArgumentException,
                                        DSESQLException
Sets the journal instance attributes that work with the database table that is currently in use. To be implemented by the subclass.
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

openOnNextTable

public abstract void openOnNextTable()
                              throws DSEInternalErrorException,
                                     DSEInvalidRequestException,
                                     DSEInvalidArgumentException,
                                     DSESQLException
Sets the journal instance attributes that work with the next table generation that is available for the specific journal definition. To be implemented by the subclass.
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

queryLastRecordNumber

public abstract int queryLastRecordNumber()
                                   throws DSESQLException,
                                          DSEInternalErrorException
Retrieves the last record number from the current journal table. To be implemented by the subclass.
Specified by:
queryLastRecordNumber in interface JournalService
Returns:
int - the record number
Throws:
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

retrieveLastRecord

public abstract Hashtable retrieveLastRecord()
                                      throws DSEInternalErrorException,
                                             DSEInvalidArgumentException,
                                             DSESQLException
Returns the last record in the current journal table in a Hashtable instance. To be implemented by the subclass.
Specified by:
retrieveLastRecord in interface JournalService
Returns:
com.ibm.dse.base.Hashtable - the retrieved record in hash table format
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

retrieveLastRecord

public abstract void retrieveLastRecord(Context aContext,
                                        HashtableFormat aHashtableFormat)
                                 throws DSEInvalidRequestException,
                                        DSEInternalErrorException,
                                        DSEInvalidArgumentException,
                                        DSESQLException
Retrieves the last record from the current journal table; it uses the formatter aHashtableFormat to unformat the retrieved record and update the context aContext. To be implemented by the subclass.
Specified by:
retrieveLastRecord in interface JournalService
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
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

retrieveLastRecord

public abstract void retrieveLastRecord(Context aContextName,
                                        java.lang.String aFormatName)
                                 throws DSEInvalidRequestException,
                                        DSEInternalErrorException,
                                        DSEInvalidArgumentException,
                                        DSESQLException
Updates the context aContext with the values in the last record of the current journal table, by using the formatter named aFormatName. To be implemented by the subclass.
Specified by:
retrieveLastRecord in interface JournalService
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

retrieveLastRecords

public abstract Vector retrieveLastRecords(int aNumber)
                                    throws DSEInternalErrorException,
                                           DSEInvalidRequestException,
                                           DSEInvalidArgumentException,
                                           DSESQLException
Returns a vector containing the last aNumber records in the current journal table. To be implemented by the subclass.
Specified by:
retrieveLastRecords in interface JournalService
Parameters:
aNumber - int, the number of records to be retrieved from the database
Returns:
Vector
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 SQL Exception is caught

retrieveRecord

public abstract Hashtable retrieveRecord(int aRecordNumber)
                                  throws DSEInternalErrorException,
                                         DSEInvalidArgumentException,
                                         DSESQLException
Returns the record that is identified by aRecordNumber from the current journal table. To be implemented by the subclass.
Specified by:
retrieveRecord in interface JournalService
Parameters:
aRecordNumber - int
Returns:
Hashtable
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 abstract void retrieveRecord(int aRecordNumber,
                                    Context aContext,
                                    HashtableFormat aHashtableFormat)
                             throws DSEInvalidRequestException,
                                    DSEInternalErrorException,
                                    DSEInvalidArgumentException,
                                    DSESQLException
Returns the record from the current journal table that is identified by aRecordNumber. The context aContext is then updated with the record contents by calling the unformat method of the formatter aHashtableFormat. To be implemented by the subclass.
Specified by:
retrieveRecord in interface JournalService
Parameters:
aRecordNumber - int
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
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

retrieveRecord

public abstract void retrieveRecord(int aRecordNumber,
                                    Context aContext,
                                    java.lang.String aFormatName)
                             throws DSEInvalidRequestException,
                                    DSEInternalErrorException,
                                    DSEInvalidArgumentException,
                                    DSESQLException
Returns the record from the current journal table that is identified by aRecordNumber. The context aContext is then updated with the record contents by calling the unformat method of the formatter named aFormatName. To be implemented by the subclass.
Specified by:
retrieveRecord in interface JournalService
Parameters:
aRecordNumber - int
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

retrieveRecords

public abstract Vector retrieveRecords(java.lang.String aSearchCondition)
                                throws DSEInternalErrorException,
                                       DSEInvalidRequestException,
                                       DSEInvalidArgumentException,
                                       DSESQLException
Returns a Vector with a set of hash tables built from the records in the current journal table and that match the selection criteria. To be implemented by the subclass.
Specified by:
retrieveRecords in interface JournalService
Parameters:
aSearchCondition - java.lang.String, the selection criteria
Returns:
Vector - the vector of matching 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 SQL Exception is caught

rollback

public abstract void rollback()
                       throws DSESQLException
Rolls back all changes made to the database using the current connection. To be implemented by the subclass.
Specified by:
rollback in interface JournalService
Throws:
DSESQLException - if an SQL Exception is caught

setCreateSchema

public abstract void setCreateSchema(boolean newCreateSchema)
Sets the createSchema attribute that keeps information about the existence of a schema in the database keeping the journal tables.
Specified by:
setCreateSchema in interface JournalService
Parameters:
newCreateSchema - boolean

setEntity

public abstract void setEntity(java.lang.String anEntityName)
Sets the entity attribute value to anEntityName.
Specified by:
setEntity in interface JournalService
Parameters:
anEntityName - java.lang.String

setJDBCDriver

public abstract void setJDBCDriver(java.lang.String newJDBCDriver)
Sets the value of the attribute that keeps the name of the JDBC Driver being used by the service.
Specified by:
setJDBCDriver in interface JournalService
Parameters:
newJDBCDriver - java.lang.String

setLastRecordNumber

protected void setLastRecordNumber(int aRecordNumber)
Sets the lastRecordNumber attribute value to aRecordNumber.
Parameters:
aRecordNumber - int

setSchemaName

public abstract void setSchemaName(java.lang.String aSchemaName)
Sets the schemaName attribute to aSchemaName.
Specified by:
setSchemaName in interface JournalService
Parameters:
aSchemaName - java.lang.String

setState

protected void setState(java.lang.String aState)
Sets the state attribute value of the journal instance to aState.
Parameters:
aState - java.lang.String

setTableName

protected abstract void setTableName(java.lang.String aTableName)
Sets the name of the table that will use the journal instance.
Parameters:
aTableName - java.lang.String

today

protected java.sql.Date today()
Returns today's date. It determines the time frame in which a journal table generation is valid and can be modified for different journalling systems needs.
Returns:
java.sql.Date

updateLastRecord

public abstract int updateLastRecord(Context aContext,
                                     HashtableFormat aHashtableFormat)
                              throws DSEInvalidRequestException,
                                     DSEInternalErrorException,
                                     DSEInvalidArgumentException,
                                     DSESQLException
Updates the last record of the current journal table with the data in context aContext. To be implemented by the subclass.
Specified by:
updateLastRecord in interface JournalService
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat, the format to be used
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 SQL Exception is caught

updateLastRecord

public abstract int updateLastRecord(Context aContext,
                                     java.lang.String aFormatName)
                              throws DSEInvalidRequestException,
                                     DSEInvalidArgumentException,
                                     DSEInternalErrorException,
                                     DSESQLException
Updates the contents of the last journal table record with the data in context aContext. To be implemented by the subclass.
Specified by:
updateLastRecord in interface JournalService
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String, the name of the format to be used
Returns:
int - the row count ( number of updated records)
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

updateLastRecord

public abstract int updateLastRecord(Hashtable aDataHashtable)
                              throws DSEInvalidRequestException,
                                     DSEInvalidArgumentException,
                                     DSEInternalErrorException,
                                     DSESQLException
Updates the contents of the last journal table record with the data in aDataHashtable. To be implemented by the subclass.
Specified by:
updateLastRecord in interface JournalService
Parameters:
aDataHashtable - com.ibm.dse.base.Hashtable
Returns:
int - the row count ( number of updated records)
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

updateRecord

public abstract int updateRecord(int aRecordNumber,
                                 Context aContext,
                                 HashtableFormat aHashtableFormat)
                          throws DSEInvalidRequestException,
                                 DSEInternalErrorException,
                                 DSEInvalidArgumentException,
                                 DSESQLException
Updates the record identified by aRecordNumber within the journal table with the data in context aContext. To be implemented by the subclass.
Specified by:
updateRecord in interface JournalService
Parameters:
aRecordNumber - int, the number of the record to be updated
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 SQL Exception is caught

updateRecord

public abstract int updateRecord(int aRecordNumber,
                                 Context aContext,
                                 java.lang.String aFormatName)
                          throws DSEInvalidRequestException,
                                 DSEInvalidArgumentException,
                                 DSEInternalErrorException,
                                 DSESQLException
Updates the contents of the journal record that is identified by aRecordNumber with the data obtained by formatting the context aContext with the aFormatName formatter. To be implemented by the subclass.
Specified by:
updateRecord in interface JournalService
Parameters:
aRecordNumber - int, the number of the record to be updated
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String, the name of the formatter to be used
Returns:
int - the row count ( number of updated records)
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

updateRecord

public abstract int updateRecord(int aRecordNumber,
                                 Hashtable aDataHashtable)
                          throws DSEInvalidRequestException,
                                 DSEInvalidArgumentException,
                                 DSEInternalErrorException,
                                 DSESQLException
Updates the contents of the journal record that is identified by aRecordNumber with the data in aDataHashtable. To be implemented by the subclass.
Specified by:
updateRecord in interface JournalService
Parameters:
aRecordNumber - int, the number of the record to be updated
aDataHashtable - Hashtable
Returns:
int - the row count ( number of updated records)
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

updateRecords

public abstract int updateRecords(java.lang.String aSearchCondition,
                                  Context aContext,
                                  HashtableFormat aHashtableFormat)
                           throws DSEInvalidRequestException,
                                  DSEInternalErrorException,
                                  DSEInvalidArgumentException,
                                  DSESQLException
Updates all of the current journal table records, which match the search condition that is passed as an argument, with the data obtained by formatting aContext using the journal format aHashtableFormat .To be implemented by the subclass.
Specified by:
updateRecords in interface JournalService
Parameters:
aSearchCondition - java.lang.String
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 SQL Exception is caught

updateRecords

public abstract int updateRecords(java.lang.String aSearchCondition,
                                  Context aContext,
                                  java.lang.String aFormatName)
                           throws DSEInvalidRequestException,
                                  DSEInvalidArgumentException,
                                  DSEInternalErrorException,
                                  DSESQLException
Updates the contents of all of the journal records that match the specified search condition with the data in the context aContext. To be implemented by the subclass.
Specified by:
updateRecords in interface JournalService
Parameters:
aSearchCondition - java.lang.String
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String, the name of the format to be used
Returns:
int - the row count ( number of updated records)
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

updateRecords

public abstract int updateRecords(java.lang.String aSearchCondition,
                                  Hashtable aDataHashtable)
                           throws DSEInvalidRequestException,
                                  DSEInternalErrorException,
                                  DSEInvalidArgumentException,
                                  DSESQLException
Updates the contents of all the journal records that match the specified search condition with the data in aDataHashtable. To be implemented by the subclass.
Specified by:
updateRecords in interface JournalService
Parameters:
aSearchCondition - java.lang.String
aDataHashtable - Hashtable
Returns:
int - the row count ( number of updated records)
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