com.ptc.windchill.upgrade.modeldiff
Class TableDef

java.lang.Object
  extended bycom.ptc.windchill.upgrade.modeldiff.TableDef

class TableDef
extends Object


Field Summary
private  Vector addCols_
           
private  Vector columns_
           
private  String conceptualSize_
           
private  Vector modCols_
           
private  String name_
           
private  String tablespaceName_
           
 
Constructor Summary
(package private) TableDef(String inName, String inTsName, String inSize, Vector cols)
           
 
Method Summary
(package private)  void addColumn(AttribsList col)
           
private  String blobStorageClauseIfStatusIsNewColumn()
           
(package private)  String generateAlterTable(boolean includeBlobClause)
           
private  String generateBlobInitializationStatement()
          Prepares a statement that looks like the following for each new blob column.
(package private)  String generateMigrateClause()
          Produce an update statement to set values for any new columns for which we know the initial values.
(package private)  Vector getAddCols()
           
(package private)  Enumeration getAddedColumns()
           
(package private)  Enumeration getModifiedColumns()
           
(package private)  boolean isAddAlter()
           
(package private)  boolean isModAlter()
           
 String tableToString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

name_

private String name_

tablespaceName_

private String tablespaceName_

conceptualSize_

private String conceptualSize_

columns_

private Vector columns_

modCols_

private Vector modCols_

addCols_

private Vector addCols_
Constructor Detail

TableDef

TableDef(String inName,
         String inTsName,
         String inSize,
         Vector cols)
Method Detail

tableToString

public String tableToString()

getAddCols

Vector getAddCols()

addColumn

void addColumn(AttribsList col)

getAddedColumns

Enumeration getAddedColumns()

getModifiedColumns

Enumeration getModifiedColumns()

isModAlter

boolean isModAlter()

isAddAlter

boolean isAddAlter()

generateAlterTable

String generateAlterTable(boolean includeBlobClause)
                    throws CompareSchemaException
Throws:
CompareSchemaException

generateMigrateClause

String generateMigrateClause()
                       throws WTIntrospectionException
Produce an update statement to set values for any new columns for which we know the initial values.

Returns:
A Migrate Clause or a null if no initial values are to be set.
Throws:
WTIntrospectionException

blobStorageClauseIfStatusIsNewColumn

private String blobStorageClauseIfStatusIsNewColumn()

generateBlobInitializationStatement

private String generateBlobInitializationStatement()
Prepares a statement that looks like the following for each new blob column.
    UPDATE table SET blob_column=empty_blob() WHERE blob_column IS NULL;
 

Returns:
Zero or more statements, each on its own line, or null if there are no new blob columns.