use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.
the class PostgreSQLVerifyCalcTest method setUp.
@Before
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
final String[] parts = CConfigLoader.loadPostgreSQL();
m_database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_import", parts[1], parts[2], parts[3], false, false);
m_database.connect();
m_database.load();
}
use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.
the class PostgreSQLVerifyNotepadTest method setUp.
@Before
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
final String[] parts = CConfigLoader.loadPostgreSQL();
m_database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_import", parts[1], parts[2], parts[3], false, false);
m_database.connect();
m_database.load();
}
use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.
the class PostgreSQLConvertNotepadTest method setUp.
@Before
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
final String[] parts = CConfigLoader.loadPostgreSQL();
database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_import", parts[1], parts[2], parts[3], false, false);
database.connect();
database.load();
}
use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.
the class PostgreSQLEmptyDatabaseTest method setUp.
@Test
public void setUp() throws IOException, CouldntLoadDriverException, CouldntConnectException, IllegalStateException, CouldntLoadDataException, InvalidDatabaseException, CouldntInitializeDatabaseException, InvalidExporterDatabaseFormatException, InvalidDatabaseVersionException, LoadCancelledException {
final String[] parts = CConfigLoader.loadPostgreSQL();
final CDatabase database = new CDatabase("None", CJdbcDriverNames.jdbcPostgreSQLDriverName, parts[0], "test_empty", parts[1], parts[2], parts[3], false, false);
database.connect();
database.load();
database.close();
}
use of com.google.security.zynamics.binnavi.Database.CDatabase in project binnavi by google.
the class CMain method prepareDatabaseConnections.
/**
* Loads all database connections that are loaded automatically on startup.
*/
private static void prepareDatabaseConnections() {
NaviLogger.info("Initializing database connections");
// Read database information from the configuration file.
final CDatabaseManager manager = CDatabaseManager.instance();
for (final DatabaseConfigItem database : ConfigManager.instance().getDatabases()) {
manager.addDatabase(new CDatabase(database.getDescription(), database.getDriver(), database.getHost(), database.getName(), database.getUser(), database.getPassword(), database.getIdentity(), database.isSavePassword(), database.isAutoConnect()));
}
}
Aggregations