org.apache.cayenne.tools
Class CayenneTask

java.lang.Object
  extended by org.apache.tools.ant.ProjectComponent
      extended by org.apache.tools.ant.Task
          extended by org.apache.cayenne.tools.CayenneTask
Direct Known Subclasses:
CayenneGeneratorTask, DataPortTask, DbGeneratorTask, DbImporterTask

public abstract class CayenneTask
extends org.apache.tools.ant.Task

Base task for all Cayenne ant tasks, providing support for common configuration items.

Since:
1.2

Field Summary
protected  DbAdapter adapter
           
protected  org.apache.tools.ant.types.Path classpath
           
protected  String driver
           
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
CayenneTask()
           
 
Method Summary
protected  DataMap loadDataMap()
          Loads and returns DataMap based on map attribute.
 void setAdapter(String adapter)
          Sets the db adapter.
 void setClasspath(org.apache.tools.ant.types.Path path)
          Sets the classpath used by the task.
 void setClasspathRef(org.apache.tools.ant.types.Reference reference)
          Sets the classpath reference used by the task.
 void setDriver(String driver)
          Sets the JDBC driver used to connect to the database server.
 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.
 
Methods inherited from class org.apache.tools.ant.Task
execute, 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

classpath

protected org.apache.tools.ant.types.Path classpath

adapter

protected DbAdapter adapter

map

protected File map

driver

protected String driver

url

protected String url

userName

protected String userName

password

protected String password
Constructor Detail

CayenneTask

public CayenneTask()
Method Detail

setClasspath

public void setClasspath(org.apache.tools.ant.types.Path path)
Sets the classpath used by the task.

Parameters:
path - The classpath to set.

setClasspathRef

public void setClasspathRef(org.apache.tools.ant.types.Reference reference)
Sets the classpath reference used by the task.

Parameters:
reference - The classpath reference to set.

setMap

public void setMap(File map)
Sets the map.

Parameters:
map - The map to set

setAdapter

public void setAdapter(String adapter)
Sets the db adapter.

Parameters:
adapter - The db adapter to set.

setDriver

public void setDriver(String driver)
Sets the JDBC driver used to connect to the database server.

Parameters:
driver - The driver to set.

setUrl

public void setUrl(String url)
Sets the JDBC URL used to connect to the database server.

Parameters:
url - The url to set.

setUserName

public void setUserName(String username)
Sets the username used to connect to the database server.

Parameters:
username - The username to set.

setPassword

public void setPassword(String password)
Sets the password used to connect to the database server.

Parameters:
password - The password to set.

loadDataMap

protected DataMap loadDataMap()
                       throws Exception
Loads and returns DataMap based on map attribute.

Throws:
Exception


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