|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
public interface DatabaseSchema
Interface representing database schema, which is set of related database objects such as tables, constraints and indexes. One database instance will usually consists of multiple schemas coresponding to components used in the application. Each component or subsystem will provide one or multiple database schemas, which will be responsible for creation of all database structures for this components, for the upgrade of existing database structures to the latest version and also will encapsulate all specific database dependent information (such as database dependent queries).
| Method Summary | |
|---|---|
void |
create(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
Create the schema. |
DatabaseSchema[] |
getDependentSchemas()
Get list of database schemas which this schema depends on. |
java.lang.String |
getName()
Get the name of this database schema. |
int |
getVersion()
Get the current (most recent) version of database schema. |
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. |
boolean |
isInDomain()
Check if the the data object belongs to a domain or not. |
void |
upgrade(java.sql.Connection cntDBConnection,
java.lang.String strUserName,
int iOriginalVersion)
Upgrade the schema. |
| Method Detail |
|---|
java.lang.String getName()
int getVersion()
boolean isInDomain()
void create(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
throws java.sql.SQLException,
OSSException
cntDBConnection - - valid connection to databasestrUserName - - name of user who will be accessing this table
java.sql.SQLException - - problem creating the database schema
OSSException - - problem creating the database schema
void upgrade(java.sql.Connection cntDBConnection,
java.lang.String strUserName,
int iOriginalVersion)
throws java.sql.SQLException
cntDBConnection - - valid connection to databasestrUserName - - name of user who will be accessing this tableiOriginalVersion - - original version from which to upgrade
java.sql.SQLException - - problem creating the database schema
DatabaseSchema[] getDependentSchemas()
throws OSSException
OSSException - - database cannot be started.
void handleSQLException(java.sql.SQLException exc,
java.sql.Connection dbConnection,
int iOperationType,
int iDataType,
java.lang.Object data)
throws OSSException
exc - - 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 | ||||||||