Examples of SchemaExport


Examples of org.hibernate.tool.hbm2ddl.SchemaExport

      Class<?> c = Class.forName(className);
      configuration.addAnnotatedClass(c);
    }
   
    configuration.setProperty("hibernate.dialect", dialectName);
    SchemaExport exporter = new SchemaExport(configuration);
    exporter.setDelimiter(";");
    exporter.setOutputFile(fileName);
   
    boolean script = true;
    boolean export = false;
    boolean justDrop = false;
    boolean justCreate = false;
    exporter.execute(script, export, justDrop, justCreate);
  }
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

        configuration.setProperty("hibernate.dialect", this.dialect);
        configuration.buildMappings();
       
        final Connection connection = DataSourceUtils.getConnection(this.dataSource);
        try {
            final SchemaExport exporter = new SchemaExport(configuration, connection);
            exporter.setFormat(false);
            if (outputFile != null) {
                exporter.setOutputFile(outputFile);
            }
           
            exporter.execute(true, export, !create, !drop);
        }
        finally {
            DataSourceUtils.releaseConnection(connection, this.dataSource);
        }
    }
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

   public void init( )
      throws HibernateException
   {
      Configuration cfg = new Configuration().configure();
      SchemaExport se = new SchemaExport(cfg);
      se.create(true, true);
   }
View Full Code Here

Examples of org.projectforge.database.SchemaExport

  private SystemInfoCache systemInfoCache;

  public String exportSchema()
  {
    final SchemaExport exp = new SchemaExport();
    File file;
    try {
      file = File.createTempFile("projectforge-schema", ".sql");
    } catch (final IOException ex) {
      log.error(ex.getMessage(), ex);
      return ex.getMessage();
    }
    exp.exportSchema(HibernateUtils.getConfiguration(), file.getPath(), false, false);
    String result;
    try {
      result = FileUtils.readFileToString(file, "UTF-8");
    } catch (final IOException ex) {
      log.error(ex.getMessage(), ex);
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.