|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ibm.btt.base.Service
com.ibm.btt.services.BTTServiceImpl
com.ibm.btt.services.PoolableServiceImpl
com.ibm.btt.services.jdbcservicesinfra.JDBCServiceImpl
com.ibm.btt.services.jdbcjournalservice.JournalImpl
com.ibm.btt.services.jdbcjournalservice.JDBCJournalImpl
The JDBCJournalImpl class is a concrete class that represents a Financial Electronic Journal to provide an implementation of the JournalImpl abstraction. The JDBCJournal uses the JDBC interface to access the database and can be used with any DBMS providing an implementation of this interface.
Field Summary | |
---|---|
protected Hashtable |
columnsTable
Contains information about the relationship between a column in the database table and a data field in the context. |
protected boolean |
createSchema
Keeps whether the journal schema was also created in the database or not. |
protected java.lang.String |
date
Keeps the today date |
protected int |
lastRecordNumberFromTable
|
protected static java.lang.Object |
poolSem
|
protected static java.lang.Object |
resetSem
|
protected java.lang.String |
schemaName
Keeps the name of the schema where all journal tables are defined. |
protected static boolean |
singleTableReset
|
protected java.lang.String |
tableName
Keeps the table name that is schemaName.entity_wrapNumber. |
protected static java.lang.String |
var_insert
|
protected static java.lang.String |
var_update
|
protected static java.lang.String |
var_where
|
protected int |
wrapNumber
Keeps the number of the generation being used by the current journal. |
Fields inherited from class com.ibm.btt.services.jdbcjournalservice.JournalImpl |
---|
COMPID, currentSingleTableReset, entity, fromPool, lastRecordNumber, recIdFromTable, recIdSem, singleTable, singleTableLastRecordNumber |
Fields inherited from class com.ibm.btt.services.jdbcservicesinfra.JDBCServiceImpl |
---|
addPstmt, addString, autoCommit, connectionProperties, databaseConnection, databaseURL, dataSourceName, metaData, operationtime, password, poolName, sharedConnection, STMT_POOL_SIZE_DEFAULT, stmtPool, stmtPoolSize, updateString, user, waitRetry |
Fields inherited from class com.ibm.btt.services.BTTServiceImpl |
---|
DEFAULT_RESPONSE |
Fields inherited from class com.ibm.btt.base.Service |
---|
externalizer, name |
Constructor Summary | |
---|---|
JDBCJournalImpl()
This constructor creates a JDBCJournal object. |
|
JDBCJournalImpl(java.lang.String anEntityName,
java.lang.String aSchemaName)
This constructor creates a JDBCJournal object. |
Method Summary | |
---|---|
int |
addRecord(Hashtable aDataHashtable)
Inserts the data in aDataHashtable as a new row in the current journal table. |
protected void |
buildAddString()
Builds an instance variable that is used when adding a record. |
protected void |
buildConnectionProperties()
Builds the hashtable containing all details needed to request the database connection. |
protected void |
buildUpdateString()
Builds an instance variable that is used when updating all columns of a record. |
void |
commit()
Commits all changes to the database. |
void |
connect(java.lang.String anUser,
java.lang.String aPassword)
Connects to the Database set in the DataSource definition, with user identification aUser and password aPassword. |
protected java.lang.String |
controlTableName()
Returns the current Control Table name. |
java.lang.String |
currentGenerationDate()
Returns the last date that the journal service was used by a specific entity. |
protected int |
currentWrapNumber()
Returns the current table generation number being used by the journal instance for the schema set in the schemaName attribute. |
protected int |
currentWrapNumberForSchema(java.lang.String aSchemaName)
Returns the current table generation number being used by the journal instance for the schema aSchemaName. |
protected void |
deleteJournalContent(int aGeneration)
Deletes the contents of a current journal table. |
protected void |
deleteRecord(int aRecordNumber)
Deletes a record in the current journal table. |
void |
disconnect()
Closes the Database connection. |
Hashtable |
getColumnsTable()
Returns the columnsTable attribute value of the current journal. |
protected java.sql.Connection |
getDatabaseConnection()
Returns the databaseConnection attribute value. |
Vector |
getEntities()
Retrieves all entities from the Database. |
int |
getLastRecordNumberFromTable()
Returns the lastRecordNumber from control table. |
int |
getNumberOfGenerations()
Returns the number of journal generations. |
java.lang.String |
getSchemaName()
Returns the schemaName attribute value. |
java.lang.String |
getTableName()
Returns the current journal tableName. |
protected int |
getWrapNumber()
Returns the wrapNumber attribute value |
java.lang.Object |
handleCommand(java.lang.String opName,
java.util.Hashtable requestParam)
handleCommand just pass parameter to service, and let the service object execute operation |
java.lang.Object |
initializeColumnFrom(Tag aTag)
Used by the JDBCJournal service externalizer to create the contents of the columnsTable instance attribute. |
java.lang.Object |
initializeFrom(Tag aTag)
Used by the services externalizer to set the JDBCJournal instance attributes as defined in the XML file. |
boolean |
isConnected()
Returns true if there is a connection to the database or false if there is not. |
boolean |
isCreateSchema()
Returns the createSchema property value. |
static boolean |
isSingleTableReset()
Returns the singleTableReset. |
boolean |
isValidEntity()
Returns true if the entity set for the current journal is valid or false if it is not. |
protected java.lang.String |
journalTableRowInsertDefinition()
Returns the Journal Table Row definition for an SQL INSERT request. |
static JDBCJournalImpl |
newFor(java.lang.String anEntityName,
java.lang.String aSchemaName)
Returns a new JDBCJournal instance with the entityName and schemaName attributes set to the provided values. |
protected int |
nextWrapNumber()
Returns the next generation number to be used for the default schema. |
protected int |
nextWrapNumberForSchema(java.lang.String aSchemaName)
Returns the next generation number available for the specified schema. |
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 a specific shema, an entity, and a generation number. |
void |
openForEntity(java.lang.String anEntity)
Opens the current journal table for anEntity. |
void |
openForEntity(java.lang.String anEntity,
java.lang.String aSchemaName)
Decides which is going to be the current journal table for anEntity. |
void |
openForSchema(java.lang.String aSchemaName)
Decides which is going to be the current journal table. |
void |
openOnCurrentTable()
Selects the already selected table generation for the current schema as the current journal table. |
void |
openOnCurrentTableForSchema(java.lang.String aSchemaName)
Selects the already selected table generation for the specified schema as the current journal table. |
void |
openOnNextTable()
Selects the next available table generation for the current schema as the current journal table. |
void |
openOnNextTableForSchema(java.lang.String aSchemaName)
Selects the next available table generation for the specified schema as the current journal table. |
int |
queryLastRecordNumber()
Returns the last record number in the current journal table. |
protected Vector |
recordToRow(Hashtable aDataHashtable)
Returns a list of ordered data field values. |
void |
resetSingleTableLastRecordNumber()
Resets the Journal last record number when different instances are accessing the same tables |
Hashtable |
retrieveLastRecord()
Retrieves the last record of the current journal table. |
Vector |
retrieveLastRecords(int aNumber)
Returns a vector with aNumber or any number between 0 and aNumber of record Hashtables. |
Hashtable |
retrieveRecord(int aRecordNumber)
Retrieves the record with the record identification in the database equal to aRecordNumber. |
Vector |
retrieveRecords(java.lang.String aSearchCondition)
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 current journal that match aSearchCondition. |
void |
rollback()
Rolls back all database changes. |
protected void |
setColumnsTable(Hashtable aColumnsHashtable)
Sets the columnsTable property to aColumnsHashtable value. |
void |
setCreateSchema(boolean newCreateSchema)
Sets the createSchema property to newCreateSchema. |
protected void |
setDatabaseConnection(java.sql.Connection aDatabaseConnection)
Sets the database connection property to aDatabaseConnection. |
void |
setEntity(java.lang.String anEntityName)
Sets the entity property value to anEntityName. |
void |
setLastRecordNumberFromTable(int aLastRecordNumberFromTable)
Sets the lastRecordNumberFromTable into control table. |
void |
setSchemaName(java.lang.String aSchemaName)
Sets the schemaName property to aSchemaName |
static void |
setSingleTableReset(boolean singleTableReset)
Sets the singleTableReset. |
protected void |
setTableName(java.lang.String aTableName)
Sets the tableName. |
protected java.lang.String |
tableName(java.lang.String aSchemaName,
java.lang.String anEntityName,
int aGeneration)
Returns the journal table name for a specific schema name, entity name and generation. |
Vector |
toStrings()
Used by the Db2Journal service externalizer. |
int |
updateLastRecord(Hashtable aDataHashtable)
Updates the last record of the current journal table with the data in aDataHashtable. |
int |
updateLastRecord(Hashtable aDataHashtable,
Vector aColumnsVector)
Updates the columns in aColumnsVector for the last record of the current journal table with the data in aDataHashtable. |
int |
updateRecord(int aRecordNumber,
Hashtable aDataHashtable)
Updates the record identified by aRecordNumber within the journal table with the data provided in aDataHashtable by calling the updateRecords(String, Hashtable) method. |
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,
Hashtable aDataHashtable)
Updates all the current journal table records that match the search condition with the aDataHashtable data. |
int |
updateRecords(java.lang.String aSearchCondition,
Hashtable aDataHashtable,
Vector aColumnsVector)
Updates the columns specified in aColumnsVector with the data provided in aDataHashtable for the records matching the search condition within the journal table. |
Methods inherited from class com.ibm.btt.services.jdbcjournalservice.JournalImpl |
---|
close, getDate, getEntity, getInUse, getLastRecordNumber, getSingleTableLastRecordNumber, getState, initialize, isActive, isCurrentSingleTableReset, isFromPool, isRecIdFromTable, isSingleTable, open, reset, setCurrentSingleTableReset, setFromPool, setInUse, setLastRecordNumber, setRecIdFromTable, setSingleTable, setSingleTableLastRecordNumber, setState, terminate, today |
Methods inherited from class com.ibm.btt.services.jdbcservicesinfra.JDBCServiceImpl |
---|
buildStatementArray, connect, getAddPstmt, getAddString, getAutoCommit, getConnectionManager, getConnectionProperties, getConnMgrID, getDataSourceName, getPassword, getUpdateString, getUser, isWaitRetry, requestConnectionToConnectionManager, requestConnectionToConnectionManager, resetOperationTime, setAddPstmt, setAddString, setAutoCommit, setConnectionManager, setConnectionProperties, setConnMgrID, setDatabaseURL, setDataSourceName, setPassword, setPoolName, setSharedConnection, setStatementPoolSize, setUpdateString, setUser, setWaitRetry, verifyConnection |
Methods inherited from class com.ibm.btt.services.PoolableServiceImpl |
---|
getGrantTime, getUID, setGrantTime, setUID |
Methods inherited from class com.ibm.btt.services.BTTServiceImpl |
---|
getInactiveTimeout, getLastAccess, processRequest, setInactiveTimeout, setLastAccess |
Methods inherited from class com.ibm.btt.base.Service |
---|
externalizer, getExternalizer, getName, getTagName, readExternal, readExternal, readObject, removeExternal, setExternalizer, setName, toString, toTags, writeExternal, writeExternal |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface com.ibm.btt.services.jdbcjournalservice.JournalService |
---|
close, open |
Methods inherited from interface com.ibm.btt.services.jdbcservicesinfra.DatabaseConnect |
---|
getDataSourceName, isWaitRetry, setDataSourceName, setWaitRetry |
Field Detail |
protected Hashtable columnsTable
protected boolean createSchema
protected java.lang.String schemaName
protected int wrapNumber
protected java.lang.String date
protected java.lang.String tableName
protected int lastRecordNumberFromTable
protected static final java.lang.String var_insert
protected static final java.lang.String var_update
protected static final java.lang.String var_where
protected static java.lang.Object resetSem
protected static java.lang.Object poolSem
protected static boolean singleTableReset
Constructor Detail |
public JDBCJournalImpl()
public JDBCJournalImpl(java.lang.String anEntityName, java.lang.String aSchemaName) throws DSEInvalidRequestException
anEntityName
- java.lang.String - the Entity nameaSchemaName
- java.lang.String - the Schema name
DSEInvalidRequestException
- if the request is not validMethod Detail |
public int addRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException
addRecord
in interface JournalService
addRecord
in class JournalImpl
aDataHashtable
- Hashtable - the Hashtable with the data to be inserted in the database table
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 caughtprotected void buildAddString() throws DSESQLException, DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSEException
buildAddString
in class JDBCServiceImpl
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of connections managerprotected void buildConnectionProperties()
buildConnectionProperties
in class JDBCServiceImpl
protected void buildUpdateString() throws DSESQLException, DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSEException
buildUpdateString
in class JDBCServiceImpl
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEException
- if an exception is thrown when calling the pool of connections managerpublic void commit() throws DSESQLException
commit
in interface JournalService
commit
in class JournalImpl
DSESQLException
- if commit failedprotected java.lang.String controlTableName()
controlTableName
in class JournalImpl
public java.lang.String currentGenerationDate() throws DSEInternalErrorException, DSESQLException
currentGenerationDate
in class JournalImpl
DSEInternalErrorException
- if an internal Program error is detected
DSESQLException
- if a SQLException occursprotected int currentWrapNumber() throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtprotected int currentWrapNumberForSchema(java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSchemaName
- java.lang.String - the journal schema name
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 caughtprotected void deleteJournalContent(int aGeneration) throws DSEInternalErrorException, DSESQLException
aGeneration
- int
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtprotected void deleteRecord(int aRecordNumber) throws DSEInternalErrorException, DSESQLException
aRecordNumber
- int
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic Hashtable getColumnsTable()
protected java.sql.Connection getDatabaseConnection()
getDatabaseConnection
in class JDBCServiceImpl
public Vector getEntities() throws DSESQLException, DSEInternalErrorException
DSESQLException
- if an SQLException is caught
DSEInternalErrorException
- if an internal program error occurspublic int getNumberOfGenerations() throws DSESQLException, DSEInternalErrorException
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic java.lang.String getSchemaName()
getSchemaName
in class JournalImpl
public java.lang.String getTableName()
getTableName
in class JournalImpl
protected int getWrapNumber()
public java.lang.Object initializeColumnFrom(Tag aTag)
aTag
- com.ibm.dse.base.Tag
public java.lang.Object initializeFrom(Tag aTag) throws java.io.IOException, DSEException
initializeFrom
in interface Externalizable
initializeFrom
in class BTTServiceImpl
aTag
- com.ibm.dse.base.Tag
java.io.IOException
- if an I/O exception occurs.
DSEException
public boolean isConnected() throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEObjectNotFoundException, DSEException
isConnected
in interface DatabaseConnect
isConnected
in class JDBCServiceImpl
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEObjectNotFoundException
DSEException
public boolean isCreateSchema()
isCreateSchema
in class JournalImpl
public boolean isValidEntity() throws DSEInternalErrorException, DSESQLException
isValidEntity
in class JournalImpl
DSEInternalErrorException
- if an internal program error is detected
DSESQLException
- if a SQLException is caughtprotected java.lang.String journalTableRowInsertDefinition() throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caught
DSEInvalidRequestException
- if the request is invalidpublic static JDBCJournalImpl newFor(java.lang.String anEntityName, java.lang.String aSchemaName) throws DSEInvalidRequestException
anEntityName
- java.lang.String, the name of the EntityaSchemaName
- java.lang.String, the name of the Schema
DSEInvalidRequestException
- if the request is not validprotected int nextWrapNumber() throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtprotected int nextWrapNumberForSchema(java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSchemaName
- java.lang.String - the journal schema name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void open(java.lang.String anEntity, int aGeneration) throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
open
in interface JournalService
anEntity
- java.lang.StringaGeneration
- int
DSEInvalidRequestException
- if journal service state is active
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void open(java.lang.String aSchemaName, java.lang.String anEntity, int aGeneration) throws DSEInvalidRequestException, DSEInternalErrorException, DSESQLException
open
in interface JournalService
aSchemaName
- java.lang.StringanEntity
- java.lang.StringaGeneration
- int
DSEInvalidRequestException
- if journal service state is active
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void openForEntity(java.lang.String anEntity) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
openForEntity
in interface JournalService
anEntity
- java.lang.String, the name of the entity
DSEInvalidRequestException
- if the entity name is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if an argument is not valid
DSESQLException
- if a SQLException occurspublic void openForEntity(java.lang.String anEntity, java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
openForEntity
in interface JournalService
anEntity
- java.lang.String, the name of the entityaSchemaName
- java.lang.String, the name of the schema
DSEInvalidRequestException
- if the entity name is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if an argument is not valid
DSESQLException
- if a SQLException occurspublic void openForSchema(java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
openForSchema
in interface JournalService
aSchemaName
- java.lang.String, the name of the schema
DSEInvalidRequestException
- if the entity name is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEInvalidArgumentException
- if an argument is not valid
DSESQLException
- if a SQLException occurspublic void openOnCurrentTable() throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
openOnCurrentTable
in class JournalImpl
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void openOnCurrentTableForSchema(java.lang.String aSchemaName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aSchemaName
- java.lang.String, the journal schema name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void openOnNextTable() throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
openOnNextTable
in class JournalImpl
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void openOnNextTableForSchema(java.lang.String aSchemaName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
aSchemaName
- java.lang.String, the journal schema name
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void resetSingleTableLastRecordNumber() throws DSESQLException, DSEInternalErrorException
resetSingleTableLastRecordNumber
in class JournalImpl
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQL Exception is caughtpublic int queryLastRecordNumber() throws DSESQLException, DSEInternalErrorException
queryLastRecordNumber
in interface JournalService
queryLastRecordNumber
in class JournalImpl
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtprotected Vector recordToRow(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
aDataHashtable
- Hashtable, the data to be used to build the database record
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic Hashtable retrieveLastRecord() throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
retrieveLastRecord
in interface JournalService
retrieveLastRecord
in class JournalImpl
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic Vector retrieveLastRecords(int aNumber) throws DSEInternalErrorException, DSEInvalidArgumentException, DSEInvalidRequestException, DSESQLException
retrieveLastRecords
in interface JournalService
retrieveLastRecords
in class JournalImpl
aNumber
- int, the number of records to retrieve
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 SQLException is caughtpublic Hashtable retrieveRecord(int aRecordNumber) throws DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
retrieveRecord
in interface JournalService
retrieveRecord
in class JournalImpl
aRecordNumber
- int - the record number
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic Vector retrieveRecords(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
retrieveRecords
in interface JournalService
retrieveRecords
in class JournalImpl
aSearchCondition
- java.lang.String - the search condition in SQL format
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 SQLException is caughtpublic Vector retrieveRecords(java.lang.String aSearchCondition, Vector aColumnsVector) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException
retrieveRecords
in interface JournalService
aSearchCondition
- java.lang.String - the search condition in SQL formataColumnsVector
- com.ibm.dse.base.Vector - the vector that contains the columns to be retrieved
DSEInvalidRequestException
- if the request is not valid
DSEInvalidArgumentException
- if the argument(s) is(are) not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic void rollback() throws DSESQLException
rollback
in interface JournalService
rollback
in class JournalImpl
DSESQLException
- Thrown when the rollback failsprotected void setColumnsTable(Hashtable aColumnsHashtable)
aColumnsHashtable
- Hashtablepublic void setCreateSchema(boolean newCreateSchema)
setCreateSchema
in class JournalImpl
newCreateSchema
- booleanprotected void setDatabaseConnection(java.sql.Connection aDatabaseConnection)
setDatabaseConnection
in class JDBCServiceImpl
aDatabaseConnection
- Connectionpublic void setEntity(java.lang.String anEntityName)
setEntity
in interface JournalService
setEntity
in class JournalImpl
anEntityName
- java.lang.Stringpublic void setSchemaName(java.lang.String aSchemaName)
setSchemaName
in class JournalImpl
aSchemaName
- java.lang.String - the journal schema nameprotected void setTableName(java.lang.String aTableName)
setTableName
in class JournalImpl
aTableName
- java.lang.Stringprotected java.lang.String tableName(java.lang.String aSchemaName, java.lang.String anEntityName, int aGeneration)
aSchemaName
- java.lang.String, the schema nameanEntityName
- java.lang.String - the entity nameaGeneration
- int - the generation number
public Vector toStrings()
toStrings
in interface Externalizable
toStrings
in class Service
public int updateLastRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
updateLastRecord
in interface JournalService
updateLastRecord
in class JournalImpl
aDataHashtable
- Hashtable - the Hashtable that contains the data
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 SQLException is caughtpublic int updateLastRecord(Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
updateLastRecord
in interface JournalService
aDataHashtable
- Hashtable - the Hashtable that contains the dataaColumnsVector
- com.ibm.dse.base.Vector - the columns to be changed
DSEInvalidArgumentException
- if an argument is not valid
DSEInvalidRequestException
- if the input parameters are not valid
DSEInternalErrorException
- if an internal program error occurs
DSESQLException
- if an SQLException is caughtpublic int updateRecord(int aRecordNumber, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
updateRecord
in interface JournalService
updateRecord
in class JournalImpl
aRecordNumber
- int - the number of the record to be updatedaDataHashtable
- Hashtable - the Hashtable containing the new data
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 SQLException is caughtpublic int updateRecord(int aRecordNumber, Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException
updateRecord
in interface JournalService
aRecordNumber
- int - the number of the record to be updatedaDataHashtable
- com.ibm.dse.base.Hashtable - the Hashtable that contains the new dataaColumnsVector
- com.ibm.dse.base.Vector - the columns to be changed
DSEInvalidArgumentException
- if the argument(s) is(are) not valid.
DSEInternalErrorException
- if an internal program error occurs.
DSEInvalidRequestException
- if the request is not valid.
com.ibm.dse.services.jdbc.DSESQLException
- if an SQLException is caught.
DSEInvalidArgumentException
DSEInternalErrorException
DSEInvalidRequestException
DSESQLException
public int updateRecords(java.lang.String aSearchCondition, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException
updateRecords
in interface JournalService
updateRecords
in class JournalImpl
aSearchCondition
- java.lang.String - the search conditionaDataHashtable
- Hashtable - the Hashtable that contains the new data
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 SQLException is caughtpublic int updateRecords(java.lang.String aSearchCondition, Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException
updateRecords
in interface JournalService
aSearchCondition
- java.lang.String - the search conditionaDataHashtable
- com.ibm.dse.base.Hashtable - the Hashtable that contains the new dataaColumnsVector
- com.ibm.dse.base.Vector - the columns to be changed
DSEInvalidArgumentException
- if the argument(s) is(are) not valid.
DSEInternalErrorException
- if an internal program error occurs.
DSEInvalidRequestException
- if the request is not valid.
com.ibm.dse.services.jdbc.DSESQLException
- if an SQLException is caught.
DSEInvalidArgumentException
DSEInternalErrorException
DSEInvalidRequestException
DSESQLException
public static boolean isSingleTableReset()
public static void setSingleTableReset(boolean singleTableReset)
singleTableReset
- The singleTableReset to setpublic void disconnect() throws DSESQLException, DSEException
DatabaseConnect
disconnect
in interface DatabaseConnect
disconnect
in class JDBCServiceImpl
DSESQLException
- if a SQLException occurs
DSEException
- if an exception is thrown when calling the pool of connections managerDatabaseConnect.disconnect()
public java.lang.Object handleCommand(java.lang.String opName, java.util.Hashtable requestParam) throws java.lang.Exception
JDBCServiceImpl
handleCommand
in class JDBCServiceImpl
java.lang.Exception
BTTServiceImpl.handleCommand(String, Hashtable)
public void connect(java.lang.String anUser, java.lang.String aPassword) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEObjectNotFoundException, DSEException
DatabaseConnect
connect
in interface DatabaseConnect
connect
in class JDBCServiceImpl
anUser
- java.lang.String - the user identificationaPassword
- java.lang.String - the user password
DSEObjectNotFoundException
- if the JDBCServicesConnectionManager cannot be found
DSEInvalidRequestException
- if the request is not valid
DSEInternalErrorException
- if an internal program error occurs
DSEException
- if an exception is thrown when calling the pool of connections manager
DSESQLException
- if an SQLException is caughtDatabaseConnect.connect(String, String)
public int getLastRecordNumberFromTable() throws DSEInvalidRequestException
getLastRecordNumberFromTable
in interface JournalService
getLastRecordNumberFromTable
in class JournalImpl
DSEInvalidRequestException
public void setLastRecordNumberFromTable(int aLastRecordNumberFromTable)
setLastRecordNumberFromTable
in class JournalImpl
aLastRecordNumberFromTable
- The lastRecordNumberFromTable to set
|
IBM Branch Transformation Toolkit Javadoc | ||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |