public class DatabaseFactory extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
DatabaseFactory.Parameter |
Constructor and Description |
---|
DatabaseFactory() |
Modifier and Type | Method and Description |
---|---|
static DatabaseType |
getConnectedDatabaseType(ConfigurationProperty dbProperty)
Connect to a database from a ConfigurationProperty.
|
static DatabaseType |
getConnectedDatabaseType(java.util.Map<java.lang.String,java.lang.String> parameters,
java.lang.String moduleName)
Get a connected database from connection parameters.
|
static java.sql.Connection |
getDBConnection()
Convenience method to get connection to default kepler DB,
which is currently HSQL.
|
static java.util.List<java.lang.String> |
getNames()
Get all the type names.
|
static DatabaseType |
getType(java.lang.String name)
Get the DatabaseType from a name.
|
static void |
shutdownCacheServer()
Shut down the server for the kepler cache database.
|
public DatabaseFactory()
public static java.sql.Connection getDBConnection() throws java.sql.SQLException, java.lang.ClassNotFoundException
java.sql.SQLException
java.lang.ClassNotFoundException
public static DatabaseType getConnectedDatabaseType(ConfigurationProperty dbProperty) throws java.sql.SQLException
java.sql.SQLException
public static DatabaseType getConnectedDatabaseType(java.util.Map<java.lang.String,java.lang.String> parameters, java.lang.String moduleName) throws java.sql.SQLException
java.sql.SQLException
public static DatabaseType getType(java.lang.String name)
public static java.util.List<java.lang.String> getNames()
public static void shutdownCacheServer()