|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The TableService interface provides the public methods used to access tables services. Each class that includes the TableService interface must implement all of these methods.
Method Summary | |
void |
addRecord(Context aContext,
HashtableFormat aHashtableFormat)
Adds a record into selected database table. |
void |
addRecord(Context aContext,
java.lang.String aFormatName)
Adds a record into selected database table. |
void |
addRecord(Hashtable aDataHashtable)
Inserts the data from aDataHashtable as a new row into the table assigned to the table service. |
void |
commit()
Commits all changes to the database. |
void |
deleteRecordsMatching(java.lang.String aSearchCondition)
Deletes the records in the database table that match the search criteria. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
HashtableFormat aHashtableInputFormat)
Builds a data hashtable by calling the format method of the aHashtableInputFormat table formatter, with the context aContext as argument. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
HashtableFormat aHashtableInputFormat,
HashtableFormat aHashtableOutputFormat)
Builds a data hashtable by calling the format method of the aHashtableFormat table formatter, with the context aContext as argument. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
HashtableFormat aHashtableInputFormat,
java.lang.String aHashtableOutputFormatName)
Builds a data hashtable by calling the format method of the aHashtableFormat table formatter, with the context aContext as argument. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
Hashtable dataHashtable,
HashtableFormat aHashtableOutputFormat)
Executes the stored procedure procedureName with the parameters given in the dataHashtable. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
Hashtable dataHashtable,
java.lang.String aHashtableOutputFormatName)
Executes the stored procedure procedureName with the parameters given in the dataHashtable. |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
java.lang.String aHashtableFormatName)
Instanciates the HashtableFormat defined as aHashtableFormatName and passes it as argument to the method executeProcedure (String, Context, HashtableFormat) . |
void |
executeProcedure(java.lang.String procedureName,
Context aContext,
java.lang.String aHashtableInputFormatName,
java.lang.String aHashtableOutputFormatName)
Instanciates the HashtableFormat defined as aHashtableInputFormatName and passes it as argument to the method executeProcedure (String, Context, HashtableFormat, String). |
void |
executeProcedure(java.lang.String procedureName,
Hashtable dataHashtable)
Executes the stored procedure procedureName with the parameters given in the dataHashtable |
void |
executeSQLQuery(java.lang.String anSQLStatement,
java.lang.String outputFormatName,
Context aContext)
Executes an SQL Query Statement and unformats into aContext the result set using the outputFormatName |
int |
executeSQLUpdate(java.lang.String aSQLStatement)
Executes an SQL Update Statement and returns the update count (the number of registers that have been updated) |
boolean |
getAutoCommit()
Returns the autoCommit attribute value. |
boolean |
getAutoConnect()
Returns the autoConnect attribute value. |
java.lang.String |
getCatalogName()
Returns the catalog attribute value. |
java.lang.String |
getFullTableName()
Returns the fullTableName attribute value. |
java.lang.String |
getJDBCDriver()
Returns the JDBCDriver attribute value. |
java.lang.String |
getPassword()
Returns the password attribute value. |
java.lang.String |
getSchemaName()
Returns the schema attribute value. |
java.lang.String |
getTableName()
Returns the tableName attribute value. |
java.lang.String |
getUser()
Returns the user attribute value. |
boolean |
isPrimaryKeys()
Returns the value of the attribute that decides whether the service has to control the database tables primary keys access or not. |
void |
loadDriver()
Loads the default JDBC driver set in the TableConstants class. |
void |
loadDriver(java.lang.String aDriverName)
Loads the JDBC Driver set as an argument. |
Vector |
retrieveRecordsMatching(java.lang.String aSearchCondition)
Retrieves all records within the database table that match the Search Condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
HashtableIndexedCollectionFormat anOutputFormat)
Retrieves all the records within the database table, which is managed by the table service, and that match the search condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
java.lang.String anOutputFormatName)
Retrieves all the records within the database table, which is managed by the table service, and that match the search condition. |
Vector |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Vector aColumnsVector)
Retrieves the columns in aColumnsVector of all the records within the database table that match the search condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Vector aColumnsVector,
Context aContext,
HashtableIndexedCollectionFormat anOutputFormat)
Retrieves the columns in aColumnsVector of all the records within the database table that match the search condition. |
void |
retrieveRecordsMatching(java.lang.String aSearchCondition,
Vector aColumnsVector,
Context aContext,
java.lang.String anOutputFormatName)
Retrieves the columns in aColumnsVector of all the records within the database table that match the search condition. |
void |
rollback()
Rolls back all database changes. |
void |
setAutoCommit(boolean s)
Sets the autoCommit attribute to the boolean provided as an argument. |
void |
setAutoConnect(boolean s)
Sets the autoConnect attribute to the boolean provided as an argument. |
void |
setCatalogName(java.lang.String s)
Sets the catalog attribute to the string provided as argument. |
void |
setJDBCDriver(java.lang.String newJDBCDriver)
Sets the JDBCDriver attribute value to newJDBCDriver. |
void |
setPassword(java.lang.String s)
Sets the password attribute to the string provided as an argument. |
void |
setPrimaryKeys(boolean newPrimaryKeys)
Sets the primaryKeys attribute value to newPrimaryKeys. |
void |
setSchemaName(java.lang.String s)
Sets the schemaName attribute to the String provided as an argument. |
void |
setTableName(java.lang.String s)
Sets the tableName attribute to the String provided as an argument. |
void |
setUser(java.lang.String s)
Sets the user attribute to the string provided as an argument. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
HashtableFormat aHashtableFormat)
Updates all of the table records that match the search condition with the result from formatting the context aContext data using the formatter aHashtableFormat. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
HashtableFormat aHashtableFormat,
Vector aColumnsVector)
Updates the columns specified in aColumnsVector for the records which match the search condition, with the data provided in the operation context. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
java.lang.String aFormatName)
Updates all of the table records that match the search condition with the result from formatting the context aContext data using the formatter identified by aFormatName. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Context aContext,
java.lang.String aFormatName,
Vector aColumnsVector)
For all the table records that match the search condition, updates the columns specified in aColumnsVector with the data included in the operation context aContext. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Hashtable aDataHashtable)
Updates all of the table records that match the search condition with the data included in the Hashtable argument. |
int |
updateRecordsMatching(java.lang.String aSearchCondition,
Hashtable aDataHashtable,
Vector aColumnsVector)
For all of the table records that match the search condition, updates the columns specified in aColumnsVector with the data included in Hashtable argument. |
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 void addRecord(Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException, DSEInvalidClassException
aContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic void addRecord(Context aContext, java.lang.String aFormatName) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException, DSEInvalidClassException, java.io.IOException
aContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic void addRecord(Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEException
aDataHashtable
- Hashtablepublic void commit() throws DSESQLException
public void deleteRecordsMatching(java.lang.String aSearchCondition) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEException
aSearchCondition
- java.lang.String, the search criteria in SQL formatpublic void executeProcedure(java.lang.String procedureName, Context aContext, Hashtable dataHashtable, HashtableFormat aHashtableOutputFormat) throws DSEInvalidArgumentException, DSEInvalidRequestException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException
procedureName
- java.lang.StringdataHashtable
- com.ibm.dse.base.HashtableaContext
- com.ibm.dse.base.ContextaHashtableOutputFormat
- com.ibm.dse.base.HashtableFormatpublic void executeProcedure(java.lang.String procedureName, Context aContext, Hashtable dataHashtable, java.lang.String aHashtableOutputFormatName) throws DSEInternalErrorException, DSESQLException, DSEInvalidArgumentException, DSEInvalidRequestException, DSEException, java.io.IOException
procedureName
- java.lang.StringdataHashtable
- com.ibm.dse.base.HashtableaContext
- com.ibm.dse.base.ContextaHashtableOutputFormatName
- java.lang.Stringpublic void executeProcedure(java.lang.String procedureName, Context aContext, HashtableFormat aHashtableInputFormat) throws DSEInternalErrorException, DSESQLException, DSEInvalidArgumentException, DSEException, DSEInvalidRequestException
procedureName
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableInputFormat
- com.ibm.dse.base.HashtableFormatpublic void executeProcedure(java.lang.String procedureName, Context aContext, HashtableFormat aHashtableInputFormat, HashtableFormat aHashtableOutputFormat) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException
procedureName
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableInputFormat
- com.ibm.dse.base.HashtableFormataHashtableOutputFormat
- com.ibm.dse.base.HashtableFormatpublic void executeProcedure(java.lang.String procedureName, Context aContext, HashtableFormat aHashtableInputFormat, java.lang.String aHashtableOutputFormatName) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException, java.io.IOException
procedureName
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableInputFormat
- com.ibm.dse.base.HashtableFormataHashtableOutputFormatName
- java.lang.Stringpublic void executeProcedure(java.lang.String procedureName, Context aContext, java.lang.String aHashtableFormatName) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEException, DSEInvalidRequestException, java.io.IOException
procedureName
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormatName
- java.lang.Stringpublic void executeProcedure(java.lang.String procedureName, Context aContext, java.lang.String aHashtableInputFormatName, java.lang.String aHashtableOutputFormatName) throws DSEInvalidArgumentException, DSEInternalErrorException, DSESQLException, DSEInvalidRequestException, DSEException, java.io.IOException
procedureName
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableInputFormatName
- java.lang.StringaHashtableOutputFormatName
- java.lang.Stringpublic void executeProcedure(java.lang.String procedureName, Hashtable dataHashtable) throws DSESQLException, DSEInvalidRequestException, DSEInternalErrorException, DSEException
procedureName
- java.lang.StringdataHashtable
- com.ibm.dse.base.Hashtablepublic void executeSQLQuery(java.lang.String anSQLStatement, java.lang.String outputFormatName, Context aContext) throws DSEInternalErrorException, DSESQLException, DSEInvalidArgumentException, DSEInvalidRequestException, DSEException, DSEObjectNotFoundException, java.io.IOException
anSQLStatement
- java.lang.StringoutputFormatName
- java.lang.StringaContext
- com.ibm.dse.base.Contextpublic int executeSQLUpdate(java.lang.String aSQLStatement) throws DSESQLException, DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSEException
aSQLStatement
- java.lang.Stringpublic boolean getAutoCommit()
public boolean getAutoConnect()
public java.lang.String getCatalogName()
public java.lang.String getFullTableName()
public java.lang.String getJDBCDriver()
public java.lang.String getPassword()
public java.lang.String getSchemaName()
public java.lang.String getTableName()
public java.lang.String getUser()
public boolean isPrimaryKeys()
public void loadDriver() throws DSEInternalErrorException
public void loadDriver(java.lang.String aDriverName) throws DSEInternalErrorException
aDriverName
- java.lang.String, the driver name (full path)public Vector retrieveRecordsMatching(java.lang.String aSearchCondition) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException
aSearchCondition
- java.lang.String, the search condition in SQL formatpublic void retrieveRecordsMatching(java.lang.String aSearchCondition, Context aContext, HashtableIndexedCollectionFormat anOutputFormat) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException, 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 retrieveRecordsMatching(java.lang.String aSearchCondition, Context aContext, java.lang.String anOutputFormatName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException, 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 Vector retrieveRecordsMatching(java.lang.String aSearchCondition, Vector aColumnsVector) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException
aSearchCondition
- java.lang.String, the search condition in SQL formataColumnsVector
- com.ibm.dse.base.Vector, the vector that contains the columns to be retrievedpublic void retrieveRecordsMatching(java.lang.String aSearchCondition, Vector aColumnsVector, Context aContext, HashtableIndexedCollectionFormat anOutputFormat) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException, java.io.IOException
aSearchCondition
- java.lang.String, the search condition in SQL formataColumnsVector
- com.ibm.dse.base.Vector, the vector that contains the columns to be retrievedaContext
- 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 retrieveRecordsMatching(java.lang.String aSearchCondition, Vector aColumnsVector, Context aContext, java.lang.String anOutputFormatName) throws DSEInternalErrorException, DSEInvalidRequestException, DSEInvalidArgumentException, DSESQLException, DSEException, java.io.IOException
aSearchCondition
- java.lang.String, the search condition in SQL formataColumnsVector
- com.ibm.dse.base.Vector, the vector that contains the columns to be retrievedaContext
- 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 s)
s
- booleanpublic void setAutoConnect(boolean s)
s
- booleanpublic void setCatalogName(java.lang.String s)
s
- java.lang.Stringpublic void setJDBCDriver(java.lang.String newJDBCDriver)
newJDBCDriver
- java.lang.Stringpublic void setPassword(java.lang.String s)
s
- java.lang.Stringpublic void setPrimaryKeys(boolean newPrimaryKeys)
newPrimaryKeys
- booleanpublic void setSchemaName(java.lang.String s)
s
- Stringpublic void setTableName(java.lang.String s)
s
- java.lang.Stringpublic void setUser(java.lang.String s)
s
- java.lang.Stringpublic int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, HashtableFormat aHashtableFormat) throws DSEInvalidRequestException, DSEException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- java.lang.StringaContext
- com.ibm.dse.base.ContextaHashtableFormat
- com.ibm.dse.base.HashtableFormatpublic int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, HashtableFormat aHashtableFormat, Vector aColumnsVector) throws DSEInvalidRequestException, DSEException, DSEInvalidArgumentException, DSESQLException
aSearchCondition
- 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 updatedpublic int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, DSEException, DSEInvalidClassException, java.io.IOException
aSearchCondition
- java.lang.StringaContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.Stringpublic int updateRecordsMatching(java.lang.String aSearchCondition, Context aContext, java.lang.String aFormatName, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEException, DSEInvalidClassException, java.io.IOException
aSearchCondition
- java.lang.String, the search condition in SQL formataContext
- com.ibm.dse.base.ContextaFormatName
- java.lang.String, the name of the format to be used to get the new data from the contextaColumnsVector,
- a vector that contains the name of the columns to be updatedpublic int updateRecordsMatching(java.lang.String aSearchCondition, Hashtable aDataHashtable) throws DSEInvalidRequestException, DSEInternalErrorException, DSEInvalidArgumentException, DSESQLException, DSEException
aSearchCondition
- java.lang.String, the search condition in SQL formataDataHashtable
- com.ibm.dse.base.Hashtablepublic int updateRecordsMatching(java.lang.String aSearchCondition, Hashtable aDataHashtable, Vector aColumnsVector) throws DSEInvalidArgumentException, DSEInternalErrorException, DSEInvalidRequestException, DSESQLException, DSEException
aSearchCondition
- java.lang.String, the search condition in SQL formataDataHashtable
- com.ibm.dse.base.HashtableaColumnsVector,
- a vector that contains the name of the columns to be updated
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |