|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.Service
com.ibm.btt.services.BTTServiceRequester
com.ibm.btt.services.PooledServiceRequester
com.ibm.btt.services.jdbcservicesinfra.JDBCService
com.ibm.btt.services.jdbcjournalservice.Journal
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 real JDBC journal service. Because of this, it has an externalizer that allows you to define any journal object attributes in an external XML file which will been used when the journal object is instantiated. Obviously it inherits all Service Requester attributes. And it will allow you to request an journl action such as add record, query and etc. All the contact with the CHA and formatter service will be handler in this subclass instead of the journal service. . A journal object is then usually instantiated by providing the name of the service to be created to the Service Factory class. The service factory 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.
Field Summary | |
---|---|
static java.lang.String |
COMPID
Keeps the component identification that will be used by the traces tool. |
Fields inherited from class com.ibm.btt.services.jdbcservicesinfra.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.services.PooledServiceRequester |
---|
poolable, poolId |
Fields inherited from class com.ibm.btt.base.Service |
---|
externalizer, name |
Constructor Summary | |
---|---|
Journal()
|
Method Summary | |
---|---|
abstract int |
addRecord(Context aContext,
FormatElement aHashtableFormat)
Calls the formatter's format method passing aContext as an argument, uses 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)
Instantiates the journal format with the name aFormatName and calls its format method by passing aContext as an argument. |
abstract int |
addRecord(Hashtable aDataHashtable)
Inserts the data in aDataHashtable as a new row in the current journal table. |
abstract void |
close()
Closes the journal (sets its status to inactive). |
abstract void |
commit()
Commits all changes to the database. |
void |
initialize()
Performs any required actions after service instanciation and before starting to use it. |
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. |
void |
reset()
Resets the Journal. |
abstract Hashtable |
retrieveLastRecord()
Returns the last record in the current journal table in a Hashtable instance. |
abstract void |
retrieveLastRecord(Context aContext,
FormatElement aHashtableFormat)
Retrieves the last record from the current journal table. |
abstract void |
retrieveLastRecord(Context aContextName,
java.lang.String aFormatName)
Updates the aContext with the values in the last record of the current journal table 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,
FormatElement 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 Hashtables built from the records in the current journal table that match the selection criteria. |
abstract void |
rollback()
Rolls back all changes made to the database using the current connection. |
void |
terminate()
Performs any actions required before stopping using the service instance. |
abstract int |
updateLastRecord(Context aContext,
FormatElement aHashtableFormat)
Updates the last record of the current journal table with the data in aContext. |
abstract int |
updateLastRecord(Context aContext,
java.lang.String aFormatName)
Updates the contents of the last journal table record with the data in 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,
FormatElement aHashtableFormat)
Updates the record identified by aRecordNumber within the journal table with the data in aContext. |
abstract int |
updateRecord(int aRecordNumber,
Context aContext,
java.lang.String aFormatName)
Updates the contents of the aRecordNumber journal record with the data obtained by formatting the aContext with the aFormatName formatter. |
abstract int |
updateRecord(int aRecordNumber,
Hashtable aDataHashtable)
Updates the contents of the aRecordNumber journal record with the data in aDataHashtable. |
abstract int |
updateRecords(java.lang.String aSearchCondition,
Context aContext,
FormatElement 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 aHashtableFormat. |
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 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.btt.services.jdbcservicesinfra.JDBCService |
---|
connect, connect, disconnect, getAutoCommit, getDataSourceName, getPassword, getUser, isConnected, isWaitRetry, setAutoCommit, setDataSourceName, setPassword, setUser, setWaitRetry, verifyConnection |
Methods inherited from class com.ibm.btt.services.PooledServiceRequester |
---|
getGrantTime, getPoolable, getPoolable, getPoolId, getServiceID, grantServiceID, initializeFrom, initializeFrom, processRequest, releaseOrphan, releaseOrphan, releasePoolable, releaseServiceRequester, setGrantTime, setPoolId |
Methods inherited from class com.ibm.btt.services.BTTServiceRequester |
---|
getCachingEnabled, getInactiveTimeout, getLastAccess, getServiceInvocation, getServiceType, HashMapToHashtable, newInstance, setCachingEnabled, setInactiveTimeout, setLastAccess, setServiceID, setServiceInvocation, setServiceType |
Methods inherited from class com.ibm.btt.base.Service |
---|
externalizer, getExternalizer, getName, getTagName, readExternal, readExternal, readObject, removeExternal, setExternalizer, setName, toString, toStrings, toTags, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Field Detail |
public static final java.lang.String COMPID
Constructor Detail |
public Journal()
Method Detail |
public abstract int addRecord(Context aContext, FormatElement aHashtableFormat) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat
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 caughtpublic abstract int addRecord(Context aContext, java.lang.String aFormatName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.String
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 caughtpublic abstract int addRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aDataHashtable
- com.ibm.dse.base.Hashtable
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 caughtpublic abstract void close() throws DSESQLException, DSEInternalErrorException
DSESQLException
- if the close fails
DSEInternalErrorException
public abstract void commit() throws DSESQLException, DSEInternalErrorException
DSESQLException
- if an SQL Exception is caught
DSEInternalErrorException
public void initialize() throws DSEException
DSEException
DSEException
public void open() throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
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 occurspublic abstract void openOnCurrentTable() throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
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 caughtpublic abstract void openOnNextTable() throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
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 caughtpublic abstract int queryLastRecordNumber() throws DSESQLException, DSEInternalErrorException
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic void reset() throws DSEException
DSEException
public abstract Hashtable retrieveLastRecord() throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic abstract void retrieveLastRecord(Context aContext, FormatElement aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat
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 caughtpublic abstract void retrieveLastRecord(Context aContextName, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContextName
- com.ibm.dse.base.ContextaFormatName
- java.lang.String
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 caughtpublic abstract Vector retrieveLastRecords(int aNumber) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aNumber
- int - the number of records to be retrieved from the database
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 caughtpublic abstract Hashtable retrieveRecord(int aRecordNumber) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordNumber
- int
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic abstract void retrieveRecord(int aRecordNumber, Context aContext, FormatElement aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordNumber
- intaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat
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 caughtpublic abstract void retrieveRecord(int aRecordNumber, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordNumber
- intaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.String
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 caughtpublic abstract Vector retrieveRecords(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.String - the selection criteria
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 caughtpublic abstract void rollback() throws DSESQLException, DSEInternalErrorException
DSESQLException
- if an SQL Exception is caught
DSEInternalErrorException
public void terminate() throws DSEException
terminate
in class Service
DSEException
DSEException
public abstract int updateLastRecord(Context aContext, FormatElement aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat - the format to be used
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 caughtpublic abstract int updateLastRecord(Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.String - the name of the format to be used
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 caughtpublic abstract int updateLastRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aDataHashtable
- com.ibm.dse.base.Hashtable
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 caughtpublic abstract int updateRecord(int aRecordNumber, Context aContext, FormatElement aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordNumber
- int - the number of the record to be updatedaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat
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 caughtpublic abstract int updateRecord(int aRecordNumber, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aRecordNumber
- int - the number of the record to be updatedaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.String - the name of the formatter to be used
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 caughtpublic abstract int updateRecord(int aRecordNumber, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aRecordNumber
- int, the number of the record to be updatedaDataHashtable
- Hashtable
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 caughtpublic abstract int updateRecords(java.lang.String aSearchCondition, Context aContext, FormatElement aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormat
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 caughtpublic abstract int updateRecords(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aSearchCondition
- java.lang.StringaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.String - the name of the format to be used
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 caughtpublic abstract int updateRecords(java.lang.String aSearchCondition, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.StringaDataHashtable
- Hashtable
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
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |