blob: 42f0616d6beee5ab2785e70582d03f5b60d4b20a (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
|
/*******************************************************************************
* Copyright (c) 2004, 2007 Boeing.
* All rights reserved. This program and the accompanying materials
* are made available under the terms of the Eclipse Public License v1.0
* which accompanies this distribution, and is available at
* http://www.eclipse.org/legal/epl-v10.html
*
* Contributors:
* Boeing - initial API and implementation
*******************************************************************************/
package org.eclipse.osee.framework.derby;
import java.sql.Connection;
import java.sql.DriverManager;
import java.util.Properties;
import org.eclipse.osee.framework.database.core.IConnectionFactory;
/**
* @author Roberto E. Escobar
*/
public class EmbeddedDerbyConnection implements IConnectionFactory {
private static final String driver = "org.apache.derby.jdbc.EmbeddedDriver";
@Override
public Connection getConnection(Properties properties, String connectionURL) throws Exception {
Class.forName(driver);
Connection connection = DriverManager.getConnection(connectionURL, properties);
return connection;
}
@Override
public String getDriver() {
return driver;
}
}
|