|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The StoreService interface provides the public methods that are used for store services. 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 store database table using the data available in the context aContext. |
int |
addRecord(Context aContext,
java.lang.String aFormatName)
Adds a record into the store table. |
int |
addRecord(Hashtable aDataHashtable)
Adds a record into the store table with the data in aDataHashtable. |
void |
close()
Closes the store service, which means that no more database operations can be performed using it. |
void |
commit()
Commits all changes to the database. |
int |
deleteAllRetrievedForForwarding()
Deletes all of the records in the store table that are marked as retrievedForForwarding. |
int |
deleteRecord(int aRecordId)
Deletes the record in the store table that is identified by aRecordId. |
int |
deleteRecords(java.lang.String aSearchCondition)
Deletes the records in the store table that match the search criteria. |
boolean |
getAutoCommit()
Returns the autoCommit attribute value. |
Hashtable |
getColumnsTable()
Returns the columnsTable attribute value. |
java.lang.String |
getFullTableName()
Gets the full table name (schemaName + tableName). |
int |
getLastRecordNumber()
Returns the last record number that has been retrieved from the database. |
java.lang.String |
getSchemaName()
Returns the schema attribute value. |
java.lang.String |
getTableName()
Returns the store table name. |
boolean |
isActive()
Answer true if the store is ready to run any database operation. |
void |
loadDriver()
Loads the default database JDBC Driver set by the user in the StoreConstants class. |
void |
loadDriver(java.lang.String aDriverName)
Loads the database JDBC Driver provided as an argument. |
void |
open()
Sets the store instance so it is ready to receive any database operation request. |
Hashtable |
retrieveFirstRecord()
Return the first record of the store table. |
int |
retrieveFirstRecord(Context aContext,
HashtableFormat aHashtableFormat)
Retrieves the first record in the store table and returns its recordId. |
int |
retrieveFirstRecord(Context aContext,
java.lang.String aForamtName)
Retrieves the first record in the store table and returns its recordId. |
Hashtable |
retrieveFirstRecordForForwarding()
Returns the first record in the store table and identifies it as being retrieved by the forwarder application. |
void |
retrieveFirstRecordForForwarding(Context aContext,
HashtableFormat aHashtableFormat)
Returns the first record in the database and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat. |
void |
retrieveFirstRecordForForwarding(Context aContext,
java.lang.String aFoematName)
Returns the first record in the database and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. |
int |
retrieveLastRecordNumber()
Returns the last record number in the store table. |
Hashtable |
retrieveNextRecord()
Returns the next record from the current store table cursor. |
int |
retrieveNextRecord(Context aContext,
HashtableFormat aHashtableFormat)
Retrieves the next record from the current cursor in the store table and returns its recordId. |
int |
retrieveNextRecord(Context aContext,
java.lang.String aFormatName)
Retrieves the next record from the current cursor in the store table and returns its recordId. |
Hashtable |
retrieveNextRecordForForwarding()
Returns the next record from the current store table cursor and identifies it as being retrieved by the forwarder application. |
void |
retrieveNextRecordForForwarding(Context aContext,
HashtableFormat aHashtableFormat)
Returns the next record from the current cursor in the store table and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat.It also identifies the record as being retrieved for forwarding. |
void |
retrieveNextRecordForForwarding(Context aContext,
java.lang.String aFormatName)
Returns the next record from the current cursor in the store table and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. |
Hashtable |
retrieveRecord(int aRecordId)
Retrieves a record of the store table with an specific recordId. |
void |
retrieveRecord(int aRecordId,
Context aContext,
HashtableFormat aHashtableFormat)
Retrieves a record of the store table with an specific recordId. |
void |
retrieveRecord(int aRecordId,
Context aContext,
java.lang.String aFormatName)
Retrieves a record of the store table with an specific recordId. |
Hashtable |
retrieveRecord(java.lang.String aSearchCondition)
Retrieves the first record from the store table that matches the selection criteria. |
int |
retrieveRecord(java.lang.String aSelectionCriteria,
Context aContext,
HashtableFormat aHashtableFormat)
Retrieves the first record of the store table that matches the selection criteria and returns its recordId. |
int |
retrieveRecord(java.lang.String aSelectionCriteria,
Context aContext,
HashtableFormat aHashtableFormat,
Vector aColumnsVector)
Retrieves the columns in aColumnsVector of the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format aHashtableFormat. |
int |
retrieveRecord(java.lang.String aSearchCondition,
Context aContext,
java.lang.String aFormatName)
Retrieves the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. |
int |
retrieveRecord(java.lang.String aSearchCondition,
Context aContext,
java.lang.String aFormatName,
Vector aColumnsVector)
Retrieves the columns in aColumnsVector of the first record of the store table that matches the selection criteria and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. |
Hashtable |
retrieveRecord(java.lang.String aSearchCondition,
Vector aColumnsVector)
Retrieves the columns in aColumnsVector of the first record from the store table that matches the selection criteria. |
Hashtable |
retrieveRecordForForwarding(int aRecordId)
Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding. |
void |
retrieveRecordForForwarding(int aRecordId,
Context aContext,
HashtableFormat aHashtableFormat)
Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding. |
void |
retrieveRecordForForwarding(int aRecordId,
Context aContext,
java.lang.String aFormatName)
Retrieves a record of the store table with an specific recordId and marks it as retrievedForForwarding. |
Hashtable |
retrieveRecordForForwarding(java.lang.String aSelectionCriteria)
Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding. |
int |
retrieveRecordForForwarding(java.lang.String aSelectionCriteria,
Context aContext,
HashtableFormat aHashtableFormat)
Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding. |
int |
retrieveRecordForForwarding(java.lang.String aSelectionCriteria,
Context aContext,
java.lang.String aFormatName)
Retrieves the first record of the store table that matches the selection criteria and marks it as retrievedForForwarding. |
Vector |
retrieveRecordsForForwarding(java.lang.String aSearchCondition)
Retrieves all of the records from the store table that match the search condition. |
void |
retrieveRecordsForForwarding(java.lang.String aSearchCondition,
Context aContext,
HashtableIndexedCollectionFormat anOutputFormat)
Retrieves all the records of the store table that match aSearchCondition. |
void |
retrieveRecordsForForwarding(java.lang.String aSearchCondition,
Context aContext,
java.lang.String anOutputFormatName)
Retrieves all the records of the store table that match aSearchCondition. |
void |
rollback()
Rolls back all database changes. |
void |
setAutoCommit(boolean aBoolean)
Sets the autoCommit attribute value to aBoolean. |
void |
setSchemaName(java.lang.String s)
Sets the schema attribute to the string provided as an argument. |
void |
setTableName(java.lang.String aTableName)
Sets the name of the store table. |
int |
updateRecord(int aRecordId,
Context aContext,
HashtableFormat aHashtableFormat)
Updates the record of the store table, which is identified by aRecordId, with the data obtained by the formatting the context aContext data with the formatter aHashtableFormat. |
int |
updateRecord(int aRecordId,
Context aContext,
HashtableFormat aHashtableFormat,
Vector aColumnsVector)
Updates the columns in aColumnsVector for the store table record that has an identifier that equals aRecordId with the data obtained by formatting the context aContext, with the formatter aHashtableFormat. |
int |
updateRecord(int aRecordId,
Context aContext,
java.lang.String aFormatName)
Updates the record from the store table, which is identified by aRecordId, with the data obtained by formatting the context aContext data with the formatter identified by aFormatName. |
int |
updateRecord(int aRecordId,
Context aContext,
java.lang.String aFormatName,
Vector aColumnsVector)
Updates the columns in aColumnsVector for the store table record that has an identifier that equals aRecordId, with the data obtained by formatting the context aContext with the formatter identified by aFormatName. |
int |
updateRecord(int aRecordId,
Hashtable aDataHashtable)
Updates the record from the store table, which is identified by aRecordId, with the data contained in aDataHashtable hash table. |
int |
updateRecord(int aRecordId,
Hashtable aDataHashtable,
Vector aColumnsVector)
Updates the columns in aColumnVector for the store table record that has an identifier that equals aRecordId, with the data 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 |
public int addRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEInvalidClassException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic int addRecord(Context aContext, java.lang.String aFormatName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEInvalidClassException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic int addRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aDataHashtable
- Hashtablepublic void close()
public void commit() throws DSESQLException
public int deleteAllRetrievedForForwarding() throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
public int deleteRecord(int aRecordId) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aRecordId
- intpublic int deleteRecords(java.lang.String aSearchCondition) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aSearchCondition
- java.lang.String, the search criteria in SQL formatpublic boolean getAutoCommit()
public Hashtable getColumnsTable()
public java.lang.String getFullTableName()
public int getLastRecordNumber()
aRecordNumber
- intpublic java.lang.String getSchemaName()
public java.lang.String getTableName()
public boolean isActive()
public void loadDriver() throws DSEInternalErrorException
public void loadDriver(java.lang.String aDriverName) throws DSEInternalErrorException
aDriverName
- java.lang.String, the driver name (full path)public void open() throws DSEInternalErrorException, DSEInvalidRequestException
public Hashtable retrieveFirstRecord() throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
public int retrieveFirstRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic int retrieveFirstRecord(Context aContext, java.lang.String aForamtName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic Hashtable retrieveFirstRecordForForwarding() throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
public void retrieveFirstRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic void retrieveFirstRecordForForwarding(Context aContext, java.lang.String aFoematName) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic int retrieveLastRecordNumber() throws DSESQLException, DSEInternalErrorException
public Hashtable retrieveNextRecord() throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException
public int retrieveNextRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic int retrieveNextRecord(Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic Hashtable retrieveNextRecordForForwarding() throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException
public void retrieveNextRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic void retrieveNextRecordForForwarding(Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic Hashtable retrieveRecord(int aRecordId) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordId
- int, the record Identifierpublic void retrieveRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaSelectionCriteria
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic void retrieveRecord(int aRecordId, Context aContext, java.lang.String aFormatName) throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException, java.io.IOException
aRecordId
- intaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic Hashtable retrieveRecord(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.String the search conditionpublic int retrieveRecord(java.lang.String aSelectionCriteria, Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSelectionCriteria
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic int retrieveRecord(java.lang.String aSelectionCriteria, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSelectionCriteria
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormataColumnsVector
- com.ibm.dse.base.Vector, the vector that contains the columns to be retrievedpublic int retrieveRecord(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aSearchCondition
- java.lang.StringaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic int retrieveRecord(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aSearchCondition
- java.lang.StringaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.StringaColumnsVector
- com.ibm.dse.base.Vector, the vector that contains the columns to be retrievedpublic Hashtable retrieveRecord(java.lang.String aSearchCondition, Vector aColumnsVector) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.String the search conditionaColumnsVector
- com.ibm.dse.base.Vector, the vector that contains the columns to be retrievedpublic Hashtable retrieveRecordForForwarding(int aRecordId) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordId
- int, the record Identifierpublic void retrieveRecordForForwarding(int aRecordId, Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaSelectionCriteria
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic void retrieveRecordForForwarding(int aRecordId, Context aContext, java.lang.String aFormatName) throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException, java.io.IOException
aRecordId
- intaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic Hashtable retrieveRecordForForwarding(java.lang.String aSelectionCriteria) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSelectionCriteria
- java.lang.String, the selection criteria in SQL formatpublic int retrieveRecordForForwarding(java.lang.String aSelectionCriteria, Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaSelectionCriteria
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic int retrieveRecordForForwarding(java.lang.String aSelectionCriteria, Context aContext, java.lang.String aFormatName) throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException, java.io.IOException
aSelectionCriteria
- java.lang.StringaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic Vector retrieveRecordsForForwarding(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.Stringpublic void retrieveRecordsForForwarding(java.lang.String aSearchCondition, Context aContext, HashtableIndexedCollectionFormat anOutputFormat) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEObjectNotFoundException, java.io.IOException
aSearchCondition
- java.lang.String, the search condition in SQL formataContext
- com.ibm.dse.base.Context the context to where the retrieved records will be unformattedanOutputFormat
- com.ibm.dse.base.HashtableIndexedCollectionFormat, the formatter to unformat the retrieved recordspublic void retrieveRecordsForForwarding(java.lang.String aSearchCondition, Context aContext, java.lang.String anOutputFormatName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEObjectNotFoundException, java.io.IOException
aSearchCondition
- java.lang.String, the search condition in SQL formataContext
- com.ibm.dse.base.Context the context to where the retrieved records will be unformattedanOutputFormatName
- java.lang.String, the name of the formatter to unformat the retrieved recordspublic void rollback() throws DSESQLException
public void setAutoCommit(boolean aBoolean)
aBoolean
- booleanpublic void setSchemaName(java.lang.String s)
s
- java.lang.Stringpublic void setTableName(java.lang.String aTableName)
aTableName
- java.lang.Stringpublic int updateRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, DSEInvalidClassException
aRecordId
- intaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic int updateRecord(int aRecordId, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidClassException, DSESQLException
aRecordId
- intaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormataColumnsVector
- com.ibm.dse.base.Vector, the columns to be changedpublic int updateRecord(int aRecordId, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, DSEInvalidClassException, java.io.IOException
aRecordId
- intaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic int updateRecord(int aRecordId, Context aContext, java.lang.String aFormatName, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, DSEInvalidClassException, java.io.IOException
aRecordId
- intaContext
- com.ibm.dse.base.ContextaFormatName
- String, the name of the formatter to be usedaColumnsVector
- com.ibm.dse.base.Vector, the columns to be updatedpublic int updateRecord(int aRecordId, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordId
- intaDataHashtable
- com.ibm.dse.base.Hashtablepublic int updateRecord(int aRecordId, Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordId
- intaDataHashtable
- com.ibm.dse.base.Hashtable, the hashtable that contains the new dataaColumnsVector
- com.ibm.dse.base.Vector, the columns to be updated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |