Package org.hibernate.tool.hbm2ddl

Examples of org.hibernate.tool.hbm2ddl.SchemaExport.create()


      if ("drop".equalsIgnoreCase(action)) {
        schemaExport.drop(!quiet, !text);

      } else if ("create".equalsIgnoreCase(action)) {
        schemaExport.create(!quiet, !text);
       
      } else if ("clean".equalsIgnoreCase(action)) {
        jbpmSchema.cleanSchema();
      }
    }
View Full Code Here


    return true;
  }

  protected void runSchemaGeneration() {
    SchemaExport export = new SchemaExport( cfg );
    export.create( true, true );
  }

  public class RollbackWork implements Work {

    public void execute(Connection connection) throws SQLException {
View Full Code Here

  public void testSchemaTools() throws Exception{
    // database schema have been created thanks to the setUp method
    // we have 2 schemas SA et SB, SB must be set as the default schema
    // used by hibernate hibernate.default_schema SB
    SchemaExport se = new SchemaExport(getCfg());
    se.create(true,true);
   
    // here we modify the generated table in order to test SchemaUpdate
    Session session = openSession();
    Connection conn = session.connection();
    Statement stat = conn.createStatement();
View Full Code Here

  public void testViewValidation() throws Exception{
    // database schema have been created thanks to the setUp method
    // we have 2 schemas SA et SB, SB must be set as the default schema
    // used by hibernate hibernate.default_schema SB
    SchemaExport se = new SchemaExport(getCfg());
    se.create(true,true);
   
    // here we drop the table generated for TeamView and create a view in order to test View validation
    Session session = openSession();
    Connection conn = session.connection();
    Statement stat = conn.createStatement();
View Full Code Here

  public void testSchemaToolsNonQuote() throws Exception{
    // database schema have been created thanks to the setUp method
    // we have 2 schemas SA et SB, SB must be set as the default schema
    // used by hibernate hibernate.default_schema SB
    SchemaExport se = new SchemaExport(getCfg());
    se.create(true,true);
   
    // here we modify the generated table in order to test SchemaUpdate
    Session session = openSession();
    Connection conn = session.connection();
    Statement stat = conn.createStatement();
View Full Code Here

  public void testFailingQuoteValidation() throws Exception{
    // database schema have been created thanks to the setUp method
    // we have 2 schemas SA et SB, SB must be set as the default schema
    // used by hibernate hibernate.default_schema SB
    SchemaExport se = new SchemaExport(getCfg());
    se.create(true,true);
   
    // here we modify the generated table in order to test SchemaUpdate
    Session session = openSession();
    Connection conn = session.connection();
    Statement stat = conn.createStatement();
View Full Code Here

  public void testFailingNonQuoteValidation() throws Exception{
    // database schema have been created thanks to the setUp method
    // we have 2 schemas SA et SB, SB must be set as the default schema
    // used by hibernate hibernate.default_schema SB
    SchemaExport se = new SchemaExport(getCfg());
    se.create(true,true);
   
    // here we modify the generated table in order to test SchemaUpdate
    Session session = openSession();
    Connection conn = session.connection();
    Statement stat = conn.createStatement();
View Full Code Here

    return true;
  }

  protected void runSchemaGeneration() {
    SchemaExport export = new SchemaExport( cfg );
    export.create( true, true );
  }

  protected void runSchemaDrop() {
    SchemaExport export = new SchemaExport( cfg );
    export.drop( true, true );
View Full Code Here

    return true;
  }

  protected void runSchemaGeneration() {
    SchemaExport export = new SchemaExport( cfg );
    export.create( true, true );
  }

}
View Full Code Here

      parentFile.mkdirs();
      File file = new File(parentFile, "schema-" + each.name().toLowerCase() + ".sql");
      System.out.println(file.getAbsolutePath());
      schema.setOutputFile(file.getAbsolutePath());
      schema.create(true, false);
    }
  }
}
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.