Examples of SchemaExport


Examples of org.hibernate.tool.hbm2ddl.SchemaExport

    if ( debugEnabled ) {
      LOG.debug("Instantiated session factory");
    }

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( metadata )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) )
          .create( false, true );
    }

    if ( settings.isAutoDropSchema() ) {
      schemaExport = new SchemaExport( metadata )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) );
    }

    currentSessionContext = buildCurrentSessionContext();
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

    SessionFactoryObjectFactory.addInstance(uuid, name, this, properties);

    log.debug("instantiated session factory");

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( cfg, settings ).create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( cfg, settings ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( cfg, settings ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
      schemaExport = new SchemaExport( cfg, settings );
    }

    if ( settings.getTransactionManagerLookup()!=null ) {
      log.debug("obtaining JTA TransactionManager");
      transactionManager = settings.getTransactionManagerLookup().getTransactionManager(properties);
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

  public void setProperty(String property, String value) {
    properties.setProperty(property, value);
  }

  public void dropSchema() {
    new SchemaExport( buildConfiguration() ).drop(false, true);
  }
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

  public void dropSchema() {
    new SchemaExport( buildConfiguration() ).drop(false, true);
  }

  public void createSchema() {
    new SchemaExport( buildConfiguration() ).create(false, true);
  public String getName() {
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

    SessionFactoryObjectFactory.addInstance(uuid, name, this, properties);

    log.debug("instantiated session factory");

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( cfg, settings ).create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( cfg, settings ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( cfg, settings ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
      schemaExport = new SchemaExport( cfg, settings );
    }

    if ( settings.getTransactionManagerLookup()!=null ) {
      log.debug("obtaining JTA TransactionManager");
      transactionManager = settings.getTransactionManagerLookup().getTransactionManager(properties);
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

    SessionFactoryObjectFactory.addInstance(uuid, name, this, properties);

    log.debug("instantiated session factory");

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( cfg, settings ).create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( cfg, settings ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( cfg, settings ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
      schemaExport = new SchemaExport( cfg, settings );
    }

    if ( settings.getTransactionManagerLookup()!=null ) {
      log.debug("obtaining JTA TransactionManager");
      transactionManager = settings.getTransactionManagerLookup().getTransactionManager(properties);
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

public class CreateDataBaseTableByHibernateConfigFile {
 
 
  public static void main(String[] args) {
    Configuration configuration = new Configuration().configure().setNamingStrategy(new ImprovedNamingStrategy());
    SchemaExport export = new SchemaExport(configuration);
   
    export.setFormat(false);
    export.setOutputFile("src/test/resources/data/h2/create-table-new.sql");
    export.create(true, false);
  }
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

public class CreateTestInitializeDataBaseSqlFile {
 
  public static void main(String[] args) {
   
    Configuration configuration = new Configuration().configure().setNamingStrategy(new ImprovedNamingStrategy());
    SchemaExport export = new SchemaExport(configuration);
   
    export.setFormat(false);
    export.setOutputFile("src/test/resources/h2schma.sql");
    export.create(true, false);
  }
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

    SessionFactoryRegistry.INSTANCE.addSessionFactory( uuid, name, this, serviceRegistry.getService( JndiService.class ) );

    LOG.debugf( "Instantiated session factory" );

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( serviceRegistry, cfg )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) )
          .create( false, true );
    }
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( serviceRegistry, cfg ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( serviceRegistry, cfg ).validate();
    }
    if ( settings.isAutoDropSchema() ) {
      schemaExport = new SchemaExport( serviceRegistry, cfg )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) );
    }

    currentSessionContext = buildCurrentSessionContext();
View Full Code Here

Examples of org.hibernate.tool.hbm2ddl.SchemaExport

    SessionFactoryRegistry.INSTANCE.addSessionFactory( uuid, name, this, serviceRegistry.getService( JndiService.class ) );

    LOG.debugf("Instantiated session factory");

    if ( settings.isAutoCreateSchema() ) {
      new SchemaExport( metadata )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) )
          .create( false, true );
    }
    /*
    if ( settings.isAutoUpdateSchema() ) {
      new SchemaUpdate( metadata ).execute( false, true );
    }
    if ( settings.isAutoValidateSchema() ) {
      new SchemaValidator( metadata ).validate();
    }
    */
    if ( settings.isAutoDropSchema() ) {
      schemaExport = new SchemaExport( metadata )
          .setImportSqlCommandExtractor( serviceRegistry.getService( ImportSqlCommandExtractor.class ) );
    }

    currentSessionContext = buildCurrentSessionContext();

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.