Examples of AdapterBase


Examples of org.conserve.adapter.AdapterBase

   * @param driver
   * @return
   */
  private AdapterBase selectAdapter(String driver)
  {
    AdapterBase res = null;
    if (driver.startsWith("jdbc:mysql:"))
    {
      res = new MySqlAdapter(this);
    }
    else if (driver.startsWith("jdbc:postgresql:"))
    {
      res = new PostgreSqlAdapter(this);
    }
    else if (driver.startsWith("jdbc:derby:"))
    {
      res = new DerbyAdapter(this);
    }
    else if (driver.startsWith("jdbc:hsqldb:"))
    {
      res = new HsqldbAdapter(this);
    }
    else if (driver.startsWith("jdbc:firebirdsql:"))
    {
      res = new FirebirdAdapter(this);
    }
    else if (driver.startsWith("jdbc:sqlite:"))
    {
      res = new SqLiteAdapter(this);
    }
    else if (driver.startsWith("jdbc:monetdb"))
    {
      res = new MonetDbAdapter(this);
    }
    // TODO: If you want to extend Conserve to handle a new RDBMS,
    // add the case here and return a custom subclass of AdapterBase.
    else
    {
      // use the default (H2) adapter.
      res = new AdapterBase(this);
    }
    return res;
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.