org.hibernate.tool.hbm2ddl

Class SchemaUpdateTask


public class SchemaUpdateTask
extends MatchingTask

An Ant task for SchemaUpdate.
 <taskdef name="schemaupdate"
     classname="org.hibernate.tool.hbm2ddl.SchemaUpdateTask"
     classpathref="class.path"/>

 <schemaupdate
     properties="${build.classes.dir}/hibernate.properties"
     quiet="no"
     <fileset dir="${build.classes.dir}">
         <include name="*.hbm.xml"/>
     </fileset>
 </schemaupdate>
 
Author:
Rong C Ou, Gavin King
See Also:
SchemaUpdate

Method Summary

void
addFileset(FileSet set)
void
execute()
Execute the task
String
getDelimiter()
File
getOutputFile()
boolean
isHaltOnError()
void
setConfig(File configurationFile)
Set a .cfg.xml file
void
setDelimiter(String delimiter)
void
setHaltOnError(boolean haltOnError)
void
setNamingStrategy(String namingStrategy)
void
setOutputFile(File outputFile)
void
setProperties(File propertiesFile)
Set a properties file
void
setQuiet(boolean quiet)
Enable "quiet" mode.
void
setText(boolean text)
Enable "text-only" mode.

Method Details

addFileset

public void addFileset(FileSet set)

execute

public void execute()
            throws BuildException
Execute the task

getDelimiter

public String getDelimiter()

getOutputFile

public File getOutputFile()

isHaltOnError

public boolean isHaltOnError()

setConfig

public void setConfig(File configurationFile)
Set a .cfg.xml file
Parameters:
configurationFile - the file name

setDelimiter

public void setDelimiter(String delimiter)

setHaltOnError

public void setHaltOnError(boolean haltOnError)

setNamingStrategy

public void setNamingStrategy(String namingStrategy)

setOutputFile

public void setOutputFile(File outputFile)

setProperties

public void setProperties(File propertiesFile)
Set a properties file
Parameters:
propertiesFile - the properties file name

setQuiet

public void setQuiet(boolean quiet)
Enable "quiet" mode. The schema will not be written to standard out.
Parameters:
quiet - true to enable quiet mode

setText

public void setText(boolean text)
Enable "text-only" mode. The schema will not be updated in the database.
Parameters:
text - true to enable text-only mode