public class DatabaseFactory extends Object
Database
s.
It creates a database using parameters specified in a DatabaseConfiguration
.
Databases are accessed by name from the factory.Modifier and Type | Method and Description |
---|---|
void |
addDatabase(DatabaseConfiguration configuration)
Add a database to the factory.
|
Database |
getDatabase(String name)
Return the database with the given name.
|
Collection<String> |
getDatabaseNames()
Return the names of all databases.
|
Database |
getDefaultDatabase()
Return the default database.
|
static DatabaseFactory |
getInstance()
Return the DatabaseFactory instance.
|
public static DatabaseFactory getInstance()
public void addDatabase(DatabaseConfiguration configuration) throws T2DBException
configuration
- the configuration of the databaseT2DBException
public Database getDefaultDatabase() throws T2DBException
T2DBException
public Collection<String> getDatabaseNames()
public Database getDatabase(String name) throws T2DBException
name
- a stringT2DBException
Copyright © 2017. All rights reserved.