|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectcom.ptc.windchill.esi.migrate.MigratorService
Utility class that provides basic migration services. These methods are meant only to be used server-side.
Field Summary | |
private static PrintWriter |
log
|
Constructor Summary | |
MigratorService()
|
Method Summary | |
static void |
freeResources(ResultSet rs)
Releases the resources used by the supplied ResultSet. |
static void |
freeResources(Statement statement)
Releases the resources used by the supplied Statement. |
static Connection |
getConnection()
Returns a JDBC connection to the Windchill database. |
protected static PrintWriter |
getLog()
Obtains the log in which information and errors can be recorded related to the migration processing. |
static String |
getLogFileName()
Obtains the name of the log file used to record the details related to the migration processing. |
static Persistable |
getObject(ObjectIdentifier objectId)
Returns the Persistable represented by the supplied object identifier. |
static ObjectIdentifier |
getObjectId(String className,
long id)
Creates an ObjectIdentifier instance from the supplied class name and identity. |
static PersistentObjectManager |
getPOM()
Returns a PersistentObjectManager for the Windchill database. |
static Persistable |
getRoleAObject(ResultSet rs)
Returns the Persistable represented by the Role A relationship contained in the supplied ResultSet. |
static ObjectIdentifier |
getRoleAObjectId(ResultSet rs)
Extracts the ObjectIdentifier for the Role A relationship contained in the supplied ResultSet. |
static Persistable |
getRoleBObject(ResultSet rs)
Returns the Persistable represented by the Role B relationship contained in the supplied ResultSet. |
static ObjectIdentifier |
getRoleBObjectId(ResultSet rs)
Extracts the ObjectIdentifier for the Role B relationship contained in the supplied ResultSet. |
static TimeZone |
getTimeZone()
Returns the time zone used by Windchill. |
static String |
getUserName()
Returns the name of the user currently logged into Windchill. |
static boolean |
hasTable(String tableName)
Determines if a table exists in the Windchill database for the supplied name. |
static void |
log(Exception e)
Logs the supplied exception. |
static void |
log(String msg)
Logs the supplied message. |
static void |
log(String msg,
Exception e)
Logs the supplied message and exception. |
static ResultSet |
query(String sql)
Executes the supplied SQL query on the Windchill database, returning the query's resultset. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
private static PrintWriter log
Constructor Detail |
public MigratorService()
Method Detail |
public static Connection getConnection() throws WTException
WTException
public static PersistentObjectManager getPOM() throws WTException
WTException
public static String getUserName()
WTException
public static TimeZone getTimeZone()
public static boolean hasTable(String tableName) throws WTException
tableName
- - the name of the table to locate
WTException
public static ResultSet query(String sql) throws WTException
sql
- - the SQL query to execute
WTException
public static void freeResources(ResultSet rs)
rs
- - the ResultSet, may be nullpublic static void freeResources(Statement statement)
statement
- - the Statement, may be nullpublic static ObjectIdentifier getObjectId(String className, long id) throws WTException
className
- - the class name of the objectid
- - the identity of the object
WTException
public static Persistable getObject(ObjectIdentifier objectId) throws WTException
objectId
- - the object identifier
WTException
public static ObjectIdentifier getRoleAObjectId(ResultSet rs) throws WTException
rs
- - the ResultSet that contains the role columns
WTException
public static ObjectIdentifier getRoleBObjectId(ResultSet rs) throws WTException
rs
- - the ResultSet that contains the role columns
WTException
public static Persistable getRoleAObject(ResultSet rs) throws WTException
rs
- - the ResultSet that contains the role columns
WTException
public static Persistable getRoleBObject(ResultSet rs) throws WTException
rs
- - the ResultSet that contains the role columns
WTException
public static void log(String msg)
msg
- - the message to logpublic static void log(Exception e)
e
- - the exception to logpublic static void log(String msg, Exception e)
msg
- - the message to loge
- - the exception to logprotected static PrintWriter getLog()
public static String getLogFileName() throws IOException
IOException
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |