类 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.- 作者:
- Christoph Sturm, Steve Ebersole
-
-
构造器概要
构造器 构造器 说明 SchemaUpdate()
-
方法概要
所有方法 静态方法 实例方法 具体方法 修饰符和类型 方法 说明 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)
-
-
-
方法详细资料
-
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.- 返回:
- 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- 参数:
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[])- 参数:
args- The "command line args"- 返回:
- The built Metadata
- 抛出:
Exception- Problems building the Metadata
-
-