public class SchemaExport extends Object
| Modifier and Type | Class and Description | 
|---|---|
| static class  | SchemaExport.Type | 
| Constructor and Description | 
|---|
| SchemaExport(Configuration configuration)Create a schema exporter for the given Configuration | 
| SchemaExport(Configuration configuration,
            Connection connection)Create a schema exporter for the given Configuration, using the supplied connection for connectivity. | 
| SchemaExport(Configuration configuration,
            Properties properties)Deprecated. 
 properties may be specified via the Configuration object | 
| SchemaExport(ConnectionHelper connectionHelper,
            String[] dropSql,
            String[] createSql) | 
| SchemaExport(MetadataImplementor metadata) | 
| SchemaExport(ServiceRegistry serviceRegistry,
            Configuration configuration) | 
| Modifier and Type | Method and Description | 
|---|---|
| void | create(boolean script,
      boolean export)Run the schema creation script; drop script is automatically
 executed before running the creation script. | 
| void | create(Target output)Run the schema creation script; drop script is automatically
 executed before running the creation script. | 
| void | drop(boolean script,
    boolean export)Run the drop schema script. | 
| void | drop(Target output) | 
| void | execute(boolean script,
       boolean export,
       boolean justDrop,
       boolean justCreate) | 
| void | execute(Target output,
       SchemaExport.Type type) | 
| List | getExceptions()Returns a List of all Exceptions which occured during the export. | 
| static void | main(String[] args) | 
| SchemaExport | setDelimiter(String delimiter)Set the end of statement delimiter | 
| SchemaExport | setFormat(boolean format)Should we format the sql strings? | 
| SchemaExport | setHaltOnError(boolean haltOnError)Should we stop once an error occurs? | 
| SchemaExport | setImportSqlCommandExtractor(ImportSqlCommandExtractor importSqlCommandExtractor)Set import.sql command extractor. | 
| SchemaExport | setOutputFile(String filename)For generating a export script file, this is the file which will be written. | 
public SchemaExport(ServiceRegistry serviceRegistry, Configuration configuration)
public SchemaExport(MetadataImplementor metadata)
public SchemaExport(Configuration configuration)
configuration - The configuration from which to build a schema export.HibernateException - Indicates problem preparing for schema export.@Deprecated public SchemaExport(Configuration configuration, Properties properties) throws HibernateException
configuration - The configuration from which to build a schema export.properties - The properties from which to configure connectivity etc.HibernateException - Indicates problem preparing for schema export.public SchemaExport(Configuration configuration, Connection connection) throws HibernateException
configuration - The configuration to use.connection - The JDBC connection to use.HibernateException - Indicates problem preparing for schema export.public SchemaExport(ConnectionHelper connectionHelper, String[] dropSql, String[] createSql)
public SchemaExport setOutputFile(String filename)
filename - The name of the file to which to write the export script.public SchemaExport setDelimiter(String delimiter)
delimiter - The delimiterpublic SchemaExport setFormat(boolean format)
format - Should we format SQL stringspublic SchemaExport setImportSqlCommandExtractor(ImportSqlCommandExtractor importSqlCommandExtractor)
SingleLineSqlCommandExtractor is used.importSqlCommandExtractor - import.sql command extractor.public SchemaExport setHaltOnError(boolean haltOnError)
haltOnError - True if export should stop after error.public void create(boolean script,
          boolean export)
script - print the DDL to the consoleexport - export the script to the databasepublic void create(Target output)
output - the target of the script.public void drop(boolean script,
        boolean export)
script - print the DDL to the consoleexport - export the script to the databasepublic void drop(Target output)
public void execute(boolean script,
           boolean export,
           boolean justDrop,
           boolean justCreate)
public void execute(Target output, SchemaExport.Type type)
public static void main(String[] args)
public List getExceptions()
Copyright © 2018 JBoss by Red Hat. All rights reserved.