|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.tools.ant.ProjectComponent
org.apache.tools.ant.Task
org.apache.cayenne.tools.DbGeneratorTask
public class DbGeneratorTask
An Ant Task that is a frontend to Cayenne DbGenerator allowing schema generation from DataMap using Ant.
Field Summary | |
---|---|
protected DbAdapter |
adapter
|
protected boolean |
createFK
|
protected boolean |
createPK
|
protected boolean |
createTables
|
protected String |
driver
|
protected boolean |
dropPK
|
protected boolean |
dropTables
|
protected File |
map
|
protected String |
password
|
protected String |
url
|
protected String |
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()
|
protected DataMap |
loadDataMap()
Loads and returns DataMap based on map attribute. |
void |
setAdapter(String adapter)
Sets the db adapter. |
void |
setCreateFK(boolean createFK)
|
void |
setCreatePK(boolean createPK)
|
void |
setCreateTables(boolean createTables)
|
void |
setDriver(String driver)
Sets the JDBC driver used to connect to the database server. |
void |
setDropPK(boolean dropPK)
|
void |
setDropTables(boolean dropTables)
|
void |
setMap(File map)
Sets the map. |
void |
setPassword(String password)
Sets the password used to connect to the database server. |
void |
setUrl(String url)
Sets the JDBC URL used to connect to the database server. |
void |
setUserName(String username)
Sets the username used to connect to the database server. |
protected void |
validateAttributes()
Validates atttributes that are not related to internal DefaultClassGenerator. |
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 |
---|
protected DbAdapter adapter
protected File map
protected String driver
protected String url
protected String userName
protected String password
protected boolean dropTables
protected boolean dropPK
protected boolean createTables
protected boolean createPK
protected boolean createFK
Constructor Detail |
---|
public DbGeneratorTask()
Method Detail |
---|
public void execute()
execute
in class org.apache.tools.ant.Task
protected void validateAttributes() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
protected DataMap loadDataMap() throws Exception
map
attribute.
Exception
public void setCreateFK(boolean createFK)
public void setCreatePK(boolean createPK)
public void setCreateTables(boolean createTables)
public void setDropPK(boolean dropPK)
public void setDropTables(boolean dropTables)
public void setMap(File map)
map
- The map to setpublic void setAdapter(String adapter)
adapter
- The db adapter to set.public void setDriver(String driver)
driver
- The driver to set.public void setUrl(String url)
url
- The url to set.public void setUserName(String username)
username
- The username to set.public void setPassword(String password)
password
- The password to set.
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |