SchemaExportTask (Hibernate JavaDocs)
Date: 2012-04-05

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.hibernate.tool.hbm2ddl
Class SchemaExportTask

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.tools.ant.taskdefs.MatchingTask
                  org.hibernate.tool.hbm2ddl.SchemaExportTask

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

    public class SchemaExportTask

extends org.apache.tools.ant.taskdefs.MatchingTask

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:
  `SchemaExport`

Field Summary

Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`fileset`

Fields inherited from class org.apache.tools.ant.Task
`target, taskName, taskType, wrapper`

Fields inherited from class org.apache.tools.ant.ProjectComponent
`description, location, project`

Constructor Summary
`SchemaExportTask()`

Method Summary
`void` | `addFileset(org.apache.tools.ant.types.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.

Methods inherited from class org.apache.tools.ant.taskdefs.MatchingTask
`add, addAnd, addContains, addContainsRegexp, addCustom, addDate, addDepend, addDepth, addDifferent, addFilename, addMajority, addModified, addNone, addNot, addOr, addPresent, addSelector, addSize, addType, appendSelector, createExclude, createExcludesFile, createInclude, createIncludesFile, createPatternSet, getDirectoryScanner, getImplicitFileSet, getSelectors, hasSelectors, selectorCount, selectorElements, setCaseSensitive, setDefaultexcludes, setExcludes, setExcludesfile, setFollowSymlinks, setIncludes, setIncludesfile, setProject, XsetIgnore, XsetItems`

Methods inherited from class org.apache.tools.ant.Task
`bindToOwner, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, log, log, maybeConfigure, perform, reconfigure, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType`

Methods inherited from class org.apache.tools.ant.ProjectComponent
`clone, getDescription, getLocation, getProject, setDescription, setLocation`

Methods inherited from class java.lang.Object
`equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### SchemaExportTask

    public SchemaExportTask()

Method Detail

### 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, which will be loaded as a resource, from the classpath

  Parameters:
    `configurationFile` - the path to the resource

### 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 exported to the database.

  Parameters:
    `text` - true to enable text-only mode

### setDrop

    public void setDrop(boolean drop)

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

  Parameters:
    `drop` - true to enable drop mode

### setCreate

    public void setCreate(boolean create)

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

  Parameters:
    `create` - true to enable create mode

### setDelimiter

    public void setDelimiter(String delimiter)

  Set the end of statement delimiter for the generated script

  Parameters:
    `delimiter` - the delimiter

### setOutput

    public void setOutput(File outputFile)

  Set the script output file

  Parameters:
    `outputFile` - the file name

### 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)

### setHaltonerror

    public void setHaltonerror(boolean haltOnError)

Overview | Package | Class | Use | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2012 Red Hat, Inc. All Rights Reserved.