org.apache.cayenne.tools
Class DbGeneratorTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.cayenne.tools.CayenneTask
              extended by org.apache.cayenne.tools.DbGeneratorTask

public class DbGeneratorTask
extends CayenneTask

An Ant Task that is a frontend to Cayenne DbGenerator allowing schema generation from DataMap using Ant.

Since:
1.2

Field Summary
protected  boolean createFK
           
protected  boolean createPK
           
protected  boolean createTables
           
protected  boolean dropPK
           
protected  boolean dropTables
           
 
Fields inherited from class org.apache.cayenne.tools.CayenneTask
adapter, classpath, driver, map, password, url, userName
 
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
DbGeneratorTask()
           
 
Method Summary
 void execute()
           
 void setCreateFK(boolean createFK)
           
 void setCreatePK(boolean createPK)
           
 void setCreateTables(boolean createTables)
           
 void setDropPK(boolean dropPK)
           
 void setDropTables(boolean dropTables)
           
protected  void validateAttributes()
          Validates attributes that are not related to internal DefaultClassGenerator.
 
Methods inherited from class org.apache.cayenne.tools.CayenneTask
getAdapter, loadDataMap, setAdapter, setClasspath, setClasspathRef, setDriver, setMap, setPassword, setUrl, setUserName
 
Methods inherited from class org.apache.tools.ant.Task
getDescription, getLocation, getOwningTarget, getRuntimeConfigurableWrapper, getTaskName, getTaskType, getWrapper, handleErrorFlush, handleErrorOutput, handleFlush, handleInput, handleOutput, init, isInvalid, log, log, maybeConfigure, perform, reconfigure, setDescription, setLocation, setOwningTarget, setRuntimeConfigurableWrapper, setTaskName, setTaskType
 
Methods inherited from class org.apache.tools.ant.ProjectComponent
getProject, setProject
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

dropTables

protected boolean dropTables

dropPK

protected boolean dropPK

createTables

protected boolean createTables

createPK

protected boolean createPK

createFK

protected boolean createFK
Constructor Detail

DbGeneratorTask

public DbGeneratorTask()
Method Detail

execute

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

validateAttributes

protected void validateAttributes()
                           throws org.apache.tools.ant.BuildException
Validates attributes that are not related to internal DefaultClassGenerator. Throws BuildException if attributes are invalid.

Throws:
org.apache.tools.ant.BuildException

setCreateFK

public void setCreateFK(boolean createFK)

setCreatePK

public void setCreatePK(boolean createPK)

setCreateTables

public void setCreateTables(boolean createTables)

setDropPK

public void setDropPK(boolean dropPK)

setDropTables

public void setDropTables(boolean dropTables)


Copyright © 2001-2013 Apache Cayenne. All Rights Reserved.