public class SchemaExport extends 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(String[] args)
Intended for test usage only.
|
static TargetDescriptor |
buildTargetDescriptor(EnumSet<TargetType> targetTypes,
String outputFile,
boolean append,
ServiceRegistry serviceRegistry) |
static TargetDescriptor |
buildTargetDescriptor(EnumSet<TargetType> targetTypes,
String outputFile,
ServiceRegistry serviceRegistry) |
void |
create(EnumSet<TargetType> targetTypes,
Metadata metadata) |
void |
createOnly(EnumSet<TargetType> targetTypes,
Metadata metadata) |
void |
doExecution(SchemaExport.Action action,
boolean needsJdbc,
Metadata metadata,
ServiceRegistry serviceRegistry,
TargetDescriptor targetDescriptor) |
void |
drop(EnumSet<TargetType> targetTypes,
Metadata metadata) |
void |
execute(EnumSet<TargetType> targetTypes,
SchemaExport.Action action,
Metadata metadata) |
void |
execute(EnumSet<TargetType> targetTypes,
SchemaExport.Action action,
Metadata metadata,
ServiceRegistry serviceRegistry) |
static void |
execute(org.hibernate.tool.hbm2ddl.SchemaExport.CommandLineArgs commandLineArgs) |
List |
getExceptions()
Returns a List of all Exceptions which occurred during the export.
|
static void |
main(String[] args) |
void |
perform(SchemaExport.Action action,
Metadata metadata,
ScriptTargetOutput target)
For testing use
|
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 |
setImportFiles(String importFiles)
Comma-separated list of resource names to use for database init commands on create.
|
SchemaExport |
setManageNamespaces(boolean manageNamespaces) |
SchemaExport |
setOutputFile(String filename)
For generating a export script file, this is the file which will be written.
|
SchemaExport |
setOverrideOutputFileContent()
For generating a export script file, by default the content will be appended at the begin or end of the file.
|
public SchemaExport setOutputFile(String filename)
filename
- The name of the file to which to write the export script.public SchemaExport setOverrideOutputFileContent()
public SchemaExport setImportFiles(String importFiles)
importFiles
- The comma-separated list of init file resources namespublic SchemaExport setDelimiter(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(EnumSet<TargetType> targetTypes, Metadata metadata)
public void create(EnumSet<TargetType> targetTypes, Metadata metadata)
public void createOnly(EnumSet<TargetType> targetTypes, Metadata metadata)
public void execute(EnumSet<TargetType> targetTypes, SchemaExport.Action action, Metadata metadata)
public void execute(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(EnumSet<TargetType> targetTypes, String outputFile, ServiceRegistry serviceRegistry)
public static TargetDescriptor buildTargetDescriptor(EnumSet<TargetType> targetTypes, String outputFile, boolean append, ServiceRegistry serviceRegistry)
public void perform(SchemaExport.Action action, Metadata metadata, ScriptTargetOutput target)
public static void main(String[] args)
public static void execute(org.hibernate.tool.hbm2ddl.SchemaExport.CommandLineArgs commandLineArgs) throws Exception
Exception
public static MetadataImplementor buildMetadataFromMainArgs(String[] args) throws Exception
main(java.lang.String[])
args
- The "command line args"Exception
- Problems building the Metadatapublic List getExceptions()
Copyright © 2001-2021 Red Hat, Inc. All Rights Reserved.