public class

SchemaExportTask

extends MatchingTask
java.lang.Object
   ↳ MatchingTask
     ↳ org.hibernate.tool.hbm2ddl.SchemaExportTask

Class Overview

An Ant task for SchemaExport.

 <taskdef name="schemaexport"
     classname="org.hibernate.tool.hbm2ddl.SchemaExportTask"
     classpathref="class.path"/>

 <schemaexport
     properties="${build.classes.dir}/hibernate.properties"
     quiet="no"
     text="no"
     drop="no"
     delimiter=";"
     output="${build.dir}/schema-export.sql">
     <fileset dir="${build.classes.dir}">
         <include name="*.hbm.xml"/>
     </fileset>
 </schemaexport>
 

See Also

Summary

Public Constructors
SchemaExportTask()
Public Methods
void addFileset(FileSet set)
void execute()
Execute the task
void setConfig(File configurationFile)
Set a .cfg.xml file, which will be loaded as a resource, from the classpath
void setCreate(boolean create)
Enable "create" mode.
void setDelimiter(String delimiter)
Set the end of statement delimiter for the generated script
void setDrop(boolean drop)
Enable "drop" mode.
void setHaltonerror(boolean haltOnError)
void setNamingStrategy(String namingStrategy)
void setOutput(File outputFile)
Set the script output file
void setProperties(File propertiesFile)
Set a properties file
void setQuiet(boolean quiet)
Enable "quiet" mode.
void setText(boolean text)
Enable "text-only" mode.
[Expand]
Inherited Methods
From class java.lang.Object

Public Constructors

public SchemaExportTask ()

Public Methods

public void addFileset (FileSet set)

public void execute ()

Execute the task

Throws
BuildException

public void setConfig (File configurationFile)

Set a .cfg.xml file, which will be loaded as a resource, from the classpath

Parameters
configurationFile the path to the resource

public void setCreate (boolean create)

Enable "create" mode. Database objects will be created but not first dropped.

Parameters
create true to enable create mode

public void setDelimiter (String delimiter)

Set the end of statement delimiter for the generated script

Parameters
delimiter the delimiter

public void setDrop (boolean drop)

Enable "drop" mode. Database objects will be dropped but not recreated.

Parameters
drop true to enable drop mode

public void setHaltonerror (boolean haltOnError)

public void setNamingStrategy (String namingStrategy)

public void setOutput (File outputFile)

Set the script output file

Parameters
outputFile the file name

public void setProperties (File propertiesFile)

Set a properties file

Parameters
propertiesFile the properties file name

public void setQuiet (boolean quiet)

Enable "quiet" mode. The schema will not be written to standard out.

Parameters
quiet true to enable quiet mode

public void setText (boolean text)

Enable "text-only" mode. The schema will not be exported to the database.

Parameters
text true to enable text-only mode