com.ptc.windchill.upgrade.directives.mig
Class RenameClassReferencesInColumns
java.lang.Object
com.ptc.windchill.upgrade.directives.ForEachClassNameDbColumn
com.ptc.windchill.upgrade.directives.mig.RenameClassReferencesInColumns
- public final class RenameClassReferencesInColumns
- extends ForEachClassNameDbColumn
Changes all references to a particular class to reference another class
for each column in the database that may contain a Java class name reference.
This will not account for references buried in serialized entries or
ones that are stored in other non-standard ways.
Method Summary |
String |
getNewClassName()
The fully qualified class name that should replace the old class name. |
String |
getOldClassName()
The fully qualified class name replace with the new class name. |
protected String |
produceSqlForTableColumn(String table_name,
String column_name)
Called by the superclass...generates an update statement that looks like UPDATE table_name SET column_name='getNewClassName()' where column_name='getOldClassName()' |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
oldClassName
private String oldClassName
newClassName
private String newClassName
RenameClassReferencesInColumns
public RenameClassReferencesInColumns(String old_class_name,
String new_class_name)
- Create an instance to convert the old class name to the new class name.
- Throws:
IllegalArgumentException
- if either class name is null
getOldClassName
public final String getOldClassName()
- The fully qualified class name replace with the new class name.
getNewClassName
public final String getNewClassName()
- The fully qualified class name that should replace the old class name.
produceSqlForTableColumn
protected final String produceSqlForTableColumn(String table_name,
String column_name)
- Called by the superclass...generates an update statement that looks like
UPDATE table_name SET column_name='getNewClassName()' where column_name='getOldClassName()'
- Specified by:
produceSqlForTableColumn
in class ForEachClassNameDbColumn
- Returns:
- must always return a valid, non-null SQL