wt.tools.generation.sql
Class OracleStandardSQLGenerator
java.lang.Object
wt.tools.generation.sql.SQLGenerator
wt.tools.generation.sql.OracleSQLGenerator
wt.tools.generation.sql.OracleStandardSQLGenerator
- public class OracleStandardSQLGenerator
- extends OracleSQLGenerator
Construct a block of sql code for Standard Oracle to create a table, Index
and computed columns. Standard Oracle 8i,9i does not support Function Based
Indexes, So most of the code in this class is to work around function based
Indexes with computed columns in the tables and having triggers on the table
to populate the computed column with the prespecified function and to create
index on the computed column to simulate function based indexes.
Methods inherited from class wt.tools.generation.sql.OracleSQLGenerator |
createArray, createColumnIndex, createFKConstraints, createIndexOption, createIndicies, createSequence, createStruct, createTable, createTriggerConstraints_removeLink, createTriggerConstraints_removeRole, dropArray, dropColumnIndex, dropFKConstraints, dropIndex, dropIndicies, dropSequence, dropStruct, dropTable, getCommitDelimiter, getIndexColumns, getMaxIndexNameLength, getSQLTypeAsString, getSQLTypeString, getUniqueNames, isReservedWord, isSQLTypeBlob, isSqlTypeLob, preCreateView |
Methods inherited from class wt.tools.generation.sql.SQLGenerator |
createAllClassesTriggerConstraintItems, createAlterTableAddColumns, createAlterTableDropColumns, createFKConstraintItems, createFKConstraintItems, createFKConstraintItems, createIndex, createIndexItems, createLinkSpecificTriggerConstraintItems, createLinkTriggerConstraintItems, createRoleFKConstraintItems, createRoleTriggerConstraintItems, createTableItems, createTriggerConstraintItems, createView, dropIndexItems, dropView, getAdjustedName, getComputedIndexColumns, getDescendentTables, getIndexName, getProcessedLinkInfos, isComputedColumn |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
OracleStandardSQLGenerator
public OracleStandardSQLGenerator()
getUpdateColumnList
public HashSet getUpdateColumnList(BaseTableInfo tableInfo)
throws WTException
- Overrides:
getUpdateColumnList
in class SQLGenerator
- Throws:
WTException
getTriggerNameList
public HashSet getTriggerNameList(BaseTableInfo tableInfo)
throws WTException
- Overrides:
getTriggerNameList
in class SQLGenerator
- Throws:
WTException
createTriggerItems
public String createTriggerItems(String a_className,
DatabaseInfo a_dbInfo)
throws WTException
- Overrides:
createTriggerItems
in class OracleSQLGenerator
- Throws:
WTException
changeExpression
private void changeExpression(ColumnDescriptor[] allTableColumns,
String functionDefinition,
StringBuffer newFunction,
StringBuffer columnList)
dropTriggerItems
public String dropTriggerItems(String a_className,
DatabaseInfo a_dbInfo)
throws WTException
- Overrides:
dropTriggerItems
in class SQLGenerator
- Throws:
WTException
getComputedColumns
public ColumnDescriptor[] getComputedColumns(BaseTableInfo a_tableInfo)
throws WTException
- Overrides:
getComputedColumns
in class SQLGenerator
- Throws:
WTException
getIndexColumns
public String[] getIndexColumns(String[] a_indexColumns,
boolean a_isUnique,
int a_indexOffset)
getTableColumns
public ColumnDescriptor[] getTableColumns(BaseTableInfo a_tableInfo)
throws WTException
- Overrides:
getTableColumns
in class SQLGenerator
- Throws:
WTException
replaceAll
private String replaceAll(String original,
String insert,
String remove)