Class SchemaUpdateTask

All Implemented Interfaces:
org.apache.tools.ant.types.selectors.SelectorContainer

public class SchemaUpdateTask extends org.apache.tools.ant.taskdefs.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>
 
See Also:
  • Constructor Details

    • SchemaUpdateTask

      public SchemaUpdateTask()
  • Method Details

    • addFileset

      public void addFileset(org.apache.tools.ant.types.FileSet set)
    • setProperties

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

      public void setConfig(File configurationFile)
      Set a .cfg.xml file
      Parameters:
      configurationFile - the file name
    • 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
    • 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
    • execute

      public void execute() throws org.apache.tools.ant.BuildException
      Execute the task
      Overrides:
      execute in class org.apache.tools.ant.Task
      Throws:
      org.apache.tools.ant.BuildException
    • setNamingStrategy

      public void setNamingStrategy(String namingStrategy)
    • getOutputFile

      public File getOutputFile()
    • setOutputFile

      public void setOutputFile(File outputFile)
    • isHaltOnError

      public boolean isHaltOnError()
    • setHaltOnError

      public void setHaltOnError(boolean haltOnError)
    • getDelimiter

      public String getDelimiter()
    • setDelimiter

      public void setDelimiter(String delimiter)