|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The JournalService interface provides the public abstract methods that are used when working with any journal service. Each class that includes the JournalService interface must implement all of these methods.
Method Summary | |
---|---|
int |
addRecord(Hashtable aDataHashtable)
Adds a record into the journal table with the data in aDataHashtable. |
void |
close()
Closes the journal, which means that no database operation can be done with this journal instance. |
void |
commit()
Commits all changes to the database. |
int |
getLastRecordNumberFromTable()
Returns the lastRecordNumber from control table. |
void |
open()
Decides which table is going to be the current journal table and prepares the journal instance to start working with it. |
void |
open(java.lang.String anEntity,
int aGeneration)
Opens the journal service with an entity and a generation number. |
void |
open(java.lang.String aSchemaName,
java.lang.String anEntity,
int aGeneration)
Opens the journal service with an specific shema, an entity, and a generation number. |
void |
openForEntity(java.lang.String anEntity)
Decides which table is going to be the current journal table for anEntity. |
void |
openForEntity(java.lang.String anEntity,
java.lang.String aSchemaName)
Decides which table is going to be the current journal table for entity anEntity. |
void |
openForSchema(java.lang.String aSchemaName)
Decides which table is going to be the current journal table in the schema aSchemaName and prepares the journal instance to start working with it. |
int |
queryLastRecordNumber()
Gets the last record number from the journal table. |
Hashtable |
retrieveLastRecord()
Retrieves the last record from the journal table. |
Vector |
retrieveLastRecords(int aNumber)
Returns the last aNumber records from the journal table. |
Hashtable |
retrieveRecord(int aRecordNumber)
Retrieves the record from the journal table that is identified by aRecordNumber. |
Vector |
retrieveRecords(java.lang.String aSearchCondition)
Retrieves all of the records from the journal table that match the search condition. |
Vector |
retrieveRecords(java.lang.String aSearchCondition,
Vector aColumnsVector)
Retrieves the columns in aColumnsVector of all the records within the journal table that match the search condition. |
void |
rollback()
Rolls back all database changes. |
void |
setEntity(java.lang.String anEntityName)
|
int |
updateLastRecord(Hashtable aDataHashtable)
Updates the last record of the journal table with the data in aDataHashtable. |
int |
updateLastRecord(Hashtable aDataHashtable,
Vector aColumnsVector)
Updates the columns in aColumnsVector for the last record of the current journal table with the data in aDataHashtable. |
int |
updateRecord(int aRecordNumber,
Hashtable aDataHashtable)
Updates the record identified by aRecordNumber within the journal table with the data contained in aDataHashtable. |
int |
updateRecord(int aRecordNumber,
Hashtable aDataHashtable,
Vector aColumnsVector)
Updates the columns specified in aColumnsVector with the data provided in aDataHashtable for the aRecordNumber record within the journal table. |
int |
updateRecords(java.lang.String aSearchCondition,
Hashtable aDataHashtable)
Updates all of the journal table records that match the search condition with the data contained in aDataHashtable. |
int |
updateRecords(java.lang.String aSearchCondition,
Hashtable aDataHashtable,
Vector aColumnsVector)
Updates the columns specified in aColumnsVector with the data provided in aDataHashtable for the records matching the search condition within the journal table. |
Methods inherited from interface com.ibm.btt.services.jdbcservicesinfra.DatabaseConnect |
---|
connect, disconnect, getDataSourceName, isConnected, isWaitRetry, setDataSourceName, setWaitRetry |
Method Detail |
public int addRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aDataHashtable
- com.ibm.dse.base.Hashtable
DSEInvalidArgumentException
- if the arguments are not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic void close() throws DSESQLException, DSEInternalErrorException
DSESQLException
- if close failed
DSEInternalErrorException
public void commit() throws DSESQLException, DSEInternalErrorException
DSESQLException
- if commit failed
DSEInternalErrorException
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 void open(java.lang.String anEntity, int aGeneration) throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
anEntity
- java.lang.StringaGeneration
- int
DSEInvalidRequestException
- if journal service state is active
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic void open(java.lang.String aSchemaName, java.lang.String anEntity, int aGeneration) throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
aSchemaName
- java.lang.StringanEntity
- java.lang.StringaGeneration
- int
DSEInvalidRequestException
- if journal service state is active
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic void openForEntity(java.lang.String anEntity) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
anEntity
- java.lang.String - the name of the entity
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 void openForEntity(java.lang.String anEntity, java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
anEntity
- java.lang.String - the name of the entityaSchemaName
- java.lang.String - the name of the schema
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 void openForSchema(java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSchemaName
- java.lang.String - the name of the journal schema
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 int queryLastRecordNumber() throws DSESQLException, DSEInternalErrorException
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic 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 Vector retrieveLastRecords(int aNumber) throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException
aNumber
- int - the number of records to be retrieved
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 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 Vector retrieveRecords(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.String
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 Vector retrieveRecords(java.lang.String aSearchCondition, Vector aColumnsVector) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.String - the search condition in SQL formataColumnsVector
- com.ibm.dse.base.Vector - the vector that contains the columns to be retrieved
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 void rollback() throws DSESQLException, DSEInternalErrorException
DSESQLException
- Thrown when the rollback fails
DSEInternalErrorException
public int updateLastRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aDataHashtable
- com.ibm.dse.base.Hashtable
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 int updateLastRecord(Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aDataHashtable
- Hashtable - the Hashtable that contains the dataaColumnsVector
- com.ibm.dse.base.Vector - the columns to be changed
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 int updateRecord(int aRecordNumber, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordNumber
- intaDataHashtable
- com.ibm.dse.base.Hashtable
DSEInvalidArgumentException
- is an argument is not valid
DSEInvalidRequestException
- if the input parameters are not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- is an SQL Exception is caughtpublic int updateRecord(int aRecordNumber, Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException
aRecordNumber
- int - the number of the record to be updatedaDataHashtable
- com.ibm.dse.base.Hashtable - the Hashtable that contains the new dataaColumnsVector
- com.ibm.dse.base.Vector - the columns to be changed
DSEInvalidArgumentException
- if the argument(s) is(are) not valid.
DSEInternalErrorException
- if an internal program error occurs.
DSEInvalidRequestException
- if the request is not valid.
com.ibm.dse.services.jdbc.DSESQLException
- if an SQL Exception is caught.
DSEInvalidArgumentException
DSEInternalErrorException
DSEInvalidRequestException
DSESQLException
public int updateRecords(java.lang.String aSearchCondition, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.StringaDataHashtable
- com.ibm.dse.base.Hashtable
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 int updateRecords(java.lang.String aSearchCondition, Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException
aSearchCondition
- java.lang.String - the search conditionaDataHashtable
- com.ibm.dse.base.Hashtable - the Hashtable that contains the new dataaColumnsVector
- com.ibm.dse.base.Vector - the columns to be changed
DSEInvalidArgumentException
- if the argument(s) is(are) not valid.
DSEInternalErrorException
- if an internal program error occurs.
DSEInvalidRequestException
- if the request is not valid.
com.ibm.dse.services.jdbc.DSESQLException
- if an SQL Exception is caught.
DSEInvalidArgumentException
DSEInternalErrorException
DSEInvalidRequestException
DSESQLException
public void setEntity(java.lang.String anEntityName) throws DSEInternalErrorException
DSEInternalErrorException
public int getLastRecordNumberFromTable() throws DSEInvalidRequestException
DSEInvalidRequestException
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |