public class ExternalDriverApp
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
ExternalDriverApp.Status
The Enum Status.
|
Modifier and Type | Field and Description |
---|---|
static java.lang.String |
EXTERNAL_DIALECT_CLASS_PREFIX
The property value is the class in the previous jar that implements java.sql.Driver
|
static java.lang.String |
EXTERNAL_DIALECT_JAR_PREFIX
The property value is the Jar URL.
|
static java.lang.String |
EXTERNAL_DRIVER_CLASS_PREFIX
The property value is the class in the previous jar that implements java.sql.Driver
|
static java.lang.String |
EXTERNAL_DRIVER_JAR_PREFIX
The property value is the Jar URL.
|
Constructor and Description |
---|
ExternalDriverApp(HasProperties app)
Creates an instance of the ExternalDriverApp to allow an application to dynamically load jar files
that contains a class that implements a driver to connect to a database.
|
Modifier and Type | Method and Description |
---|---|
void |
externalJarAndClassesToProperties()
External jar and classes to properties.
|
java.lang.String |
getExternalDialectClass()
Gets the external dialect class.
|
java.lang.String |
getExternalDialectJar()
Gets the external dialect jar.
|
java.lang.String |
getExternalDriverClass()
Gets the external driver class.
|
java.lang.String |
getExternalDriverJar()
Gets the external driver jar.
|
java.lang.Throwable |
getLastError()
Gets the last error.
|
ExternalDriverApp.Status |
getStatus()
Gets the status.
|
void |
loadDriver()
Load driver.
|
void |
propertiesToExternalJarAndClasses()
Properties to external jar and classes.
|
java.lang.Thread |
setContextClassLoader(java.lang.Thread th)
Sets the context class loader.
|
void |
setExternalDialect(java.lang.String jar,
java.lang.String _class)
Sets the external dialect.
|
void |
setExternalDriver(java.lang.String jar,
java.lang.String _class)
Sets the external driver.
|
public static java.lang.String EXTERNAL_DRIVER_JAR_PREFIX
public static java.lang.String EXTERNAL_DRIVER_CLASS_PREFIX
public static java.lang.String EXTERNAL_DIALECT_JAR_PREFIX
public static java.lang.String EXTERNAL_DIALECT_CLASS_PREFIX
public ExternalDriverApp(HasProperties app)
after creating an instance of this class, the application can call propertiesToExternalJarAndClasses()
in
order to load the information from properties in the application. Then, another call to loadDriver()
will setup the class loader to find the user defined class
app
- this is the parent application class that can provide properties where the class name and jar is storedpublic java.lang.String getExternalDriverClass()
public java.lang.String getExternalDriverJar()
public java.lang.String getExternalDialectClass()
public java.lang.String getExternalDialectJar()
public ExternalDriverApp.Status getStatus()
public java.lang.Throwable getLastError()
public void setExternalDriver(java.lang.String jar, java.lang.String _class)
jar
- the jar_class
- the _classpublic void setExternalDialect(java.lang.String jar, java.lang.String _class)
jar
- the jar_class
- the _classpublic void propertiesToExternalJarAndClasses()
public void loadDriver()
public java.lang.Thread setContextClassLoader(java.lang.Thread th)
th
- the thpublic void externalJarAndClassesToProperties()
Copyright 2006-2015 Reporting Standard S.L., C/ Torrecilla del Puerto 1, 28043, Madrid, Espaņa