|
|||||||||
| 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.VersionedDatabaseSchema
public class VersionedDatabaseSchema
Versioned database schema provide functionality of creating and upgrading of individual database schemas in the database based on their versions. This class keeps track of existing and current versiones of database schemas and upgrades them as necesary
| Field Summary | |
|---|---|
static java.lang.String |
SCHEMA_TABLE_NAME
Full name of the table used by this schema. |
static java.lang.String |
VERSIONED_SCHEMA_NAME
Name identifies this schema in the database. |
static int |
VERSIONED_SCHEMA_VERSION
Version of this schema in the database. |
| 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 | |
|---|---|
VersionedDatabaseSchema()
Default constructor. |
|
| Method Summary | |
|---|---|
void |
add(DatabaseSchema dsSchema)
Add new database schema to be managed by versioned schema. |
void |
create(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
Create the schema. |
protected void |
createOrUpgradeSchemas(java.sql.Connection cntDBConnection,
java.lang.String strUserName,
java.util.Map mpSchemasToAdd,
java.util.Map mpSchemasToUpgrade)
Creating or upgrading schemas, which needs to be added or changes. |
void |
init(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
Initialize the schema. |
protected void |
loadExistingSchemas(java.sql.Connection cntDBConnection,
java.util.Map mpSchemasToAdd,
java.util.Map mpSchemasToUpgrade)
Check what schemas already exists in the repository. |
| Methods inherited from class org.opensubsystems.core.persist.db.DatabaseSchemaImpl |
|---|
getDependentSchemas, getJoinFromWhere, getName, getOwnerColumnNames, getSchemaPrefix, getVersion, handleSQLException, isExistingIndex, isInDomain, upgrade, upgradeView |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
public static final java.lang.String VERSIONED_SCHEMA_NAME
public static final int VERSIONED_SCHEMA_VERSION
public static final java.lang.String SCHEMA_TABLE_NAME
| Constructor Detail |
|---|
public VersionedDatabaseSchema()
throws OSSException
OSSException - - database cannot be started.| Method Detail |
|---|
public void add(DatabaseSchema dsSchema)
throws OSSException
dsSchema - - new database schema to be managed
OSSException - - database cannot be started.
public void init(java.sql.Connection cntDBConnection,
java.lang.String strUserName)
throws OSSException,
java.sql.SQLException
cntDBConnection - - valid connection to databasestrUserName - - name of user who will be accessing this table
OSSException - - problem initializing the schema
java.sql.SQLException - - problem initializing the schema
public 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 schema
OSSException - - problem creating the schema
protected void loadExistingSchemas(java.sql.Connection cntDBConnection,
java.util.Map mpSchemasToAdd,
java.util.Map mpSchemasToUpgrade)
throws OSSException
cntDBConnection - - valid connection to databasempSchemasToAdd - - current schemas will at the end contains schemas,
which must be addedmpSchemasToUpgrade - - schemas to upgrade will contain schemas,
which must be upgraded
OSSException - - problem initializing the schema
protected void createOrUpgradeSchemas(java.sql.Connection cntDBConnection,
java.lang.String strUserName,
java.util.Map mpSchemasToAdd,
java.util.Map mpSchemasToUpgrade)
throws OSSException,
java.sql.SQLException
cntDBConnection - - valid connection to databasestrUserName - - name of user who will be accessing this tablempSchemasToAdd - - current schemas will at the end contains schemas which must be addedmpSchemasToUpgrade - - schemas to upgrade will contain schemas which must be upgraded
OSSException - - problem initializing the schema
java.sql.SQLException - - problem initializing the schema
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||