|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.persist.db.DatabaseSchemaImpl
org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl
org.opensubsystems.core.persist.db.driver.DatabaseTestSchema
org.opensubsystems.core.persist.db.driver.sapdb.SapDBDatabaseTestSchema
public class SapDBDatabaseTestSchema
This class encapsulates details about creation and upgrade of database schema required to test database driver functionality for tables which are SAP DB database specific.
| Field Summary |
|---|
| Fields inherited from class org.opensubsystems.core.persist.db.driver.DatabaseTestSchema |
|---|
DBTEST_SCHEMA_NAME, DBTEST_SCHEMA_VERSION, TABLE_NAMES |
| Fields inherited from class org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl |
|---|
m_mapModifiableTableNames |
| Fields inherited from class org.opensubsystems.core.persist.db.DatabaseSchemaImpl |
|---|
DATABASE_SCHEMA_PREFIX, DATABASE_SCHEMA_PREFIX_DEFAULT, m_arrDependentSchemas, m_bIsInDomain, m_iSchemaVersion, m_strSchemaName, NL |
| Fields inherited from interface org.opensubsystems.core.persist.db.DatabaseOperations |
|---|
DBOP_DELETE, DBOP_INSERT, DBOP_SELECT, DBOP_UPDATE |
| Constructor Summary | |
|---|---|
SapDBDatabaseTestSchema()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
create(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
|
void |
createTestUser(java.sql.Connection cntAdminDBConnection,
java.lang.String strDatabaseURL,
java.lang.String strUserName,
java.lang.String strUserPassword)
Create test user in the specified database. |
void |
dropTestUser(java.sql.Connection cntAdminDBConnection,
java.lang.String strDatabaseURL,
java.lang.String strUserName)
Drop test user in the specified database. |
int[] |
executeInsertGeneratedKey2(java.sql.Connection dbConnection,
java.lang.String strValue)
Execute another query to insert to table with generated keys which guarantees return |
int[] |
executeInsertRow(java.sql.Connection dbConnection,
java.lang.String strValue)
Execute another query to insert to table. |
int |
executeUpdateTestValue(java.sql.Connection dbConnection,
java.lang.String strOldValue,
java.lang.String strNewValue)
Execute query to update test value using stored procedure without parameters |
java.lang.String |
getInsertGeneratedKey()
Query to insert to table with generated keys is database specific. |
| Methods inherited from class org.opensubsystems.core.persist.db.driver.DatabaseTestSchema |
|---|
createDataSource, getInsertSelectQuery, getSelectExceptQuery, getSelectExceptUnionQuery, getSelectExistQuery |
| Methods inherited from class org.opensubsystems.core.persist.db.ModifiableDatabaseSchemaImpl |
|---|
deleteRelatedData, getModifiableTableNames, handleSQLException |
| Methods inherited from class org.opensubsystems.core.persist.db.DatabaseSchemaImpl |
|---|
getDependentSchemas, getJoinFromWhere, getName, getOwnerColumnNames, getSchemaPrefix, getVersion, isExistingIndex, isInDomain, upgrade, upgradeView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Methods inherited from interface org.opensubsystems.core.persist.db.DatabaseSchema |
|---|
getDependentSchemas, getName, getVersion, isInDomain, upgrade |
| Constructor Detail |
|---|
public SapDBDatabaseTestSchema()
throws org.opensubsystems.core.error.OSSException
org.opensubsystems.core.error.OSSException - - error occured.| Method Detail |
|---|
public void create(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
throws java.sql.SQLException
create in interface org.opensubsystems.core.persist.db.DatabaseSchemacreate in class DatabaseTestSchemajava.sql.SQLExceptionpublic java.lang.String getInsertGeneratedKey()
getInsertGeneratedKey in class DatabaseTestSchema
public int[] executeInsertGeneratedKey2(java.sql.Connection dbConnection,
java.lang.String strValue)
throws java.sql.SQLException
executeInsertGeneratedKey2 in class DatabaseTestSchemadbConnection - - database connectionstrValue - - value to insert
java.sql.SQLException - - error during insert execute
public int executeUpdateTestValue(java.sql.Connection dbConnection,
java.lang.String strOldValue,
java.lang.String strNewValue)
throws java.sql.SQLException
executeUpdateTestValue in class DatabaseTestSchemadbConnection - - database connectionstrOldValue - - old value to be updatedstrNewValue - - new value for update
java.sql.SQLException - - error during insert execute
public int[] executeInsertRow(java.sql.Connection dbConnection,
java.lang.String strValue)
throws java.sql.SQLException
executeInsertRow in class DatabaseTestSchemadbConnection - - database connectionstrValue - - value to insert
java.sql.SQLException - - error during insert execute
public void createTestUser(java.sql.Connection cntAdminDBConnection,
java.lang.String strDatabaseURL,
java.lang.String strUserName,
java.lang.String strUserPassword)
throws java.sql.SQLException
createTestUser in class DatabaseTestSchemacntAdminDBConnection - - database connectionstrDatabaseURL - - database URLstrUserName - - name of the user that will be createdstrUserPassword - - user password
java.sql.SQLException - - error during user creation
public void dropTestUser(java.sql.Connection cntAdminDBConnection,
java.lang.String strDatabaseURL,
java.lang.String strUserName)
throws java.sql.SQLException
dropTestUser in class DatabaseTestSchemacntAdminDBConnection - - database connectionstrDatabaseURL - - database URLstrUserName - - name of the user that will be created
java.sql.SQLException - - error during user deletion
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||