|
|||||||||
| 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
public abstract class ModifiableDatabaseSchemaImpl
Base class implementation for database schemas that provide queries or operations that allow to modify data in tables managed by this schema.
| Field Summary | |
|---|---|
protected java.util.Map |
m_mapModifiableTableNames
Map of all tables belonging to this schema that can be modified by the operations provided by the schema (e.g. |
| 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 | |
|---|---|
ModifiableDatabaseSchemaImpl(DatabaseSchema[] arrDependentSchemas,
java.lang.String strSchemaName,
int iSchemaVersion,
boolean bIsInDomain,
java.lang.Integer iModifiableDataType,
java.lang.String strModifiableTableName)
Constructor allowing to specify attributes for database schema that support only single data object type and therefore have most likely only one table name that can be modified and single columns sets. |
|
ModifiableDatabaseSchemaImpl(DatabaseSchema[] arrDependentSchemas,
java.lang.String strSchemaName,
int iSchemaVersion,
boolean bIsInDomain,
java.util.Map mapModifiableTableNames)
Constructor allowing to specify attributes for database schema that support multiple data object types and therefore have multiple sets of tables that can be modified and columns sets. |
|
| Method Summary | |
|---|---|
int |
deleteRelatedData(java.sql.Connection cntDBConnection,
int iDataType,
int iId)
Method deletes related child data when main data object is being deleted. |
java.util.Map |
getModifiableTableNames()
Get the names of all tables that can be modified by the operations provided by this database schema (e.g. |
void |
handleSQLException(java.sql.SQLException exc,
java.sql.Connection dbConnection,
int iOperationType,
int iDataType,
java.lang.Object data)
Handle SQL Exception caused by some database operations. |
| 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 |
|---|
create, getDependentSchemas, getName, getVersion, isInDomain, upgrade |
| Field Detail |
|---|
protected java.util.Map m_mapModifiableTableNames
| Constructor Detail |
|---|
public ModifiableDatabaseSchemaImpl(DatabaseSchema[] arrDependentSchemas,
java.lang.String strSchemaName,
int iSchemaVersion,
boolean bIsInDomain,
java.util.Map mapModifiableTableNames)
throws OSSException
arrDependentSchemas - - array of dependent schemasstrSchemaName - - name of the schemaiSchemaVersion - - version of the schemabIsInDomain - - flag signaling if object is in domainmapModifiableTableNames - - map of all tables belonging to this schema
that can be modified by the schema (e.g.
schema allows insert, update or delete on
this table)
OSSException - - an error has occured
public ModifiableDatabaseSchemaImpl(DatabaseSchema[] arrDependentSchemas,
java.lang.String strSchemaName,
int iSchemaVersion,
boolean bIsInDomain,
java.lang.Integer iModifiableDataType,
java.lang.String strModifiableTableName)
throws OSSException
arrDependentSchemas - - array of dependent schemasstrSchemaName - - name of the schemaiSchemaVersion - - version of the schemaiModifiableDataType - - data type that can be modified using
operations in this schemastrModifiableTableName - - table belonging to this schema that can be
modified by the schema (e.g. schema allows
insert, update or delete on this table)bIsInDomain - - flag signaling if object is in domain
OSSException - - an error has occured| Method Detail |
|---|
public int deleteRelatedData(java.sql.Connection cntDBConnection,
int iDataType,
int iId)
throws OSSException,
java.sql.SQLException
deleteRelatedData in interface ModifiableDatabaseSchemacntDBConnection - - valid connection to databaseiDataType - - data type identifying what to deleteiId - - ID of the record that has to be deleted
OSSException - - problem deleting related data
java.sql.SQLException - - problem deleting related datapublic java.util.Map getModifiableTableNames()
getModifiableTableNames in interface ModifiableDatabaseSchema
public void handleSQLException(java.sql.SQLException exc,
java.sql.Connection dbConnection,
int iOperationType,
int iDataType,
java.lang.Object data)
throws OSSException
handleSQLException in interface DatabaseSchemahandleSQLException in class DatabaseSchemaImplexc - - sql exception to be handleddbConnection - - database connection used when the exception occurediOperationType - - type of the operation that caused the exception,
see DatabaseOperations for possible valuesiDataType - - data type the data object represents (e.g if this is
type user and data is Integer, that means it is id
of user object). This is one of the DataConstant
constants.data - - data object the exception is handled for
OSSException - - problem handling exception
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||