org.apache.ibatis.ibator.ant
Class IbatorAntTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.ibatis.ibator.ant.IbatorAntTask
All Implemented Interfaces:
java.lang.Cloneable

public class IbatorAntTask
extends org.apache.tools.ant.Task

This is an Ant task that will run Ibator. The following is a sample Ant script that shows how to run Ibator from Ant:

  <project default="genfiles" basedir=".">
    <property name="generated.source.dir" value="${basedir}" />
    <target name="genfiles" description="Generate the files">
      <taskdef name="ibator"
               classname="org.apache.ibatis.ibator.ant.IbatorAntTask"
               classpath="ibator.jar" />
      <ibator overwrite="true" configfile="ibatorConfig.xml" verbose="false" >
        <propertyset>
          <propertyref name="generated.source.dir"/>
        </propertyset>
      </ibator>
    </target>
  </project>
 
The task requires that the attribute "configFile" be set to an existing ibator XML configuration file.

The task supports these optional attributes:

Author:
Jeff Butler

Field Summary
 
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
IbatorAntTask()
           
 
Method Summary
 org.apache.tools.ant.types.PropertySet createPropertyset()
           
 void execute()
           
 java.lang.String getConfigfile()
           
 java.lang.String getContextIds()
           
 java.lang.String getFullyQualifiedTableNames()
           
 boolean isOverwrite()
           
 boolean isVerbose()
           
 void setConfigfile(java.lang.String configfile)
           
 void setContextIds(java.lang.String contextIds)
           
 void setFullyQualifiedTableNames(java.lang.String fullyQualifiedTableNames)
           
 void setOverwrite(boolean overwrite)
           
 void setVerbose(boolean verbose)
           
 
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, setProject
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

IbatorAntTask

public IbatorAntTask()
Method Detail

execute

public void execute()
             throws org.apache.tools.ant.BuildException
Overrides:
execute in class org.apache.tools.ant.Task
Throws:
org.apache.tools.ant.BuildException

getConfigfile

public java.lang.String getConfigfile()
Returns:
Returns the configfile.

setConfigfile

public void setConfigfile(java.lang.String configfile)
Parameters:
configfile - The configfile to set.

isOverwrite

public boolean isOverwrite()
Returns:
Returns the overwrite.

setOverwrite

public void setOverwrite(boolean overwrite)
Parameters:
overwrite - The overwrite to set.

createPropertyset

public org.apache.tools.ant.types.PropertySet createPropertyset()

isVerbose

public boolean isVerbose()

setVerbose

public void setVerbose(boolean verbose)

getContextIds

public java.lang.String getContextIds()

setContextIds

public void setContextIds(java.lang.String contextIds)

getFullyQualifiedTableNames

public java.lang.String getFullyQualifiedTableNames()

setFullyQualifiedTableNames

public void setFullyQualifiedTableNames(java.lang.String fullyQualifiedTableNames)