Package org.hibernate.tool.hbm2ddl
Class SchemaUpdate
- java.lang.Object
-
- org.hibernate.tool.hbm2ddl.SchemaUpdate
-
public class SchemaUpdate extends java.lang.ObjectA 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(java.lang.String[] args)Intended for test usage only.voidexecute(java.util.EnumSet<TargetType> targetTypes, Metadata metadata)voidexecute(java.util.EnumSet<TargetType> targetTypes, Metadata metadata, ServiceRegistry serviceRegistry)java.util.ListgetExceptions()Returns a List of all Exceptions which occurred during the export.static voidmain(java.lang.String[] args)SchemaUpdatesetDelimiter(java.lang.String delimiter)Set the end of statement delimiterSchemaUpdatesetFormat(boolean format)SchemaUpdatesetHaltOnError(boolean haltOnError)SchemaUpdatesetOutputFile(java.lang.String outputFile)
-
-
-
Method Detail
-
execute
public void execute(java.util.EnumSet<TargetType> targetTypes, Metadata metadata)
-
execute
public void execute(java.util.EnumSet<TargetType> targetTypes, Metadata metadata, ServiceRegistry serviceRegistry)
-
getExceptions
public java.util.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(java.lang.String outputFile)
-
setDelimiter
public SchemaUpdate setDelimiter(java.lang.String delimiter)
Set the end of statement delimiter- Parameters:
delimiter- The delimiter
-
main
public static void main(java.lang.String[] args)
-
buildMetadataFromMainArgs
public static MetadataImplementor buildMetadataFromMainArgs(java.lang.String[] args) throws java.lang.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:
java.lang.Exception- Problems building the Metadata
-
-