Package org.molgenis.generators.db

Examples of org.molgenis.generators.db.JDBCMetaDatabaseGen


      {
        System.out.println("--------------JPAGEN--------------");
        generators.add(new JpaDatabaseGen());
        generators.add(new DataTypeGen());
        generators.add(new JpaMapperGen());
        generators.add(new JDBCMetaDatabaseGen());

        if (options.generate_persistence)
        {
          generators.add(new PersistenceGen());
        }
      }
      else
      {
        // DATABASE
        // mysql.org
        if (options.db_driver.equals("com.mysql.jdbc.Driver"))
        {
          generators.add(new MySqlCreateSubclassPerTableGen());
          generators.add(new MySqlAlterSubclassPerTableGen());
          // use multiquery optimization
          if (options.mapper_implementation.equals(MapperImplementation.MULTIQUERY))
          {
            generators.add(new JDBCDatabaseGen());
            generators.add(new DataTypeGen());
            generators.add(new MultiqueryMapperGen());
          }
          else if (options.mapper_implementation.equals(MapperImplementation.PREPARED_STATEMENT))
          {
            generators.add(new JDBCDatabaseGen());
            generators.add(new DataTypeGen());
            generators.add(new PStatementMapperGen());
          }
        } // hsqldb.org
        else if (options.db_driver.equals("oracle.jdbc.driver.OracleDriver"))
        {
          generators.add(new OracleCreateSubclassPerTableGen());
          generators.add(new JDBCDatabaseGen());
          generators.add(new DataTypeGen());
          generators.add(new PStatementMapperGen());
        }
        else if (options.db_driver.equals("org.hsqldb.jdbcDriver"))
        {
          logger.info("HsqlDB generators ....");
          generators.add(new JDBCDatabaseGen());
          generators.add(new DataTypeGen());
          generators.add(new HSqlCreateSubclassPerTableGen());
          generators.add(new PStatementMapperGen());
        } // postgresql
        else if (options.db_driver.equals("org.postgresql.Driver"))
        {
          generators.add(new PSqlCreateSubclassPerTableGen());
          generators.add(new PStatementMapperGen());
        } // h2database.com, branch of hsqldb?
        else if (options.db_driver.equals("org.h2.Driver"))
        {
          generators.add(new HSqlCreateSubclassPerTableGen());
          generators.add(new PStatementMapperGen());
        } // derby, not functional ignore.
        else if (options.db_driver.equals("org.apache.derby.jdbc.EmbeddedDriver"))
        {
          generators.add(new DerbyCreateSubclassPerTableGen());
        }
        else
        {
          logger.warn("Unknown database driver " + options.db_driver);
        }

        // test
        generators.add(new JDBCMetaDatabaseGen());
        // SQL
        generators.add(new CountPerEntityGen());
        generators.add(new CountPerTableGen());
        generators.add(new FillMetadataTablesGen());
      }
View Full Code Here

TOP

Related Classes of org.molgenis.generators.db.JDBCMetaDatabaseGen

Copyright © 2018 www.massapicom. 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.