|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
It represents a Database Management System.
This is an internal interface meant to be used by the configurator
classes.
This class is NOT externalized or documented for 3rd party
cassettes.
Extends IDatabase
, so instances of this class can be used in
ICassetteConfigurator.addToInstance(IDatabase database, Properties properties)
and in
ICassetteConfigurator.removeFromInstance(IDatabase database)
.
Method Summary | |
---|---|
void |
addCassetteCfg(java.lang.String name,
java.lang.String vendor,
java.lang.String version)
Adds a cassette configuration for a Payments Instance. |
boolean |
checkETillConfigTable()
Checks for the existence of the ETILLCONFIG table. |
boolean |
commit()
Commits pending changes in current transaction. |
void |
createPMSchema()
Creates the database to be used by a Payments instance. |
void |
createPMTables()
Creates the database tables to be used by a Payments Instance. |
void |
deletePMSchema()
Deletes a schema been used by the tables of a Payments Instance. |
void |
deletePMTables()
Deletes the database tables used by a Payments Instance. |
java.sql.Connection |
getConnection()
Obtains a new connection to the the Database Management System. |
java.lang.String |
getDbName()
Gets the name of the Payments instance database. |
java.lang.String |
getDbOwnerId()
Gets the owner of the Payments instance tables in the database. |
java.lang.String |
getDbUserId()
Gets the user currently connected to the Payments instance database. |
java.lang.String |
getJdbcDriver()
Gets the full JDBC Driver |
java.lang.String |
getJdbcUrl()
Gets the full JDBC URL |
com.ibm.commerce.payments.configurator.IDatabase |
getPublicDatabase()
Gets a reference to the database interface published to 3rd party cassettes. |
java.sql.Connection |
getSameConnection()
Obtains the connection been used by this Database Management System. |
java.lang.String |
getType()
Gets the type of the database implementation. |
java.util.List |
queryCassetteCfg()
Gets the configuration for all the cassettes in a Payments Instance. |
void |
removeCassetteCfg(java.lang.String cassetteId)
Removes a cassette configuration for a Payments Instance. |
boolean |
requiresSchema()
Checks if the IDBMS implementation requires a database schema before the creation of the tables. |
boolean |
rollback()
Cancels pending changes in current transaction. |
void |
runSQLScript(java.sql.Statement statement,
java.lang.String filename)
Executes an SQL script in the target Database Management System. |
void |
runSQLScript(java.lang.String filename)
Executes an SQL script in the target Database Management System. |
java.util.List |
runSQLScriptInRobustMode(java.lang.String filename)
Executes an SQL script in the target Database Management System. |
boolean |
supportsDatabaseCreation()
Checks if the IDBMS implementation supports the creation of the Payments instance database. |
boolean |
supportsDatabaseDeletion()
Checks if the IDBMS implementation supports the deletion of the Payments instance database. |
void |
updateCassetteVersion(java.lang.String name,
java.lang.String version)
Update the version number for the cassette |
void |
updateETillConfig(java.lang.String fieldValuePair)
Updates the ETILLCONFIG table with the field-value pair passed in. |
Methods inherited from interface com.ibm.commerce.payments.configurator.IDatabase |
---|
executeSQLUpdate |
Method Detail |
public boolean supportsDatabaseCreation()
public boolean supportsDatabaseDeletion()
public boolean requiresSchema()
public void createPMSchema() throws com.ibm.commerce.payments.configurator.SchemaCannotBeCreatedException
DatabaseCannotBeCreatedException
- Thrown if the database does not
exist and cannot be createdpublic void deletePMSchema() throws com.ibm.commerce.payments.configurator.SchemaCannotBeDeletedException
com.ibm.commerce.payments.configurator.SchemaCannotBeDeletedException
- Thrown if the schema exists and
cannot be deletedpublic void createPMTables() throws com.ibm.commerce.payments.configurator.TablesCannotBeCreatedException
com.ibm.commerce.payments.configurator.TablesCannotBeCreatedException
- Thrown if the tables does not exist
and cannot be createdpublic void deletePMTables() throws com.ibm.commerce.payments.configurator.TablesCannotBeDeletedException
com.ibm.commerce.payments.configurator.TablesCannotBeDeletedException
- Thrown if the tables exist
and cannot be deletedpublic java.sql.Connection getSameConnection()
null
if the inner connection has not been
initializedpublic java.sql.Connection getConnection()
getConnection
in interface com.ibm.commerce.payments.configurator.IDatabase
null
if a connection cannot be createdpublic java.util.List queryCassetteCfg()
public boolean checkETillConfigTable()
public void updateETillConfig(java.lang.String fieldValuePair) throws DatabaseOperationFailedException
fieldValuePair
- DatabaseOperationFailedException
- Thrown if the database operation failedpublic void addCassetteCfg(java.lang.String name, java.lang.String vendor, java.lang.String version) throws DatabaseOperationFailedException
name
- the name of the cassette (shortname - full package is not included)vendor
- the implementor of the cassetteversion
- the version of the cassetteDatabaseOperationFailedException
- Thrown if the database operation failedpublic void removeCassetteCfg(java.lang.String cassetteId) throws DatabaseOperationFailedException
name
- The name of the cassetteDatabaseOperationFailedException
- Thrown if the database operation failspublic java.lang.String getType()
getType
in interface com.ibm.commerce.payments.configurator.IDatabase
public java.lang.String getDbOwnerId()
getDbOwnerId
in interface com.ibm.commerce.payments.configurator.IDatabase
public java.lang.String getDbUserId()
getDbUserId
in interface com.ibm.commerce.payments.configurator.IDatabase
public java.lang.String getDbName()
getDbName
in interface com.ibm.commerce.payments.configurator.IDatabase
public java.lang.String getJdbcUrl()
public java.lang.String getJdbcDriver()
public boolean commit()
public boolean rollback()
public java.util.List runSQLScriptInRobustMode(java.lang.String filename)
fileName
- the SQL script to be executedrobust
- a flag indicating the operation mode;
true
means that the script will be
executed until the end, even if some errors occur;
false
means that the script will
execute until the first error occur, or the end
of the script is reachedpublic void runSQLScript(java.lang.String filename) throws DatabaseOperationFailedException
filename
- DatabaseOperationFailedException
- public void runSQLScript(java.sql.Statement statement, java.lang.String filename) throws DatabaseOperationFailedException
statement
- filename
- DatabaseOperationFailedException
- public com.ibm.commerce.payments.configurator.IDatabase getPublicDatabase()
public void updateCassetteVersion(java.lang.String name, java.lang.String version) throws DatabaseOperationFailedException
name
- The cassette nameversion
- The new version numberDatabaseOperationFailedException
-
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |