com.dbmain.jidbm
Class DBMClassLoader

java.lang.Object
  extended by com.dbmain.jidbm.DBMClassLoader

public class DBMClassLoader
extends java.lang.Object

Class loader for Java plug-ins in DB-MAIN.

DB-MAIN does not use the system class loader because all classes loaded through the system class loader will never be unloaded. To allow the program to let reedit the source for a class, and then recompile and reload it, we need to work with a different class loader. To work, the loaded class must be in a different directory than jidbm.jar package.


Constructor Summary
DBMClassLoader()
           
 
Method Summary
static int executeAnalysisFunction(java.lang.String classpath, java.lang.String cname, java.lang.String fname, int oid, java.lang.String param)
          Method called by DB-MAIN to load a Java plug-in in the schema analysis assistant.
static void executeClass(java.lang.String classpath, java.lang.String cname)
          Method called by DB-MAIN to load a Java plug-in through the menu File/Execute plug-in...
static void executeExternMDL(java.lang.String classpath, java.lang.String cname, java.lang.String fname, java.lang.Object[] o)
          Method called by DB-MAIN to load a Java plug-in through a methodology.
static void executePatternFunction(java.lang.String classpath, java.lang.String cname, java.lang.String fname, int n, java.lang.String var1, java.lang.String var2, java.lang.String var3, java.lang.String var4, java.lang.String var5)
          Method called by DB-MAIN to load a Java plug-in in the execute pattern function of text analysis assistant.
static boolean executeTransfoClass(java.lang.String classpath, java.lang.String fname, int oid, int[] toid)
          Method called by DB-MAIN to load the Transfo Java plug-in (except for data integration preprocessing).
static boolean executeTransfoIntegrationClass(java.lang.String classpath, java.lang.String fname, int moid, int[] tmoid, int soid, int[] tsoid, java.lang.String sup, int[] tsuoid, short type)
          Method called by DB-MAIN to load the Transfo Java plug-in for the data integration preprocessing.
static int executeTransformationFunction(java.lang.String classpath, java.lang.String cname, java.lang.String fname, int[] toid, int conf)
          Method called by DB-MAIN to load a Java plug-in in the advanced global transformation assistant.
static int executeVerifFKFunction(java.lang.String classpath, java.lang.String cname, java.lang.String fname, int grid1, int grid2, char type)
          Method called by DB-MAIN to load a Java plug-in in the referential key assistant.
static java.lang.String findJarMainClass(java.lang.String jarname)
          Method called by DB-MAIN to load a Java plug-in through the menu File/Execute plug-in...
static java.lang.ClassLoader getClassLoader(java.lang.String cname)
          Method for retrieving the ClassLoader used for the last load of a specified class
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DBMClassLoader

public DBMClassLoader()
Method Detail

getClassLoader

public static java.lang.ClassLoader getClassLoader(java.lang.String cname)
Method for retrieving the ClassLoader used for the last load of a specified class

Parameters:
class - name
Returns:
the ClassLoader used or null if class has never been loaded

executeClass

public static void executeClass(java.lang.String classpath,
                                java.lang.String cname)
Method called by DB-MAIN to load a Java plug-in through the menu File/Execute plug-in...

Parameters:
classpath - the local classpath.
cname - the class name or jar file.

findJarMainClass

public static java.lang.String findJarMainClass(java.lang.String jarname)
Method called by DB-MAIN to load a Java plug-in through the menu File/Execute plug-in...

Parameters:
classpath - the local classpath.
jarname - the jar filename (with absolute path).

executeExternMDL

public static void executeExternMDL(java.lang.String classpath,
                                    java.lang.String cname,
                                    java.lang.String fname,
                                    java.lang.Object[] o)
Method called by DB-MAIN to load a Java plug-in through a methodology.

Parameters:
classpath - the local classpath.
cname - the class name or jar file.
fname - the function name.
o - the object array containing parameters for external method.

executeTransfoClass

public static boolean executeTransfoClass(java.lang.String classpath,
                                          java.lang.String fname,
                                          int oid,
                                          int[] toid)
Method called by DB-MAIN to load the Transfo Java plug-in (except for data integration preprocessing).

Parameters:
classpath - the local classpath.
fname - the function name.
oid - the object identifier of transformed object.
toid - the object identifier array.
Returns:
the transfo plug-in result.

executeTransfoIntegrationClass

public static boolean executeTransfoIntegrationClass(java.lang.String classpath,
                                                     java.lang.String fname,
                                                     int moid,
                                                     int[] tmoid,
                                                     int soid,
                                                     int[] tsoid,
                                                     java.lang.String sup,
                                                     int[] tsuoid,
                                                     short type)
Method called by DB-MAIN to load the Transfo Java plug-in for the data integration preprocessing.

Parameters:
classpath - the local classpath.
fname - the function name.
moid - the object identifier of master object.
tmoid - the element object identifier array of master object.
soid - the object identifier of slave object.
tsoid - the element object identifier array of slave object.
sup - the name of super-type object.
tsuoid - the element object identifier array of super-type object.
type - the type of strategy integration.
Returns:
the transfo plug-in result.

executeAnalysisFunction

public static int executeAnalysisFunction(java.lang.String classpath,
                                          java.lang.String cname,
                                          java.lang.String fname,
                                          int oid,
                                          java.lang.String param)
Method called by DB-MAIN to load a Java plug-in in the schema analysis assistant.

Parameters:
classpath - the local classpath.
cname - the class name or jar file.
fname - the function name.
oid - the identifier of object to be analysed.
param - the parameters of function fname.
Returns:
the analysis result.

executeTransformationFunction

public static int executeTransformationFunction(java.lang.String classpath,
                                                java.lang.String cname,
                                                java.lang.String fname,
                                                int[] toid,
                                                int conf)
Method called by DB-MAIN to load a Java plug-in in the advanced global transformation assistant.

Parameters:
classpath - the local classpath.
cname - the class name or jar file.
fname - the function name.
toid - the identifier array of objects to be transformed.
Returns:
the transformation result.

executePatternFunction

public static void executePatternFunction(java.lang.String classpath,
                                          java.lang.String cname,
                                          java.lang.String fname,
                                          int n,
                                          java.lang.String var1,
                                          java.lang.String var2,
                                          java.lang.String var3,
                                          java.lang.String var4,
                                          java.lang.String var5)
Method called by DB-MAIN to load a Java plug-in in the execute pattern function of text analysis assistant.

Parameters:
classpath - the local classpath.
cname - the class name or jar file.
fname - the function name.
n - the number of parameters.
var1 - the first string parameter.
var2 - the second string parameter.
var3 - the third string parameter.
var4 - the fourth string parameter.
var5 - the fith string parameter.

executeVerifFKFunction

public static int executeVerifFKFunction(java.lang.String classpath,
                                         java.lang.String cname,
                                         java.lang.String fname,
                                         int grid1,
                                         int grid2,
                                         char type)
Method called by DB-MAIN to load a Java plug-in in the referential key assistant.

Parameters:
classpath - the local classpth.
cname - the class name.
fname - the function name.
grid1 - the origin group or attribute.
grid2 - the target group.
type - the type of constraint.
Returns:
the foreign key creation result.