public class JDBCDataSource
extends java.lang.Object
J2EEDataSource
Constructor and Description |
---|
JDBCDataSource() |
Modifier and Type | Method and Description |
---|---|
static void |
clearStringBeanProperty(java.lang.Object ds,
java.lang.String property)
Clear a String Java bean property by setting it to null.
|
static java.lang.Object |
getBeanProperty(java.lang.Object ds,
java.lang.String property)
Get a bean property for a data source.
|
static javax.sql.DataSource |
getDataSource()
Return a new DataSource corresponding to the current
configuration.
|
static javax.sql.DataSource |
getDataSource(java.lang.String dbName)
Return a new DataSource corresponding to the current
configuration except that the database name is different.
|
(package private) static javax.sql.DataSource |
getDataSource(TestConfiguration config,
java.util.HashMap beanProperties)
Create a new DataSource object setup from the passed in TestConfiguration.
|
(package private) static java.lang.Object |
getDataSource(TestConfiguration config,
java.util.HashMap beanProperties,
java.lang.String dsClassName)
Create a new DataSource object setup from the passed in
TestConfiguration using the received properties and data
source class name.
|
static javax.sql.DataSource |
getDataSourceLogical(java.lang.String logicalDatabasename)
Return a DataSource corresponding to one
of the logical databases in the current configuration.
|
(package private) static javax.sql.DataSource |
getDataSourceObject(java.lang.String classname,
java.util.HashMap beanProperties)
Return a DataSource object of the passed in type
configured with the passed in Java bean properties.
|
(package private) static java.util.HashMap<java.lang.String,java.lang.Object> |
getDataSourceProperties(TestConfiguration config)
Create a HashMap with the set of Derby DataSource
Java bean properties corresponding to the configuration.
|
private static java.lang.String |
getGetterName(java.lang.String attribute) |
private static java.lang.String |
getSetterName(java.lang.String attribute) |
static void |
setBeanProperty(java.lang.Object ds,
java.lang.String property,
java.lang.Object value)
Set a bean property for a data source.
|
static void |
shutdownDatabase(javax.sql.DataSource ds)
Shutdown the database described by this data source.
|
static void |
shutEngine(javax.sql.DataSource ds)
Shutdown the engine described by this data source.
|
public static javax.sql.DataSource getDataSource()
public static javax.sql.DataSource getDataSource(java.lang.String dbName)
public static javax.sql.DataSource getDataSourceLogical(java.lang.String logicalDatabasename)
static javax.sql.DataSource getDataSource(TestConfiguration config, java.util.HashMap beanProperties)
static java.lang.Object getDataSource(TestConfiguration config, java.util.HashMap beanProperties, java.lang.String dsClassName)
static java.util.HashMap<java.lang.String,java.lang.Object> getDataSourceProperties(TestConfiguration config)
static javax.sql.DataSource getDataSourceObject(java.lang.String classname, java.util.HashMap beanProperties)
public static void setBeanProperty(java.lang.Object ds, java.lang.String property, java.lang.Object value)
ds
- DataSource to have property setproperty
- name of property.value
- Value, type is derived from value's class.public static java.lang.Object getBeanProperty(java.lang.Object ds, java.lang.String property) throws java.lang.Exception
ds
- DataSource to fetch property fromproperty
- name of property.java.lang.Exception
public static void clearStringBeanProperty(java.lang.Object ds, java.lang.String property)
ds
- DataSource to have property clearedproperty
- name of property.private static java.lang.String getSetterName(java.lang.String attribute)
private static java.lang.String getGetterName(java.lang.String attribute)
public static void shutdownDatabase(javax.sql.DataSource ds)
public static void shutEngine(javax.sql.DataSource ds) throws java.sql.SQLException
java.sql.SQLException
Apache Derby V10.13 Internals - Copyright © 2004,2016 The Apache Software Foundation. All Rights Reserved.