public class SchemaExport
extends java.lang.Object
Modifier and Type | Class and Description |
---|---|
static class |
SchemaExport.Action |
static class |
SchemaExport.Type |
Constructor and Description |
---|
SchemaExport() |
Modifier and Type | Method and Description |
---|---|
static MetadataImplementor |
buildMetadataFromMainArgs(java.lang.String[] args)
Intended for test usage only.
|
static TargetDescriptor |
buildTargetDescriptor(java.util.EnumSet<TargetType> targetTypes,
java.lang.String outputFile,
ServiceRegistry serviceRegistry) |
void |
create(java.util.EnumSet<TargetType> targetTypes,
Metadata metadata) |
void |
createOnly(java.util.EnumSet<TargetType> targetTypes,
Metadata metadata) |
void |
doExecution(SchemaExport.Action action,
boolean needsJdbc,
Metadata metadata,
ServiceRegistry serviceRegistry,
TargetDescriptor targetDescriptor) |
void |
drop(java.util.EnumSet<TargetType> targetTypes,
Metadata metadata) |
void |
execute(java.util.EnumSet<TargetType> targetTypes,
SchemaExport.Action action,
Metadata metadata) |
void |
execute(java.util.EnumSet<TargetType> targetTypes,
SchemaExport.Action action,
Metadata metadata,
ServiceRegistry serviceRegistry) |
static void |
execute(org.hibernate.tool.hbm2ddl.SchemaExport.CommandLineArgs commandLineArgs) |
java.util.List |
getExceptions()
Returns a List of all Exceptions which occurred during the export.
|
static void |
main(java.lang.String[] args) |
void |
perform(SchemaExport.Action action,
Metadata metadata,
ScriptTargetOutput target)
For testing use
|
SchemaExport |
setDelimiter(java.lang.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 |
setImportFiles(java.lang.String importFiles)
Comma-separated list of resource names to use for database init commands on create.
|
SchemaExport |
setManageNamespaces(boolean manageNamespaces) |
SchemaExport |
setOutputFile(java.lang.String filename)
For generating a export script file, this is the file which will be written.
|
public SchemaExport setOutputFile(java.lang.String filename)
filename
- The name of the file to which to write the export script.public SchemaExport setImportFiles(java.lang.String importFiles)
importFiles
- The comma-separated list of init file resources namespublic SchemaExport setDelimiter(java.lang.String delimiter)
delimiter
- The delimiterpublic SchemaExport setFormat(boolean format)
format
- Should we format SQL stringspublic SchemaExport setHaltOnError(boolean haltOnError)
haltOnError
- True if export should stop after error.public SchemaExport setManageNamespaces(boolean manageNamespaces)
public void drop(java.util.EnumSet<TargetType> targetTypes, Metadata metadata)
public void create(java.util.EnumSet<TargetType> targetTypes, Metadata metadata)
public void createOnly(java.util.EnumSet<TargetType> targetTypes, Metadata metadata)
public void execute(java.util.EnumSet<TargetType> targetTypes, SchemaExport.Action action, Metadata metadata)
public void execute(java.util.EnumSet<TargetType> targetTypes, SchemaExport.Action action, Metadata metadata, ServiceRegistry serviceRegistry)
public void doExecution(SchemaExport.Action action, boolean needsJdbc, Metadata metadata, ServiceRegistry serviceRegistry, TargetDescriptor targetDescriptor)
public static TargetDescriptor buildTargetDescriptor(java.util.EnumSet<TargetType> targetTypes, java.lang.String outputFile, ServiceRegistry serviceRegistry)
public void perform(SchemaExport.Action action, Metadata metadata, ScriptTargetOutput target)
public static void main(java.lang.String[] args)
public static void execute(org.hibernate.tool.hbm2ddl.SchemaExport.CommandLineArgs commandLineArgs) throws java.lang.Exception
java.lang.Exception
public static MetadataImplementor buildMetadataFromMainArgs(java.lang.String[] args) throws java.lang.Exception
main(java.lang.String[])
args
- The "command line args"java.lang.Exception
- Problems building the Metadatapublic java.util.List getExceptions()
Copyright © 2001-2018 Red Hat, Inc. All Rights Reserved.