|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectwt.folder.CabinetMigrator
With R6, a new column has been introduced into Cabinet: PERSONALCABINET. This needs to be set to true (1) if object resides in User domain. Otherwise, it needs to be set to false (0). With R6, a new column has been introduced in many tables: INHERITEDDOMAIN. This needs to be set to true (1) for any concrete class that impletments either wt.folder.Foldered or wt.enterprise.CabinetManaged and is DomainAdministered. In pre-R6, the domain of the parent folder or cabinet is the same as the domain of the foldered or cabinet managed object. With R6, this is now based on the column, INHERITEDDOMAIN.
Field Summary | |
private PrintWriter |
debugLog
|
private Hashtable |
DomainAdministeredTable
|
private String |
USER_DOMAIN
|
Constructor Summary | |
CabinetMigrator()
|
Method Summary | |
private void |
findTables(Connection connection,
Class aClass)
Find necessary tables and call updateInheritedDomain to update INHERITEDDOMAIN. |
boolean |
runMigration(Connection connection,
PersistentObjectManager pom,
PrintWriter logWriter)
Run the migration. |
private void |
setDomainAdministeredTable()
Set DomainAdministeredTable to have all objects that are DomainAdministered. |
private void |
setPersonalCabinet(Connection connection)
Set PersonalCabinet to true (1) if object resides in User domain. |
private void |
updateInheritedDomain(Connection connection,
ClassInfo descendant_info)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private PrintWriter debugLog
private String USER_DOMAIN
private Hashtable DomainAdministeredTable
Constructor Detail |
public CabinetMigrator()
Method Detail |
public boolean runMigration(Connection connection, PersistentObjectManager pom, PrintWriter logWriter) throws SQLException, WTIntrospectionException, DatastoreException, IOException, ClassNotFoundException, WTException
Migrator
Migrators should log all output to the given PrintWriter. This is the log that is created by RunMigrators. It is an autoflush writer.
Migrators should return true if they successfully completed migration and false otherwise. It is the migrator's responsibility to log failure reasons to the log.
Migrators should not concern themselves with committing the work on the connection. The MigratorRunner will commit the connection work after running each Migrator.
runMigration
in interface Migrator
connection
- an open connection to the Windchill databasepom
- a persistent object manager against the Windchill databaselogWriter
- an autoflush printwriter for logging any and all output
SQLException
WTIntrospectionException
DatastoreException
IOException
ClassNotFoundException
WTException
private void setPersonalCabinet(Connection connection) throws SQLException, IOException, PersistenceException, DatastoreException
SQLException
IOException
PersistenceException
DatastoreException
private void setDomainAdministeredTable() throws PersistenceException, WTIntrospectionException
PersistenceException
WTIntrospectionException
private void findTables(Connection connection, Class aClass) throws SQLException, WTIntrospectionException
SQLException
WTIntrospectionException
private void updateInheritedDomain(Connection connection, ClassInfo descendant_info) throws SQLException, WTIntrospectionException
SQLException
WTIntrospectionException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |