Package org.hibernate.tool.hbm2ddl
Class SchemaUpdate
- java.lang.Object
-
- org.hibernate.tool.hbm2ddl.SchemaUpdate
-
public class SchemaUpdate extends Object
A commandline tool to update a database schema. May also be called from inside an application.
-
-
Constructor Summary
Constructors Constructor Description SchemaUpdate()
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description static MetadataImplementorbuildMetadataFromMainArgs(String[] args)Intended for test usage only.voidexecute(EnumSet<TargetType> targetTypes, Metadata metadata)voidexecute(EnumSet<TargetType> targetTypes, Metadata metadata, ServiceRegistry serviceRegistry)ListgetExceptions()Returns a List of all Exceptions which occurred during the export.static voidmain(String[] args)SchemaUpdatesetDelimiter(String delimiter)Set the end of statement delimiterSchemaUpdatesetFormat(boolean format)SchemaUpdatesetHaltOnError(boolean haltOnError)SchemaUpdatesetOutputFile(String outputFile)
-
-
-
Method Detail
-
execute
public void execute(EnumSet<TargetType> targetTypes, Metadata metadata)
-
execute
public void execute(EnumSet<TargetType> targetTypes, Metadata metadata, ServiceRegistry serviceRegistry)
-
getExceptions
public List getExceptions()
Returns a List of all Exceptions which occurred during the export.- Returns:
- A List containing the Exceptions occurred during the export
-
setHaltOnError
public SchemaUpdate setHaltOnError(boolean haltOnError)
-
setFormat
public SchemaUpdate setFormat(boolean format)
-
setOutputFile
public SchemaUpdate setOutputFile(String outputFile)
-
setDelimiter
public SchemaUpdate setDelimiter(String delimiter)
Set the end of statement delimiter- Parameters:
delimiter- The delimiter
-
main
public static void main(String[] args)
-
buildMetadataFromMainArgs
public static MetadataImplementor buildMetadataFromMainArgs(String[] args) throws Exception
Intended for test usage only. Builds a Metadata using the same algorithm asmain(java.lang.String[])- Parameters:
args- The "command line args"- Returns:
- The built Metadata
- Throws:
Exception- Problems building the Metadata
-
-