|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object | +--com.ibm.dse.base.DSENotifier | +--com.ibm.dse.base.Service | +--com.ibm.dse.services.jdbc.JDBCService | +--com.ibm.dse.services.jdbc.Store
The Store class is a subclass of the service that defines the abstract methods that are needed by any store service implementation. Since it is a service, it has an externalizer that allows you to define any store object attributes in an external XML file (these attributes values are then used when the store object is instantiated), and it inherits all service attributes; for example, the name attribute that allows you to request a specific store service instance in the application hierarchy of contexts. A store object is then usually instantiated by providing the name of the service to be created to the ServiceExternalizer class. The ServiceExternalizer creates an instance of the class that is identified by the name (in this case, a store) 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. |
protected java.lang.String |
state
Keeps the status of the store service |
protected java.lang.String |
tableName
Keeps the name of the store table |
Fields inherited from class com.ibm.dse.services.jdbc.JDBCService |
autoCommit,
connectionProperties,
databaseConnection,
databaseURL,
dataSourceName,
metaData,
password,
poolName,
sharedConnection,
user,
waitRetry |
Fields inherited from class com.ibm.dse.base.Service |
externalizer |
Fields inherited from class com.ibm.dse.base.DSENotifier |
handlersList,
name |
Constructor Summary | |
Store()
|
Method Summary | |
abstract int |
addRecord(Context aContext,
HashtableFormat aHashtableFormat)
Adds a record to the store table. |
abstract int |
addRecord(Context aContext,
java.lang.String aFormatName)
Adds a record to the store table. |
abstract int |
addRecord(Hashtable aDataHashtable)
Inserts the data from aHashtable as a new row into the current store table. |
void |
close()
Sets the state of the Store object to INACTIVE. |
abstract void |
commit()
Commits all changes to the database. |
abstract int |
deleteAllRetrievedForForwarding()
Deletes all records marked as retrievedForForwarding from the store table. |
abstract int |
deleteRecord(int aRecordId)
Deletes the record whose identifier is aRecordId from the store table. |
abstract int |
deleteRecords(java.lang.String aSelectionCriteria)
Deletes all the records within the store table that match the selection criteria. |
java.lang.String |
getTableName()
Returns the tableName attribute value. |
boolean |
isActive()
Returns true if the current state of the Store instance is ACTIVE. |
abstract void |
markRecordRetrievedForForwarding(int aRecordId)
Marks the store table record identified by aRecordId with the record mark retrievedForForwarding. |
void |
open()
Sets the state of the Store instance to ACTIVE. |
abstract Hashtable |
retrieveFirstRecord()
Returns the first record in the database. |
abstract int |
retrieveFirstRecord(Context aContext,
HashtableFormat aHashtableFormat)
Retrieves the first record in the store table and returns its recordId. |
abstract int |
retrieveFirstRecord(Context aContext,
java.lang.String aFormatName)
Retrieves the first record in the store table and returns its recordId. |
abstract Hashtable |
retrieveFirstRecordForForwarding()
Returns the first record in the database and identifies it as being retrieved for forwarding. |
abstract 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. |
abstract void |
retrieveFirstRecordForForwarding(Context aContext,
java.lang.String aFormatName)
Returns the first record in the database and updates the context aContext by unformatting the retrieved record using the format identified by aFormatName. |
abstract Hashtable |
retrieveNextRecord()
Returns the next record from the current cursor in the store table. |
abstract int |
retrieveNextRecord(Context aContext,
HashtableFormat aHashtableFormat)
Retrieves the next record from the current cursor in the store table and returns its recordId. |
abstract int |
retrieveNextRecord(Context aContextName,
java.lang.String aFormatName)
Retrieves the next record from the current cursor in the store table and returns its recordId. |
abstract Hashtable |
retrieveNextRecordForForwarding()
Returns the next record from the current cursor in the store table and identifies it as being retrieved for forwarding. |
abstract 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. |
abstract 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. |
abstract Hashtable |
retrieveRecord(int aRecordId)
Retrieves a record of the store table with an specific recordId. |
abstract void |
retrieveRecord(int aRecordId,
Context aContext,
HashtableFormat aHashtableFormat)
Retrieves a record of the store table with an specific recordId. |
abstract void |
retrieveRecord(int aRecordId,
Context aContext,
java.lang.String aFormatName)
Retrieves a record of the store table with an specific recordId. |
abstract Hashtable |
retrieveRecord(java.lang.String aSelectionCriteria)
Retrieves the first record of the store table that matches the selection criteria. |
abstract int |
retrieveRecord(java.lang.String aSelectionCriteria,
Context aContext,
HashtableFormat aHashtableFormat)
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 aHashtableFormat. |
abstract int |
retrieveRecord(java.lang.String aSelectionCriteria,
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. |
abstract Vector |
retrieveRecordsForForwarding(java.lang.String aSearchCondition)
Retrieves all of the records from the store table that match the search condition. |
abstract void |
retrieveRecordsForForwarding(java.lang.String aSearchCondition,
Context aContext,
HashtableIndexedCollectionFormat anOutputFormat)
Retrieves all the records of the store table that match aSearchCondition. |
abstract void |
retrieveRecordsForForwarding(java.lang.String aSearchCondition,
Context aContext,
java.lang.String anOutputFormatName)
Retrieves all the records of the store table that match aSearchCondition. |
abstract void |
rollback()
Rolls back all changes made to the database. |
void |
setTableName(java.lang.String aTableName)
Sets the tableName attribute value of the Store instance to aTableName. |
abstract int |
updateRecord(int aRecordId,
Context aContext,
HashtableFormat aHashtableFormat)
Updates the store table record that has an identifier that equals aRecordId with the data obtained by formatting the context aContext with the formatter aHashtableFormat. |
abstract int |
updateRecord(int aRecordId,
Context aContext,
java.lang.String aFormatName)
Updates 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. |
abstract int |
updateRecord(int aRecordId,
Hashtable aDataHashtable)
Updates the store table record that has an identifier that equals aRecordId with the data in aDataHashtable. |
Methods inherited from class com.ibm.dse.base.Service |
externalizer,
getExternalizer,
getTagName,
initializeFrom,
readExternal,
readExternal,
readObject,
removeExternal,
setExternalizer,
terminate,
toString,
toStrings,
toTags,
writeExternal,
writeExternal |
Methods inherited from class com.ibm.dse.base.DSENotifier |
addHandler,
getHandlersList,
getName,
removeHandler,
setName,
signalEvent,
signalEvent,
signalEvent |
Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
Field Detail |
public static final java.lang.String COMPID
protected java.lang.String tableName
protected java.lang.String state
Constructor Detail |
public Store()
Method Detail |
public abstract int addRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEInvalidClassException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic abstract 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 abstract int addRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
aDataHashtable
- Hashtablepublic void close()
public abstract void commit() throws DSESQLException
public abstract int deleteAllRetrievedForForwarding() throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
public abstract int deleteRecord(int aRecordId) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordId
- intpublic abstract int deleteRecords(java.lang.String aSelectionCriteria) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSelectionCriteria
- java.lang.Stringpublic java.lang.String getTableName()
public boolean isActive()
public abstract void markRecordRetrievedForForwarding(int aRecordId) throws DSEInternalErrorException, DSESQLException
aRecordId
- intpublic void open() throws DSEInvalidRequestException
public abstract Hashtable retrieveFirstRecord() throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
public abstract int retrieveFirstRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic abstract int retrieveFirstRecord(Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic abstract Hashtable retrieveFirstRecordForForwarding() throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
public abstract void retrieveFirstRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic abstract void retrieveFirstRecordForForwarding(Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic abstract Hashtable retrieveNextRecord() throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
public abstract int retrieveNextRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic abstract int retrieveNextRecord(Context aContextName, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic abstract Hashtable retrieveNextRecordForForwarding() throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
public abstract void retrieveNextRecordForForwarding(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic abstract 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 abstract Hashtable retrieveRecord(int aRecordId) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordId
- int, the record Identifierpublic abstract 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 abstract 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 abstract Hashtable retrieveRecord(java.lang.String aSelectionCriteria) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSelectionCriteria
- java.lang.Stringpublic abstract 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 abstract int retrieveRecord(java.lang.String aSelectionCriteria, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, java.io.IOException
aSearchCriteria
- java.lang.StringaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic abstract Vector retrieveRecordsForForwarding(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.Stringpublic abstract 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 abstract 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 abstract void rollback() throws DSESQLException
public void setTableName(java.lang.String aTableName)
aTableName
- java.lang.String the namepublic abstract 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 abstract 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 abstract int updateRecord(int aRecordId, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aRecordId
- intaDataHashtable
- com.ibm.dse.base.Hashtable
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |