Package siena.jdbc.ddl

Examples of siena.jdbc.ddl.DdlGenerator


              throw new UnexpectedException("SienaPlugin : not using GAE requires at least a db config");
            }
            if(dbType.contains("postgresql")){
              persistenceManager = new PostgresqlPersistenceManager(new PlayConnectionManager(), null);
              ddlType = "postgresql";
              generator = new DdlGenerator("postgresql");
            }else if(dbType.contains("h2")){
              // the H2 dbMode in Play is "mysql"
              persistenceManager = new H2PersistenceManager(new PlayConnectionManager(), null, "mysql");
              // the DDL type is mysql because in play the DB is H2 in Mysql mode.
              // But the DDLGenerator is wired to h2
              // because longvarchar and CLOB is not managed the same way in H2/MYSQL and real MYSQL
              ddlType = "mysql";
              generator = new DdlGenerator("h2");
            }
            else if(dbType.contains("google")){
              persistenceManager = new GoogleSqlPersistenceManager(new PlayConnectionManager(), null);
              generator = new DdlGenerator("mysql");
            }
            else {
              persistenceManager = new JdbcPersistenceManager(new PlayConnectionManager(), null);
              generator = new DdlGenerator("mysql");
            }
      Logger.debug("Siena DDL Type: %s", ddlType);
     
      // Alter tables before installing
            for(Class<?> c : classes) {
View Full Code Here


      dataSource.setUrl(url);
      dataSource.setUsername(username);
      dataSource.setPassword(password);
      dataSource.setMaxWait(2000); // 2 seconds max for wait a connection.
     
      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("postgresql");
      Class.forName(driver);
      Connection connection = DriverManager.getConnection(url, username, password);
     
View Full Code Here

      dataSource.setUrl(url);
      //dataSource.setUsername(username);
      //dataSource.setPassword(password);
      dataSource.setMaxWait(2000); // 2 seconds max for wait a connection.
     
      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance(dataSource);
      Class.forName("org.drizzle.jdbc.DrizzleDriver");
      Connection connection = DriverManager.getConnection(url);
     
View Full Code Here

      dataSource.setUrl(url);
      dataSource.setUsername(username);
      dataSource.setPassword(password);
      dataSource.setMaxWait(2000); // 2 seconds max for wait a connection.
     
      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("postgresql");
      Class.forName(driver);
      Connection connection = DriverManager.getConnection(url, username, password);
     
View Full Code Here

      p.setProperty("driver",   driver);
      p.setProperty("url",      url);
      p.setProperty("user",     username);
      p.setProperty("password", password);

      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("mysql");
      Class.forName(driver);
      //JdbcDataSource ds = new JdbcDataSource();
      //ds.setURL(url);
View Full Code Here

      dataSource.setUrl(url);
      dataSource.setUsername(username);
      dataSource.setPassword(password);
      dataSource.setMaxWait(2000); // 2 seconds max for wait a connection.
     
      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("mysql");
      Class.forName("com.mysql.jdbc.Driver");
      Connection connection = DriverManager.getConnection(url, username, password);
     
View Full Code Here

      p.setProperty("driver",   driver);
      p.setProperty("url",      url);
      p.setProperty("user",     username);
      p.setProperty("password", password);

      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("mysql");
      Class.forName(driver);
      //JdbcDataSource ds = new JdbcDataSource();
      //ds.setURL(url);
View Full Code Here

      dataSource.setUrl(url);
      dataSource.setUsername(username);
      dataSource.setPassword(password);
      dataSource.setMaxWait(2000); // 2 seconds max for wait a connection.
     
      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("mysql");
      Class.forName("com.mysql.jdbc.Driver").newInstance();
      Connection connection = DriverManager.getConnection(url, username, password);
     
View Full Code Here

      p.setProperty("driver",   driver);
      p.setProperty("url",      url);
      p.setProperty("user",     username);
      p.setProperty("password", password);

      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("mysql");
      Class.forName(driver);
      //JdbcDataSource ds = new JdbcDataSource();
      //ds.setURL(url);
View Full Code Here

      dataSource.setUrl(url);
      dataSource.setUsername(username);
      dataSource.setPassword(password);
      dataSource.setMaxWait(2000); // 2 seconds max for wait a connection.
     
      DdlGenerator generator = new DdlGenerator();
      for (Class<?> clazz : classes) {
        generator.addTable(clazz);
      }
 
      // get the Database model
      Database database = generator.getDatabase();
 
      Platform platform = PlatformFactory.createNewPlatformInstance("mysql");
      Class.forName("com.mysql.jdbc.Driver");
      Connection connection = DriverManager.getConnection(url, username, password);
     
View Full Code Here

TOP

Related Classes of siena.jdbc.ddl.DdlGenerator

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.