Fixed: couldn't launch linked files nor launch files under a linked folder when local...
[phpeclipse.git] / archive / net.sourceforge.phpeclipse.quantum.sql / src / com / quantum / adapters / AdapterFactory.java
index 8ff6821..bd05994 100644 (file)
@@ -65,19 +65,20 @@ public class AdapterFactory {
     public static final String SYBASE = "SYBASE"; //$NON-NLS-1$
     public static final String JDBC_ODBC_BRIDGE = "JDBC_ODBC_BRIDGE"; //$NON-NLS-1$
     public static final String MS_SQL_SERVER = "MS_SQL_SERVER"; //$NON-NLS-1$
+    public static final String DERBY = "DERBY"; //$NON-NLS-1$
 
        private static final Map DRIVER_MAP = Collections.synchronizedMap(new HashMap());
        
        static {
                DRIVER_MAP.put("com.ddtek.jdbc.informix.InformixDriver", new DriverInfo(INFORMIX));
                DRIVER_MAP.put("com.ddtek.jdbc.db2.DB2Driver", new DriverInfo(DB2, "jdbc:datadirect:db2://${hostname}:${port};DatabaseName=${dbname}"));
-               DRIVER_MAP.put("com.ddtek.jdbc.oracle.OracleDriver", new DriverInfo(ORACLE));
+               DRIVER_MAP.put("com.ddtek.jdbc.oracle.OracleDriver", new DriverInfo(ORACLE ,"jdbc:oracle:thin:@{hostname}:{port}:{dbname}"));
                DRIVER_MAP.put("com.ddtek.jdbc.sqlserver.SQLServerDriver", new DriverInfo(GENERIC));
                DRIVER_MAP.put("com.ddtek.jdbc.sybase.SybaseDriver", new DriverInfo(SYBASE));
                DRIVER_MAP.put("com.ibm.as400.access.AS400JDBCDriver", new DriverInfo(DB2AS400));
                DRIVER_MAP.put("COM.ibm.db2.jdbc.app.DB2Driver", new DriverInfo(DB2, "jdbc:db2:{dbname}"));
                DRIVER_MAP.put("COM.ibm.db2.jdbc.net.DB2Driver", new DriverInfo(DB2, "jdbc:db2://{hostname}:{port}/{dbname}"));
-               DRIVER_MAP.put("com.inet.ora.OraDriver", new DriverInfo(ORACLE));
+               DRIVER_MAP.put("com.inet.ora.OraDriver", new DriverInfo(ORACLE ,"jdbc:oracle:thin:@{hostname}:{port}:{dbname}"));
                DRIVER_MAP.put("com.inet.drda.DRDADriver", new DriverInfo(DB2, "jdbc:inetdb2:{hostname}:{port}?database={dbname}"));
                DRIVER_MAP.put("com.inet.syb.SybDriver", new DriverInfo(SYBASE));
                DRIVER_MAP.put("com.inet.tds.TdsDriver", new DriverInfo(MS_SQL_SERVER));
@@ -89,13 +90,18 @@ public class AdapterFactory {
                DRIVER_MAP.put("com.sybase.jdbc2.jdbc.SybDriver", new DriverInfo(SYBASE, "jdbc:sybase:Tds:{hostname}:{port}/{dbname}"));
                DRIVER_MAP.put("com.sybase.jdbcx.SybDriver", new DriverInfo(SYBASE, "jdbc:sybase:Tds:{hostname}:{port}/{dbname}"));
                DRIVER_MAP.put("net.sourceforge.jtds.jdbc.Driver", new DriverInfo(MS_SQL_SERVER));
-               DRIVER_MAP.put("oracle.jdbc.driver.OracleDriver", new DriverInfo(ORACLE));
+               DRIVER_MAP.put("oracle.jdbc.driver.OracleDriver", new DriverInfo(ORACLE ,"jdbc:oracle:thin:@{hostname}:{port}:{dbname}"));
+               DRIVER_MAP.put("oracle.jdbc.OracleDriver", new DriverInfo(ORACLE ,"jdbc:oracle:thin:@{hostname}:{port}:{dbname}"));
                DRIVER_MAP.put("org.gjt.mm.mysql.Driver", new DriverInfo(MYSQL, "jdbc:mysql://{hostname}:{port}/{dbname}"));
                DRIVER_MAP.put("org.hsqldb.jdbcDriver", new DriverInfo(HSQLDB));
                DRIVER_MAP.put("org.postgresql.Driver", new DriverInfo(POSTGRES, "jdbc:postgresql://{hostname}:{port}/{dbname}"));
                DRIVER_MAP.put("sun.jdbc.odbc.JdbcOdbcDriver", new DriverInfo(JDBC_ODBC_BRIDGE, "jdbc:odbc:{datasource}"));
                DRIVER_MAP.put("weblogic.jdbc.informix.InformixDriver", new DriverInfo(INFORMIX));
                DRIVER_MAP.put("weblogic.jdbc.sqlserver.SybaseDriver", new DriverInfo(SYBASE));
+               DRIVER_MAP.put("org.apache.derby.jdbc.driver20", new DriverInfo(DERBY, "jdbc:derby:{dbname}"));
+               DRIVER_MAP.put("org.apache.derby.jdbc.driver30", new DriverInfo(DERBY, "jdbc:derby:{dbname}"));
+               DRIVER_MAP.put("org.apache.derby.jdbc.EmbeddedDriver", new DriverInfo(DERBY, "jdbc:derby:{dbname}"));
+               
        }
        
     private static AdapterFactory instance;
@@ -117,6 +123,7 @@ public class AdapterFactory {
        addAdapter(new GenericAdapter(POINTBASE));
        addAdapter(new GenericAdapter(JDBC_ODBC_BRIDGE));
        addAdapter(new MSSQLServerAdapter());
+       addAdapter(new GenericAdapter(DERBY));
     }
     private void addAdapter(DatabaseAdapter adapter) {
        this.adapters.put(adapter.getType(), adapter);