com.ibm.dse.services.jdbc
Interface JournalService

All Known Implementing Classes:
Journal

public interface JournalService
extends DatabaseConnect

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(Context aContext, HashtableFormat aHashtableFormat)
          Adds a record into the electronic journal database table using the data available in aContext.
 int addRecord(Context aContext, java.lang.String aFormatName)
          Adds a record into the electronic journal.
 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.
 boolean getAutoCommit()
          Returns the autoCommit attribute value.
 Hashtable getColumnsTable()
          Returns the columnsTable attribute value of the current journal.
 Vector getEntities()
          Retrieves all entities from the Database.
 java.lang.String getJDBCDriver()
          Returns the value of the attribute that keeps the name of the JDBC Driver being used by the service.
 int getNumberOfGenerations()
          Returns the number of journal generations for the current schema
 java.lang.String getSchemaName()
          Returns the schemaName attribute value.
 java.lang.String getTableName()
          Returns the current journal tableName attribute value.
 boolean isActive()
          Answers whether the journal instance is ready to request database operations or not.
 boolean isCreateSchema()
          Answers whether a schema has been created for the journal schema in the database.
 void loadDriver()
          Loads a user-defined default JDBC Driver.
 void loadDriver(java.lang.String aDriverName)
          Loads the JDBC Driver specified in the method argument.
 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 is going to be the current journal table for entity anEntity.
 void openForEntity(java.lang.String anEntity, java.lang.String aSchemaName)
          Decides which 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.
 void retrieveLastRecord(Context aContext, HashtableFormat aHashtableFormat)
          Retrieves the last record from the current journal table and updates the context aContext with the retrieved values.
 void retrieveLastRecord(Context aContext, java.lang.String aFormatName)
          Retrieves the last record from the journal table and updates the context aContext with the retrieved values.
 Vector retrieveLastRecords(int aNumber)
          Returns the last aNumber records from the journal table.
 void retrieveLastRecords(int aNumber, Context aContext, HashtableIndexedCollectionFormat anOutputFormat)
          Retrieves the last aNumber records from the journal table and unformats them into the context aContext using the formatter anOutputFormat.
 void retrieveLastRecords(int aNumber, Context aContext, java.lang.String anOutputFormatName)
          Retrieves the last aNumber records from the journal table and unformats them into the context aContext using the formatter named anOutputFormatName.
 Hashtable retrieveRecord(int aRecordNumber)
          Retrieves the record from the journal table that is identified by aRecordNumber.
 void retrieveRecord(int aRecordNumber, Context aContext, HashtableFormat aHashtableFormat)
          Updates the context aContext with the data in the record in the current journal table that is identified by aRecordNumber.
 void retrieveRecord(int aRecordNumber, Context aContext, java.lang.String aFormatName)
          Updates the context aContext with the data in the record in the current 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.
 void retrieveRecords(java.lang.String aSearchCondition, Context aContext, HashtableIndexedCollectionFormat anOutputFormat)
          Retrieves all the records within the current journal that match aSearchCondition.
 void retrieveRecords(java.lang.String aSearchCondition, Context aContext, java.lang.String anOutputFormatName)
          Retrieves all the records within the current journal that match aSearchCondition.
 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 retrieveRecords(java.lang.String aSearchCondition, Vector aColumnsVector, Context aContext, HashtableIndexedCollectionFormat anOutputFormat)
          Retrieves the columns in aColumnsVector of all the records within the current journal that match aSearchCondition.
 void retrieveRecords(java.lang.String aSearchCondition, Vector aColumnsVector, Context aContext, java.lang.String anOutputFormatName)
          Retrieves the columns in aColumnsVector of all the records within the current journal that match aSearchCondition.
 void rollback()
          Rolls back all database changes.
 void setAutoCommit(boolean aBoolean)
          Sets the autoCommit attribute value to aBoolean.
 void setCreateSchema(boolean newCreateSchema)
          Sets the createSchema attribute that keeps information about the existence of a schema in the database keeping the journal tables.
 void setEntity(java.lang.String anEntityName)
          Sets the entityName attribute value.
 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.
 void setSchemaName(java.lang.String aSchemaName)
          Sets the schemaName attribute to aSchemaName.
 int updateLastRecord(Context aContext, HashtableFormat aHashtableFormat)
          Updates the last record of the current journal table with the data in aContext.
 int updateLastRecord(Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector)
          Updates the columns specified in aColumnsVector for the last record of the current journal table.
 int updateLastRecord(Context aContext, java.lang.String aFormatName)
          Updates the last record of the journal table with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
 int updateLastRecord(Context aContext, java.lang.String aFormatName, Vector aColumnsVector)
          Updates the columns in aColumnsVector for the last record of the current journal table.
 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, Context aContext, HashtableFormat aHashtableFormat)
          Updates the record with the record identification in the database aRecordNumber.
 int updateRecord(int aRecordNumber, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector)
          Updates the columns in aColumnsVector for the record identified by aRecordNumber within the journal table.
 int updateRecord(int aRecordNumber, Context aContext, java.lang.String aFormatName)
          Updates the record identified by aRecordNumber within the journal table with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
 int updateRecord(int aRecordNumber, Context aContext, java.lang.String aFormatName, Vector aColumnsVector)
          Updates the columns in aColumnsVector for the record identified by aRecordNumber within the journal table.
 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, for the record identified by aRecordNumber within the journal table, with the data provided in aDataHashtable.
 int updateRecords(java.lang.String aSearchCondition, Context aContext, HashtableFormat aHashtableFormat)
          Updates all of the current journal table records that match the search condition passed as an argument with the data obtained by formatting aContext using the journal format aHashtableFormat.
 int updateRecords(java.lang.String aSearchCondition, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector)
          Updates the columns specified in aColumnsVector for all the current journal table records that match the search condition passed as an argument, with the data obtained by formatting aContext with the journal formatter aHashtableFormat.
 int updateRecords(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName)
          Updates all of the journal table records that match the search condition with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
 int updateRecords(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName, Vector aColumnsVector)
          Updates the columns specified in aColumnsVector for all the current journal table records that match the search condition passed as an argument, with the data obtained by formatting aContext with the formatter defined by aFormatName.
 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 for the records matching the search condition within the journal table, with the data provided in aDataHashtable.
 
Methods inherited from interface com.ibm.dse.services.jdbc.DatabaseConnect
connect, connect, connect, connect, connect, connect, disconnect, getDatabaseURL, getDataSourceName, getPoolName, getSharedConnection, isConnected, isWaitRetry, setDatabaseURL, setDataSourceName, setPoolName, setSharedConnection, setWaitRetry
 

Method Detail

addRecord

public int addRecord(Context aContext,
                     HashtableFormat aHashtableFormat)
              throws DSEInvalidArgumentException,
                     DSEInvalidRequestException,
                     DSEInternalErrorException,
                     DSESQLException
Adds a record into the electronic journal database table using the data available in aContext.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat, the journal format to be used to build the record
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 int addRecord(Context aContext,
                     java.lang.String aFormatName)
              throws DSEInvalidArgumentException,
                     DSEInvalidRequestException,
                     DSEInternalErrorException,
                     DSESQLException
Adds a record into the electronic journal. The process should use the journal format with name aFormatName and the data in aContext to build the journal record and insert it into the journal database table.
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 int addRecord(Hashtable aDataHashtable)
              throws DSEInvalidRequestException,
                     DSEInvalidArgumentException,
                     DSEInternalErrorException,
                     DSESQLException
Adds a record into the journal table with the data in aDataHashtable.
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, which means that no database operation can be done with this journal instance.

commit

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

getAutoCommit

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

getColumnsTable

public Hashtable getColumnsTable()
Returns the columnsTable attribute value of the current journal.
Returns:
Hashtable - the Hashtable that holds the column information

getEntities

public Vector getEntities()
                   throws DSESQLException,
                          DSEInternalErrorException
Retrieves all entities from the Database.
Returns:
com.ibm.dse.base.Vector, the vector containing all journal entities
Throws:
DSESQLException - if an SQL Exception is caught
DSEInternalErrorException - if an internal program error occurs

getJDBCDriver

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

getNumberOfGenerations

public int getNumberOfGenerations()
                           throws DSESQLException,
                                  DSEInternalErrorException
Returns the number of journal generations for the current schema
Returns:
int
Throws:
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

getSchemaName

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

getTableName

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

isActive

public boolean isActive()
Answers whether the journal instance is ready to request database operations or not.
Returns:
boolean

isCreateSchema

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

loadDriver

public void loadDriver()
                throws DSEInternalErrorException
Loads a user-defined default JDBC Driver.
Throws:
DSEInternalErrorException - if an internal program error occurs

loadDriver

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

open

public void open()
          throws DSEInternalErrorException,
                 DSEInvalidRequestException,
                 DSEInvalidArgumentException,
                 DSESQLException
Decides which table is going to be the current journal table and prepares the journal instance to start working with it.
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

open

public void open(java.lang.String anEntity,
                 int aGeneration)
          throws DSEInvalidRequestException,
                 DSEInternalErrorException,
                 DSESQLException
Opens the journal service with an entity and a generation number
Parameters:
anEntity - java.lang.String
aGeneration - int
Throws:
DSEInvalidRequestException - if journal service state is active
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

open

public void open(java.lang.String aSchemaName,
                 java.lang.String anEntity,
                 int aGeneration)
          throws DSEInvalidRequestException,
                 DSEInternalErrorException,
                 DSESQLException
Opens the journal service with an specific shema, an entity and a generation number
Parameters:
aSchemaName - java.lang.String
anEntity - java.lang.String
aGeneration - int
Throws:
DSEInvalidRequestException - if journal service state is active
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

openForEntity

public void openForEntity(java.lang.String anEntity)
                   throws DSEInternalErrorException,
                          DSEInvalidRequestException,
                          DSEInvalidArgumentException,
                          DSESQLException
Decides which is going to be the current journal table for entity anEntity. It sets the entity attribute to anEntity and calls the open() method.
Parameters:
anEntity - java.lang.String, the name of the entity
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

openForEntity

public void openForEntity(java.lang.String anEntity,
                          java.lang.String aSchemaName)
                   throws DSEInternalErrorException,
                          DSEInvalidRequestException,
                          DSEInvalidArgumentException,
                          DSESQLException
Decides which is going to be the current journal table for entity anEntity. It sets the entity attribute to anEntity and the schemaName attribute to aSchemaName, and calls the open() method.
Parameters:
anEntity - java.lang.String, the name of the entity
aSchemaName - java.lang.String, the name of the schema
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

openForSchema

public void openForSchema(java.lang.String aSchemaName)
                   throws DSEInternalErrorException,
                          DSEInvalidRequestException,
                          DSEInvalidArgumentException,
                          DSESQLException
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.
Parameters:
aSchemaName - java.lang.String, the name of the journal schema
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

queryLastRecordNumber

public int queryLastRecordNumber()
                          throws DSESQLException,
                                 DSEInternalErrorException
Gets the last record number from the journal table
Returns:
int - the number of the retrieved record
Throws:
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

retrieveLastRecord

public Hashtable retrieveLastRecord()
                             throws DSEInternalErrorException,
                                    DSEInvalidArgumentException,
                                    DSESQLException
Retrieves the last record from the journal table.
Returns:
com.ibm.dse.base.Hashtable, the retrieved record as a hash table.
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 void retrieveLastRecord(Context aContext,
                               HashtableFormat aHashtableFormat)
                        throws DSEInvalidRequestException,
                               DSEInternalErrorException,
                               DSEInvalidArgumentException,
                               DSESQLException
Retrieves the last record from the current journal table and updates the context aContext with the retrieved values.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat, the format to be used to update the context
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 void retrieveLastRecord(Context aContext,
                               java.lang.String aFormatName)
                        throws DSEInvalidRequestException,
                               DSEInternalErrorException,
                               DSEInvalidArgumentException,
                               DSESQLException
Retrieves the last record from the journal table and updates the context aContext with the retrieved values.
Parameters:
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String, the name of the format to be used to update the context
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 Vector retrieveLastRecords(int aNumber)
                           throws DSEInternalErrorException,
                                  DSEInvalidArgumentException,
                                  DSEInvalidRequestException,
                                  DSESQLException
Returns the last aNumber records from the journal table.
Parameters:
aNumber - int, the number of records to be retrieved
Returns:
com.ibm.dse.base.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 SQL Exception is caught

retrieveLastRecords

public void retrieveLastRecords(int aNumber,
                                Context aContext,
                                HashtableIndexedCollectionFormat anOutputFormat)
                         throws DSEInternalErrorException,
                                DSEInvalidArgumentException,
                                DSEInvalidRequestException,
                                DSESQLException,
                                DSEObjectNotFoundException
Retrieves the last aNumber records from the journal table and unformats them into the context aContext using the formatter anOutputFormat.
Parameters:
aNumber - int, the number of records to retrieve
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 SQL Exception is caught
DSESObjectNotFoundException - if an object is not found

retrieveLastRecords

public void retrieveLastRecords(int aNumber,
                                Context aContext,
                                java.lang.String anOutputFormatName)
                         throws DSEInternalErrorException,
                                DSEInvalidArgumentException,
                                DSEInvalidRequestException,
                                DSESQLException,
                                DSEObjectNotFoundException
Retrieves the last aNumber records from the journal table and unformats them into the context aContext using the formatter named anOutputFormatName.
Parameters:
aNumber - int, the number of records to retrieve
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 SQL Exception is caught
DSESObjectNotFoundException - if an object is not found

retrieveRecord

public Hashtable retrieveRecord(int aRecordNumber)
                         throws DSEInternalErrorException,
                                DSEInvalidArgumentException,
                                DSESQLException
Retrieves the record from the journal table that is identified by aRecordNumber.
Parameters:
aRecordNumber - int
Returns:
com.ibm.dse.base.Hashtable - the retrieved record as a hash table
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 void retrieveRecord(int aRecordNumber,
                           Context aContext,
                           HashtableFormat aHashtableFormat)
                    throws DSEInvalidRequestException,
                           DSEInternalErrorException,
                           DSEInvalidArgumentException,
                           DSESQLException
Updates the context aContext with the data in the record in the current journal table that is identified by aRecordNumber.
Parameters:
aRecordNumber - int
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat, the format to be used to update the context
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 void retrieveRecord(int aRecordNumber,
                           Context aContext,
                           java.lang.String aFormatName)
                    throws DSEInvalidRequestException,
                           DSEInternalErrorException,
                           DSEInvalidArgumentException,
                           DSESQLException
Updates the context aContext with the data in the record in the current journal table that is identified by aRecordNumber.
Parameters:
aRecordNumber - int
aContext - com.ibm.dse.base.Context
aFormatName - java.lang.String, the name of the format to be used to update the context
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 Vector retrieveRecords(java.lang.String aSearchCondition)
                       throws DSEInternalErrorException,
                              DSEInvalidRequestException,
                              DSEInvalidArgumentException,
                              DSESQLException
Retrieves all of the records from the journal table that match the search condition.
Parameters:
aSearchCondition - java.lang.String
Returns:
Vector - a vector with all retrieved records as hash tables
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

retrieveRecords

public void retrieveRecords(java.lang.String aSearchCondition,
                            Context aContext,
                            HashtableIndexedCollectionFormat anOutputFormat)
                     throws DSEInternalErrorException,
                            DSEInvalidRequestException,
                            DSEInvalidArgumentException,
                            DSESQLException,
                            DSEObjectNotFoundException
Retrieves all the records within the current journal that match aSearchCondition. The retrieved records are then unformatted into the context aContext using anOutputFormat.
Parameters:
aSearchCondition - java.lang.String, the search condition in SQL format
aContext - com.ibm.dse.base.Context the context to where the retrieved records will be unformatted
anOutputFormat - com.ibm.dse.base.HashtableIndexedCollectionFormat, the formatter to unformat the retrieved records
Throws:
DSEInvalidRequestException - if the request is not valid
DSEInvalidArgumentException - if the argument(s) is(are) not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught
DSESObjectNotFoundException - if an object is not found

retrieveRecords

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

retrieveRecords

public Vector retrieveRecords(java.lang.String aSearchCondition,
                              Vector aColumnsVector)
                       throws DSEInternalErrorException,
                              DSEInvalidRequestException,
                              DSEInvalidArgumentException,
                              DSESQLException
Retrieves the columns in aColumnsVector of all the records within the journal table that match the search condition. The format used to put the retrieved data into the operation context must only unformat the returned column values.
Parameters:
aSearchCondition - java.lang.String, the search condition in SQL format
aColumnsVector - com.ibm.dse.base.Vector, the vector that contains the columns to be retrieved
Returns:
com.ibm.dse.base.Vector - the vector of hash tables with 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 SQL Exception is caught

retrieveRecords

public void retrieveRecords(java.lang.String aSearchCondition,
                            Vector aColumnsVector,
                            Context aContext,
                            HashtableIndexedCollectionFormat anOutputFormat)
                     throws DSEInternalErrorException,
                            DSEInvalidRequestException,
                            DSEInvalidArgumentException,
                            DSESQLException,
                            DSEObjectNotFoundException
Retrieves the columns in aColumnsVector of all the records within the current journal that match aSearchCondition. The retrieved records are then unformatted into the context aContext using anOutputFormat.
Parameters:
aSearchCondition - java.lang.String, the search condition in SQL format
aColumnsVector - com.ibm.dse.base.Vector, the vector that contains the columns to be retrieved
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 SQL Exception is caught
DSEObjectNotFoundException - if an object is not found

retrieveRecords

public void retrieveRecords(java.lang.String aSearchCondition,
                            Vector aColumnsVector,
                            Context aContext,
                            java.lang.String anOutputFormatName)
                     throws DSEInternalErrorException,
                            DSEInvalidRequestException,
                            DSEInvalidArgumentException,
                            DSESQLException,
                            DSEObjectNotFoundException
Retrieves the columns in aColumnsVector of all the records within the current journal that match aSearchCondition. The retrieved records are then unformatted into the context aContext using the format named anOutputFormatName.
Parameters:
aSearchCondition - java.lang.String, the search condition in SQL format
aColumnsVector - com.ibm.dse.base.Vector, the vector that contains the columns to be retrieved
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 SQL Exception is caught
DSEObjectNotFoundException - if an object is not found

rollback

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

setAutoCommit

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

setCreateSchema

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

setEntity

public void setEntity(java.lang.String anEntityName)
Sets the entityName attribute value.
Parameters:
anEntityName - java.lang.String

setJDBCDriver

public 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.
Parameters:
newJDBCDriver - java.lang.String

setSchemaName

public void setSchemaName(java.lang.String aSchemaName)
Sets the schemaName attribute to aSchemaName.
Parameters:
aSchemaName - java.lang.String

updateLastRecord

public int updateLastRecord(Context aContext,
                            HashtableFormat aHashtableFormat)
                     throws DSEInvalidRequestException,
                            DSEInternalErrorException,
                            DSEInvalidArgumentException,
                            DSESQLException
Updates the last record of the current journal table with the data in aContext.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat, the format to be used to update the context
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 int updateLastRecord(Context aContext,
                            HashtableFormat aHashtableFormat,
                            Vector aColumnsVector)
                     throws DSEInvalidRequestException,
                            DSEInternalErrorException,
                            DSEInvalidArgumentException,
                            DSESQLException
Updates the columns specified in aColumnsVector for the last record of the current journal table.
Parameters:
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

updateLastRecord

public int updateLastRecord(Context aContext,
                            java.lang.String aFormatName)
                     throws DSEInvalidRequestException,
                            DSEInternalErrorException,
                            DSEInvalidArgumentException,
                            DSESQLException
Updates the last record of the journal table with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
Parameters:
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 SQL Exception is caught

updateLastRecord

public int updateLastRecord(Context aContext,
                            java.lang.String aFormatName,
                            Vector aColumnsVector)
                     throws DSEInvalidRequestException,
                            DSEInternalErrorException,
                            DSEInvalidArgumentException,
                            DSESQLException
Updates the columns in aColumnsVector for the last record of the current journal table. .
Parameters:
aContext - com.ibm.dse.base.Context, the context with the data
aFormatName - java.lang.String, the journal format name to be used
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

updateLastRecord

public int updateLastRecord(Hashtable aDataHashtable)
                     throws DSEInvalidRequestException,
                            DSEInternalErrorException,
                            DSEInvalidArgumentException,
                            DSESQLException
Updates the last record of the journal table with the data in aDataHashtable.
Parameters:
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 SQL Exception is caught

updateLastRecord

public int updateLastRecord(Hashtable aDataHashtable,
                            Vector aColumnsVector)
                     throws DSEInvalidRequestException,
                            DSEInternalErrorException,
                            DSEInvalidArgumentException,
                            DSESQLException
Updates the columns in aColumnsVector for the last record of the current journal table with the data in aDataHashtable.
Parameters:
aDataHashtable - Hashtable, the Hashtable that contains the data
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

updateRecord

public int updateRecord(int aRecordNumber,
                        Context aContext,
                        HashtableFormat aHashtableFormat)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException
Updates the record with the record identification in the database aRecordNumber.
Parameters:
aRecordNumber - 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 SQL Exception is caught

updateRecord

public int updateRecord(int aRecordNumber,
                        Context aContext,
                        HashtableFormat aHashtableFormat,
                        Vector aColumnsVector)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException
Updates the columns in aColumnsVector for the record identified by aRecordNumber within the journal table.
Parameters:
aRecordNumber - int, the number of the record to be updated
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

updateRecord

public int updateRecord(int aRecordNumber,
                        Context aContext,
                        java.lang.String aFormatName)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException
Updates the record identified by aRecordNumber within the journal table with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
Parameters:
aRecordNumber - 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 SQL Exception is caught

updateRecord

public int updateRecord(int aRecordNumber,
                        Context aContext,
                        java.lang.String aFormatName,
                        Vector aColumnsVector)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException
Updates the columns in aColumnsVector for the record identified by aRecordNumber within the journal table.
Parameters:
aRecordNumber - int, the number of the record to be updated
aContext - com.ibm.dse.base.Context, the context with the data
aFormatName - java.lang.String, the journal format name to be used
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

updateRecord

public int updateRecord(int aRecordNumber,
                        Hashtable aDataHashtable)
                 throws DSEInvalidRequestException,
                        DSEInternalErrorException,
                        DSEInvalidArgumentException,
                        DSESQLException
Updates the record identified by aRecordNumber within the journal table with the data contained in aDataHashtable.
Parameters:
aRecordNumber - int
aDataHashtable - com.ibm.dse.base.Hashtable
Returns:
int - the row count ( number of updated records)
Throws:
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 caught

updateRecord

public int updateRecord(int aRecordNumber,
                        Hashtable aDataHashtable,
                        Vector aColumnsVector)
                 throws DSEInvalidArgumentException,
                        DSEInternalErrorException,
                        DSEInvalidRequestException,
                        DSESQLException
Updates the columns specified in aColumnsVector, for the record identified by aRecordNumber within the journal table, with the data provided in aDataHashtable. aDataHashtable should only contain the values for the columns to be updated.
Parameters:
aRecordNumber - int, the number of the record to be updated
aDataHashtable - com.ibm.dse.base.Hashtable, the Hashtable that contains the new data
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid.
DSEInternalErrorException - if an internal program error occurs.
DSEInvalidRequestException - if the request is not valid.
DSESQLException - if an SQL Exception is caught.

updateRecords

public int updateRecords(java.lang.String aSearchCondition,
                         Context aContext,
                         HashtableFormat aHashtableFormat)
                  throws DSEInvalidArgumentException,
                         DSEInvalidRequestException,
                         DSEInternalErrorException,
                         DSESQLException
Updates all of the current journal table records that match the search condition passed as an argument with the data obtained by formatting aContext using the journal format aHashtableFormat.
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 int updateRecords(java.lang.String aSearchCondition,
                         Context aContext,
                         HashtableFormat aHashtableFormat,
                         Vector aColumnsVector)
                  throws DSEInvalidRequestException,
                         DSEInternalErrorException,
                         DSEInvalidArgumentException,
                         DSESQLException
Updates the columns specified in aColumnsVector for all the current journal table records that match the search condition passed as an argument, with the data obtained by formatting aContext with the journal formatter aHashtableFormat.
Parameters:
aSearchCondition - java.lang.String
aContext - com.ibm.dse.base.Context
aHashtableFormat - com.ibm.dse.base.HashtableFormat
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

updateRecords

public int updateRecords(java.lang.String aSearchCondition,
                         Context aContext,
                         java.lang.String aFormatName)
                  throws DSEInvalidRequestException,
                         DSEInternalErrorException,
                         DSEInvalidArgumentException,
                         DSESQLException
Updates all of the journal table records that match the search condition with the data obtained by formatting the context aContext with the formatter identified by aFormatName.
Parameters:
aSearchCondition - java.lang.String
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 SQL Exception is caught

updateRecords

public int updateRecords(java.lang.String aSearchCondition,
                         Context aContext,
                         java.lang.String aFormatName,
                         Vector aColumnsVector)
                  throws DSEInvalidRequestException,
                         DSEInternalErrorException,
                         DSEInvalidArgumentException,
                         DSESQLException
Updates the columns specified in aColumnsVector for all the current journal table records that match the search condition passed as an argument, with the data obtained by formatting aContext with the formatter defined by aFormatName.
Parameters:
aSearchCondition - java.lang.String, the search condition
aContext - com.ibm.dse.base.Context, the context with the data
aFormatName - java.lang.String, the journal format name that defines the formatter to be used
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if an argument is not valid
DSEInvalidRequestException - if the input parameters are not valid
DSEInternalErrorException - if an internal program error occurs
DSESQLException - if an SQL Exception is caught

updateRecords

public int updateRecords(java.lang.String aSearchCondition,
                         Hashtable aDataHashtable)
                  throws DSEInvalidRequestException,
                         DSEInternalErrorException,
                         DSEInvalidArgumentException,
                         DSESQLException
Updates all of the journal table records that match the search condition with the data contained in aDataHashtable.
Parameters:
aSearchCondition - java.lang.String
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 SQL Exception is caught

updateRecords

public int updateRecords(java.lang.String aSearchCondition,
                         Hashtable aDataHashtable,
                         Vector aColumnsVector)
                  throws DSEInvalidArgumentException,
                         DSEInternalErrorException,
                         DSEInvalidRequestException,
                         DSESQLException
Updates the columns specified in aColumnsVector for the records matching the search condition within the journal table, with the data provided in aDataHashtable. aDataHashtable should only contain the values for the columns to be updated.
Parameters:
aSearchCondition - java.lang.String, the search condition
aDataHashtable - com.ibm.dse.base.Hashtable, the Hashtable that contains the new data
aColumnsVector - com.ibm.dse.base.Vector, the columns to be changed
Returns:
int - the row count ( number of updated records)
Throws:
DSEInvalidArgumentException - if the argument(s) is(are) not valid.
DSEInternalErrorException - if an internal program error occurs.
DSEInvalidRequestException - if the request is not valid.
DSESQLException - if an SQL Exception is caught.