com.metamatrix.metadata.runtime.spi.jdbc
Class JDBCRuntimeMetadataWriter

java.lang.Object
  extended by com.metamatrix.metadata.runtime.spi.jdbc.JDBCRuntimeMetadataWriter

public final class JDBCRuntimeMetadataWriter
extends java.lang.Object


Constructor Summary
JDBCRuntimeMetadataWriter()
           
 
Method Summary
static void deleteVDBModels(java.util.Collection modelIDs, VirtualDatabaseID vdbID, java.sql.Connection jdbcConnection)
          Delete VDB-models from the VirtualDatabase.
static void insertVDBModels(java.util.Collection models, VirtualDatabaseID vdbID, java.sql.Connection jdbcConnection)
          Used by the renameModel method to update the MDL_NM column in the RT_MDLS table
static void setConnectorBindingNames(VirtualDatabaseID vdbID, java.util.Collection models, java.util.Map modelAndCBNames, java.sql.Connection jdbcConnection)
           
static void setStatus(VirtualDatabaseID virtualDBID, long uid, short status, java.lang.String userName, java.sql.Connection jdbcConnection)
          Updates the VirtualDatabase status.
static void updatetSingleConnectorBindingName(VirtualDatabaseID vdbID, java.util.Map modelAndCBNames, java.sql.Connection jdbcConnection)
          This method is used for Non-Multisource Models because the 1-to-1 relationship between the RT_MDLS and the RT_VDB_MDLS tables is assumed intact (as originally done) so that only an update is performed
static void updateVDBVersion(VirtualDatabaseID vdbID, java.sql.Connection jdbcConnection)
          Used by migration, after deploying the latest version from the source, to update the version to reflect the latest version.
static void updateVirtualDatabase(VirtualDatabase vdb, java.lang.String userName, java.sql.Connection jdbcConnection)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

JDBCRuntimeMetadataWriter

public JDBCRuntimeMetadataWriter()
Method Detail

setStatus

public static void setStatus(VirtualDatabaseID virtualDBID,
                             long uid,
                             short status,
                             java.lang.String userName,
                             java.sql.Connection jdbcConnection)
                      throws InvalidStateException,
                             VirtualDatabaseException
Updates the VirtualDatabase status.

Parameters:
vdb - is the VirtualDatabase to be updated
userName - of the person requesting the change
status - is the state the VirtualDatabase should be set to
Throws:
RuntimeMetadataException - if unable to perform update.
InvalidStateException - if the status to be set is invalid.
VirtualDatabaseException

setConnectorBindingNames

public static void setConnectorBindingNames(VirtualDatabaseID vdbID,
                                            java.util.Collection models,
                                            java.util.Map modelAndCBNames,
                                            java.sql.Connection jdbcConnection)
                                     throws VirtualDatabaseException
Throws:
VirtualDatabaseException

updatetSingleConnectorBindingName

public static void updatetSingleConnectorBindingName(VirtualDatabaseID vdbID,
                                                     java.util.Map modelAndCBNames,
                                                     java.sql.Connection jdbcConnection)
                                              throws VirtualDatabaseException
This method is used for Non-Multisource Models because the 1-to-1 relationship between the RT_MDLS and the RT_VDB_MDLS tables is assumed intact (as originally done) so that only an update is performed

Throws:
VirtualDatabaseException

updateVirtualDatabase

public static void updateVirtualDatabase(VirtualDatabase vdb,
                                         java.lang.String userName,
                                         java.sql.Connection jdbcConnection)
                                  throws VirtualDatabaseException
Throws:
VirtualDatabaseException

updateVDBVersion

public static void updateVDBVersion(VirtualDatabaseID vdbID,
                                    java.sql.Connection jdbcConnection)
                             throws VirtualDatabaseException
Used by migration, after deploying the latest version from the source, to update the version to reflect the latest version. Otherwise the version will start at one when it should be greater.

Throws:
VirtualDatabaseException

insertVDBModels

public static void insertVDBModels(java.util.Collection models,
                                   VirtualDatabaseID vdbID,
                                   java.sql.Connection jdbcConnection)
                            throws VirtualDatabaseException
Used by the renameModel method to update the MDL_NM column in the RT_MDLS table

Throws:
VirtualDatabaseException

deleteVDBModels

public static void deleteVDBModels(java.util.Collection modelIDs,
                                   VirtualDatabaseID vdbID,
                                   java.sql.Connection jdbcConnection)
                            throws VirtualDatabaseException
Delete VDB-models from the VirtualDatabase.

Parameters:
modelIDs - is a collection of model IDs to be deleted.
vdbID - is the ID of the virtual database.
Throws:
VirtualDatabaseException - if unable to perform insertion.
InvalidStateException - is thrown if the VirtualDatabase is not in the proper state to change to active state.


Copyright © 2009. All Rights Reserved.