站内搜索: 请输入搜索关键词
当前页面: 在线文档首页 > Hibernate 2.1.8 正式版 API 英文文档

SchemaUpdateTask (Hibernate API Documentation) - Hibernate 2.1.8 正式版 API 英文文档


net.sf.hibernate.tool.hbm2ddl
Class SchemaUpdateTask

java.lang.Object
  extended byorg.apache.tools.ant.ProjectComponent
      extended byorg.apache.tools.ant.Task
          extended byorg.apache.tools.ant.taskdefs.MatchingTask
              extended bynet.sf.hibernate.tool.hbm2ddl.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="net.sf.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

Field Summary
 
Fields inherited from class org.apache.tools.ant.taskdefs.MatchingTask
fileset, useDefaultExcludes
 
Fields inherited from class org.apache.tools.ant.Task
description, location, target, taskName, taskType, wrapper
 
Fields inherited from class org.apache.tools.ant.ProjectComponent
project
 
Constructor Summary
SchemaUpdateTask()
           
 
Method Summary
 void addFileset(org.apache.tools.ant.types.FileSet set)
           
 void execute()
          Execute the task
 void setConfig(String configurationFile)
          Set a .cfg.xml file
 void setNamingStrategy(String namingStrategy)
           
 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
addAnd, addContains, addCustom, addDate, addDepend, addDepth, addFilename, addMajority, addNone, addNot, addOr, addPresent, addSelector, addSize, 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
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, handleErrorFlush, handleErrorOutput, handleFlush, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

SchemaUpdateTask

public SchemaUpdateTask()
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(String 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

Throws:
org.apache.tools.ant.BuildException

setNamingStrategy

public void setNamingStrategy(String namingStrategy)