public static class Type {
private static HashMap<String, Database> registeredDatabases = new HashMap<String, Database>();
public static void registerDatabase(String name, Database db) throws DatabaseException {
if (registeredDatabases.containsKey(name)) {
throw new DatabaseException(name + " cannot be registered. Type already exists");
}
registeredDatabases.put(name, db);
}