|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.upgrade.modeldiff.Db
This package private class is an attempt to isolate database vendor peculiarities.
Field Summary | |
(package private) static String |
BLOBTSNAME
|
(package private) static String |
CHUNKSIZE
|
private static Connection |
connection_
|
private static String |
DB_DIR
|
private static String |
DB_PASSWORD
|
private static String |
DB_SERVICE_DRIVER
|
private static String |
DB_SERVICE_URL
|
(package private) static String |
DB_USER
|
private static boolean |
doesDataStoreSupportFbis_
|
private static boolean |
doesDataStoreSupportFbisIsSet_
|
private static boolean |
doesSqlGeneratorSupportFbis_
|
private static String |
HUGE
|
(package private) static String |
HUGETABLESIZE
|
private static String |
JDBC_DRIVER
|
private static String |
LARGE
|
(package private) static String |
LARGETABLESIZE
|
(package private) static String |
LINE_SEPARATOR
|
private static String |
MEDIUM
|
(package private) static String |
MEDIUMTABLESIZE
|
(package private) static int |
MOD_COLUMN
|
(package private) static int |
NEW_COLUMN
|
(package private) static boolean |
NORMALIZE_INDEX_COLUMN_NAMES
|
(package private) static int |
OLD_COLUMN
|
(package private) static String |
SERVICE_NAME
|
private static String |
SMALL
|
(package private) static String |
SMALLTABLESIZE
|
private static SQLGenerator |
sqlGenerator_
|
private static String |
TINY
|
(package private) static String |
TINYTABLESIZE
|
Constructor Summary | |
(package private) |
Db()
|
Method Summary | |
(package private) static void |
closeResultSet(ResultSet result_set)
|
(package private) static void |
closeStatement(Statement statement)
|
(package private) static Connection |
connectToDatabase()
Connect to the database using info in Windchill's properties files. |
(package private) static Statement |
createStatement()
|
(package private) static String |
createView(String class_name,
DatabaseInfo dbInfo)
|
private static boolean |
determineIfDataStoreSupportsFbis()
Determines if the data store supports Function Based Indexes (FBIs). |
(package private) static boolean |
doesDataStoreSupportFbis()
Does this version of the Database, and thus SqlGenerator, support Function Based Indexes. |
(package private) static boolean |
doesSqlGeneratorSupportFbis()
Does this version of the Database, and thus SqlGenerator, support Function Based Indexes. |
(package private) static void |
establishConnection()
|
(package private) static Vector |
getDbIndexes(String dbTableName)
|
protected Hashtable |
getDBSequences()
|
(package private) static Hashtable |
getDbTableColumns(String tableName)
|
(package private) static String |
getDroppedTableDoesNotExistErrorCode()
|
(package private) static int |
getInvalidColumnNameErrorCode()
|
(package private) static DatabaseMetaData |
getMetaData()
|
(package private) static String |
getNotNullToNullableErrorCode()
|
(package private) static int |
getObjectNameMaxLength()
|
static SQLGenerator |
getSQLGenerator()
Load and buffer the appropriate SQL generator for the system's configuration. |
(package private) static String |
getSQLTypeAsString(int sqlTypeInd,
int length)
The caller already knows this is a SQL type, and not a custom type. |
(package private) static String |
getStorageText(String conceptualSize)
|
(package private) static boolean |
installProcedures()
|
(package private) static boolean |
isABlobType(int sqlTypeInd)
|
(package private) static boolean |
isASmallBlobType(int sqlTypeInd)
|
(package private) static boolean |
isAVarchar2TypeLength4000(int sqlTypeInd,
int length)
|
(package private) static boolean |
isSequenceType(int sqlTypeInd)
|
(package private) static boolean |
isStandardType(String typeName)
|
(package private) static StatementAndResultSet |
localGetColumns(String catalog,
String schemaPattern,
String tableNamePattern,
String columnNamePattern)
This is a localized version of the sample OracleDatabaseMetaData.getColumns provided with Oracle 8.0.4. |
(package private) static ConnectionProvider |
newConnectionProvider()
|
(package private) static oracle.jdbc.driver.OracleDriver |
newDriver()
|
(package private) static void |
readDbTables(Hashtable dbTablesOrViews,
String[] tableOrViewTypes)
|
(package private) static void |
setRemarksReporting(Connection connection,
boolean x)
|
(package private) static boolean |
testIsAReservedWord(String x)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
static final int OLD_COLUMN
static final int NEW_COLUMN
static final int MOD_COLUMN
private static final String TINY
private static final String SMALL
private static final String MEDIUM
private static final String LARGE
private static final String HUGE
static String TINYTABLESIZE
static String SMALLTABLESIZE
static String MEDIUMTABLESIZE
static String LARGETABLESIZE
static String HUGETABLESIZE
static String BLOBTSNAME
static String CHUNKSIZE
static String SERVICE_NAME
private static String DB_DIR
static String DB_USER
private static String DB_PASSWORD
private static String DB_SERVICE_URL
private static String DB_SERVICE_DRIVER
private static String JDBC_DRIVER
static String LINE_SEPARATOR
static boolean NORMALIZE_INDEX_COLUMN_NAMES
private static SQLGenerator sqlGenerator_
private static boolean doesSqlGeneratorSupportFbis_
private static boolean doesDataStoreSupportFbis_
private static boolean doesDataStoreSupportFbisIsSet_
private static Connection connection_
Constructor Detail |
Db()
Method Detail |
static void establishConnection() throws CompareSchemaException
CompareSchemaException
static Connection connectToDatabase() throws SQLException
SQLException
- If the JDBC driver is no longer supported by this class.static String getSQLTypeAsString(int sqlTypeInd, int length)
sqlTypeInd
- An "int" representing the SQL Type.length
- The VARCHAR2 length of the String representation.
static boolean isSequenceType(int sqlTypeInd)
static boolean isABlobType(int sqlTypeInd)
static boolean isASmallBlobType(int sqlTypeInd)
static boolean isAVarchar2TypeLength4000(int sqlTypeInd, int length)
static boolean testIsAReservedWord(String x)
static String createView(String class_name, DatabaseInfo dbInfo) throws IOException, WTException
IOException
WTException
static oracle.jdbc.driver.OracleDriver newDriver()
static int getInvalidColumnNameErrorCode()
static int getObjectNameMaxLength()
static String getDroppedTableDoesNotExistErrorCode()
static String getNotNullToNullableErrorCode()
static void setRemarksReporting(Connection connection, boolean x)
static StatementAndResultSet localGetColumns(String catalog, String schemaPattern, String tableNamePattern, String columnNamePattern) throws SQLException
catalog
- Is always null.schemaPattern
- The DB_USER, all in upper case.tableNamePattern
- The tableName, all in upper case.columnNamePattern
- All columns use '%'.
SQLException
- If the executeQuery() failed.static String getStorageText(String conceptualSize)
static boolean isStandardType(String typeName)
static void closeResultSet(ResultSet result_set)
static void closeStatement(Statement statement)
static DatabaseMetaData getMetaData() throws SQLException
SQLException
static Statement createStatement() throws SQLException
SQLException
static void readDbTables(Hashtable dbTablesOrViews, String[] tableOrViewTypes) throws CompareSchemaException
CompareSchemaException
static Hashtable getDbTableColumns(String tableName) throws CompareSchemaException
CompareSchemaException
protected Hashtable getDBSequences() throws CompareSchemaException
CompareSchemaException
static Vector getDbIndexes(String dbTableName) throws CompareSchemaException
CompareSchemaException
static boolean installProcedures()
static ConnectionProvider newConnectionProvider()
public static SQLGenerator getSQLGenerator()
Also decides (and remembers) if function based indices are supported based on the type of generator created. This will affect how indices are compared and created.
WTRuntimeException
- Currently, only the Oracle SQLGenerator is supported.static boolean doesSqlGeneratorSupportFbis()
static boolean doesDataStoreSupportFbis()
private static boolean determineIfDataStoreSupportsFbis()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |