Save This Page
Home » hibernate-distribution-3.3.1.GA-dist » org.hibernate » tool » hbm2ddl » [javadoc | source]
org.hibernate.tool.hbm2ddl
public class: SchemaExport [javadoc | source]
java.lang.Object
   org.hibernate.tool.hbm2ddl.SchemaExport
Commandline tool to export table schema to the database. This class may also be called from inside an application.
Constructor:
 public SchemaExport(Configuration cfg) throws HibernateException 
    Create a schema exporter for the given Configuration
    Parameters:
    cfg - The configuration from which to build a schema export.
    Throws:
    HibernateException - Indicates problem preparing for schema export.
 public SchemaExport(Configuration cfg,
    Settings settings) throws HibernateException 
    Create a schema exporter for the given Configuration and given settings
    Parameters:
    cfg - The configuration from which to build a schema export.
    settings - The 'parsed' settings.
    Throws:
    HibernateException - Indicates problem preparing for schema export.
 public SchemaExport(Configuration cfg,
    Properties properties) throws HibernateException 
    Create a schema exporter for the given Configuration, with the given database connection properties.
    Parameters:
    cfg - The configuration from which to build a schema export.
    properties - The properties from which to configure connectivity etc.
    Throws:
    HibernateException - Indicates problem preparing for schema export.
 public SchemaExport(Configuration cfg,
    Connection connection) throws HibernateException 
    Create a schema exporter for the given Configuration, using the supplied connection for connectivity.
    Parameters:
    cfg - The configuration to use.
    connection - The JDBC connection to use.
    Throws:
    HibernateException - Indicates problem preparing for schema export.
Method from org.hibernate.tool.hbm2ddl.SchemaExport Summary:
create,   drop,   execute,   getExceptions,   main,   setDelimiter,   setFormat,   setHaltOnError,   setImportFile,   setOutputFile
Methods from java.lang.Object:
equals,   getClass,   hashCode,   notify,   notifyAll,   toString,   wait,   wait,   wait
Method from org.hibernate.tool.hbm2ddl.SchemaExport Detail:
 public  void create(boolean script,
    boolean export) 
    Run the schema creation script.
 public  void drop(boolean script,
    boolean export) 
    Run the drop schema script.
 public  void execute(boolean script,
    boolean export,
    boolean justDrop,
    boolean justCreate) 
 public List getExceptions() 
    Returns a List of all Exceptions which occured during the export.
 public static  void main(String[] args) 
 public SchemaExport setDelimiter(String delimiter) 
    Set the end of statement delimiter
 public SchemaExport setFormat(boolean format) 
    Should we format the sql strings?
 public SchemaExport setHaltOnError(boolean haltOnError) 
    Should we stop once an error occurs?
 public SchemaExport setImportFile(String filename) 
    An import file, containing raw SQL statements to be executed.
 public SchemaExport setOutputFile(String filename) 
    For generating a export script file, this is the file which will be written.