|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.hibernate.tool.hbm2ddl.SchemaExport
public class SchemaExport
Commandline tool to export table schema to the database. This class may also be called from inside an application.
Constructor Summary | |
---|---|
SchemaExport(Configuration cfg)
Create a schema exporter for the given Configuration |
|
SchemaExport(Configuration cfg,
Connection connection)
Create a schema exporter for the given Configuration, using the supplied connection for connectivity. |
|
SchemaExport(Configuration cfg,
Properties properties)
Deprecated. properties may be specified via the Configuration object |
|
SchemaExport(Configuration cfg,
Settings settings)
Create a schema exporter for the given Configuration and given settings |
Method Summary | |
---|---|
void |
create(boolean script,
boolean export)
Run the schema creation script. |
void |
drop(boolean script,
boolean export)
Run the drop schema script. |
void |
execute(boolean script,
boolean export,
boolean justDrop,
boolean justCreate)
|
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 |
setImportFile(String filename)
An import file, containing raw SQL statements to be executed. |
SchemaExport |
setOutputFile(String filename)
For generating a export script file, this is the file which will be written. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SchemaExport(Configuration cfg) throws HibernateException
cfg
- The configuration from which to build a schema export.
HibernateException
- Indicates problem preparing for schema export.public SchemaExport(Configuration cfg, Settings settings) throws HibernateException
cfg
- The configuration from which to build a schema export.settings
- The 'parsed' settings.
HibernateException
- Indicates problem preparing for schema export.public SchemaExport(Configuration cfg, Properties properties) throws HibernateException
cfg
- 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 cfg, Connection connection) throws HibernateException
cfg
- The configuration to use.connection
- The JDBC connection to use.
HibernateException
- Indicates problem preparing for schema export.Method Detail |
---|
public SchemaExport setOutputFile(String filename)
filename
- The name of the file to which to write the export script.
public SchemaExport setImportFile(String filename)
filename
- The import file name.
public SchemaExport setDelimiter(String delimiter)
delimiter
- The delimiter
public SchemaExport setFormat(boolean format)
format
- Should we format SQL strings
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 drop(boolean script, boolean export)
script
- print the DDL to the consoleexport
- export the script to the databasepublic void execute(boolean script, boolean export, boolean justDrop, boolean justCreate)
public static void main(String[] args)
public List getExceptions()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |