com.ptc.windchill.upgrade.util
Class InstallNonModeled

java.lang.Object
  extended bycom.ptc.windchill.upgrade.util.InstallNonModeled

public class InstallNonModeled
extends Object

Used to execute all of the SQL scripts under the NonModeled directory. (tables, types, procedures, triggers and sequencers). The original need was to add the new procedures used in function-based indexing for uniqueness.


Field Summary
private static Connection connection_
           
private static String FILE_NAME_ALL
           
private static String FILE_NAME_PROCEDURES
           
private static String FILE_NAME_SEQUENCERS
           
private static String FILE_NAME_TABLES
           
private static String FILE_NAME_TRIGGERS
           
private static String FILE_NAME_TYPES
           
private static String REL_SQL_PATH_ALL
           
private static String REL_SQL_PATH_PROCEDURES
           
private static String REL_SQL_PATH_SEQUENCERS
           
private static String REL_SQL_PATH_TABLES
           
private static String REL_SQL_PATH_TRIGGERS
           
private static String REL_SQL_PATH_TYPES
           
 
Constructor Summary
InstallNonModeled(Connection connection)
          The NonModeled items are additions to the schema.
 
Method Summary
static String install()
          Execute a master script file that makes calls to all the subdirectories.
static String install(String PATH_AND_FILE_NAME)
          Used to run any one of the scripts in the directories for Procedures, Sequencers, Tables, Triggers or Types.
private static String install(String rel_sql_path, String file_name)
          Use the SQLScriptExecutor to execute a master script file that makes calls to all the subdirectories.
static String installProcedures()
          Execute a master script file that makes calls to all the Procedure scripts.
static String installSequencers()
          Execute a master script file that makes calls to all the Sequencers scripts.
static String installTables()
          Execute a master script file that makes calls to all the Tables scripts.
static String installTriggers()
          Execute a master script file that makes calls to all the Triggers scripts.
static String installTypes()
          Execute a master script file that makes calls to all the Types scripts.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

REL_SQL_PATH_ALL

private static final String REL_SQL_PATH_ALL
See Also:
Constant Field Values

REL_SQL_PATH_PROCEDURES

private static final String REL_SQL_PATH_PROCEDURES
See Also:
Constant Field Values

REL_SQL_PATH_SEQUENCERS

private static final String REL_SQL_PATH_SEQUENCERS
See Also:
Constant Field Values

REL_SQL_PATH_TABLES

private static final String REL_SQL_PATH_TABLES
See Also:
Constant Field Values

REL_SQL_PATH_TRIGGERS

private static final String REL_SQL_PATH_TRIGGERS
See Also:
Constant Field Values

REL_SQL_PATH_TYPES

private static final String REL_SQL_PATH_TYPES
See Also:
Constant Field Values

FILE_NAME_ALL

private static final String FILE_NAME_ALL
See Also:
Constant Field Values

FILE_NAME_PROCEDURES

private static final String FILE_NAME_PROCEDURES
See Also:
Constant Field Values

FILE_NAME_SEQUENCERS

private static final String FILE_NAME_SEQUENCERS
See Also:
Constant Field Values

FILE_NAME_TABLES

private static final String FILE_NAME_TABLES
See Also:
Constant Field Values

FILE_NAME_TRIGGERS

private static final String FILE_NAME_TRIGGERS
See Also:
Constant Field Values

FILE_NAME_TYPES

private static final String FILE_NAME_TYPES
See Also:
Constant Field Values

connection_

private static Connection connection_
Constructor Detail

InstallNonModeled

public InstallNonModeled(Connection connection)
The NonModeled items are additions to the schema.

Parameters:
connection - A connection to the database.
Method Detail

install

public static String install()
                      throws SQLScriptExecutor.ExecutionException
Execute a master script file that makes calls to all the subdirectories.

Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.

install

public static String install(String PATH_AND_FILE_NAME)
                      throws SQLScriptExecutor.ExecutionException
Used to run any one of the scripts in the directories for Procedures, Sequencers, Tables, Triggers or Types.

Parameters:
PATH_AND_FILE_NAME - The path appended with the separator, then the file name.
Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.

installProcedures

public static String installProcedures()
                                throws SQLScriptExecutor.ExecutionException
Execute a master script file that makes calls to all the Procedure scripts.

Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.

installSequencers

public static String installSequencers()
                                throws SQLScriptExecutor.ExecutionException
Execute a master script file that makes calls to all the Sequencers scripts.

Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.

installTables

public static String installTables()
                            throws SQLScriptExecutor.ExecutionException
Execute a master script file that makes calls to all the Tables scripts.

Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.

installTriggers

public static String installTriggers()
                              throws SQLScriptExecutor.ExecutionException
Execute a master script file that makes calls to all the Triggers scripts.

Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.

installTypes

public static String installTypes()
                           throws SQLScriptExecutor.ExecutionException
Execute a master script file that makes calls to all the Types scripts.

Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.

install

private static String install(String rel_sql_path,
                              String file_name)
                       throws SQLScriptExecutor.ExecutionException
Use the SQLScriptExecutor to execute a master script file that makes calls to all the subdirectories. Special handling for indexes: - If we define an index that is already defined, Oracle will disable that index. - Our request to enabling will enable the original index, not the new one. - It is assumed that indexes originally detected as disabled need to remain disabled.

Parameters:
rel_sql_path - Is relative to the windchill\db\sql directory.
file_name - The file that is in that relative path directory.
Returns:
The output from the execution.
Throws:
SQLScriptExecutor.ExecutionException - If the attempt to execute failed.