org.hibernate.tool.hbm2ddl

Class SchemaUpdate


public class SchemaUpdate
extends java.lang.Object

A commandline tool to update a database schema. May also be called from inside an application.
Author:
Christoph Sturm

Constructor Summary

SchemaUpdate(Configuration cfg)
SchemaUpdate(Configuration cfg, Properties connectionProperties)
SchemaUpdate(Configuration cfg, Settings settings)

Method Summary

void
execute(boolean script, boolean doUpdate)
Execute the schema updates
List
getExceptions()
Returns a List of all Exceptions which occured during the export.
static void
main(String[] args)
void
setDelimiter(String delimiter)
void
setFormat(boolean format)
void
setHaltOnError(boolean haltOnError)
void
setOutputFile(String outputFile)

Constructor Details

SchemaUpdate

public SchemaUpdate(Configuration cfg)
            throws HibernateException

SchemaUpdate

public SchemaUpdate(Configuration cfg,
                    Properties connectionProperties)
            throws HibernateException

SchemaUpdate

public SchemaUpdate(Configuration cfg,
                    Settings settings)
            throws HibernateException

Method Details

execute

public void execute(boolean script,
                    boolean doUpdate)
Execute the schema updates
Parameters:
script - print all DDL to the console

getExceptions

public List getExceptions()
Returns a List of all Exceptions which occured during the export.
Returns:
A List containig the Exceptions occured during the export

main

public static void main(String[] args)

setDelimiter

public void setDelimiter(String delimiter)

setFormat

public void setFormat(boolean format)

setHaltOnError

public void setHaltOnError(boolean haltOnError)

setOutputFile

public void setOutputFile(String outputFile)