|
|||||||||
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.CayenneTask
org.apache.cayenne.tools.CayenneGenerator
public class CayenneGenerator
Ant task to perform class generation from data map. This class is an Ant adapter to DefaultClassGenerator class.
Field Summary | |
---|---|
protected java.io.File[] |
additionalMaps
|
protected java.lang.String |
excludeEntitiesPattern
|
protected DefaultClassGenerator |
generator
|
protected java.lang.String |
includeEntitiesPattern
|
protected java.io.File |
map
|
protected foundrylogic.vpp.VPPConfig |
vppConfig
|
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 | |
---|---|
CayenneGenerator()
|
Method Summary | |
---|---|
java.lang.Object |
createConfig()
Provides a VPPConfig objec to configure. |
protected DefaultClassGenerator |
createGenerator()
Factory method to create internal class generator. |
void |
execute()
Executes the task. |
protected DataMap[] |
loadAdditionalDataMaps()
Loads and returns DataMap based on map attribute. |
protected DataMap |
loadDataMap()
Loads and returns DataMap based on map attribute. |
protected DataMap |
loadDataMap(java.io.File mapName)
Loads and returns a DataMap by File. |
protected void |
processMap()
|
void |
setAdditionalMaps(org.apache.tools.ant.types.Path additionalMapsPath)
Sets the additional DataMaps. |
void |
setClient(boolean client)
Sets client property. |
void |
setDestDir(java.io.File destDir)
Sets the destDir. |
void |
setEncoding(java.lang.String encoding)
Sets encoding property that allows to generate files using
non-default encoding. |
void |
setExcludeEntities(java.lang.String excludeEntitiesPattern)
Sets excludeEntitiesPattern property. |
void |
setIncludeEntities(java.lang.String includeEntitiesPattern)
Sets includeEntitiesPattern property. |
void |
setMakepairs(boolean makepairs)
Sets makepairs property. |
void |
setMap(java.io.File map)
Sets the map. |
void |
setMode(java.lang.String mode)
Sets outputPattern property. |
void |
setOutputPattern(java.lang.String outputPattern)
Sets outputPattern property. |
void |
setOverwrite(boolean overwrite)
Sets overwrite property. |
void |
setSuperpkg(java.lang.String superpkg)
Sets superpkg property. |
void |
setSupertemplate(java.lang.String supertemplate)
Sets supertemplate property. |
void |
setTemplate(java.lang.String template)
Sets template property. |
void |
setUsepkgpath(boolean usepkgpath)
Sets usepkgpath property. |
void |
setVersion(java.lang.String versionString)
Sets version property. |
protected void |
validateAttributes()
Validates atttributes that are not related to internal DefaultClassGenerator. |
Methods inherited from class org.apache.cayenne.tools.CayenneTask |
---|
configureLogging |
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 java.lang.String includeEntitiesPattern
protected java.lang.String excludeEntitiesPattern
protected foundrylogic.vpp.VPPConfig vppConfig
protected java.io.File map
protected java.io.File[] additionalMaps
protected DefaultClassGenerator generator
Constructor Detail |
---|
public CayenneGenerator()
Method Detail |
---|
protected DefaultClassGenerator createGenerator()
public void execute() throws org.apache.tools.ant.BuildException
execute
in class org.apache.tools.ant.Task
org.apache.tools.ant.BuildException
protected void processMap() throws java.lang.Exception
java.lang.Exception
protected DataMap loadDataMap(java.io.File mapName) throws java.lang.Exception
java.lang.Exception
protected DataMap loadDataMap() throws java.lang.Exception
map
attribute.
java.lang.Exception
protected DataMap[] loadAdditionalDataMaps() throws java.lang.Exception
map
attribute.
java.lang.Exception
protected void validateAttributes() throws org.apache.tools.ant.BuildException
org.apache.tools.ant.BuildException
public void setMap(java.io.File map)
map
- The map to setpublic void setAdditionalMaps(org.apache.tools.ant.types.Path additionalMapsPath)
additionalMapsPath
- The additional DataMaps to setpublic void setDestDir(java.io.File destDir)
public void setOverwrite(boolean overwrite)
overwrite
property.
public void setMakepairs(boolean makepairs)
makepairs
property.
public void setTemplate(java.lang.String template)
template
property.
public void setSupertemplate(java.lang.String supertemplate)
supertemplate
property.
public void setUsepkgpath(boolean usepkgpath)
usepkgpath
property.
public void setSuperpkg(java.lang.String superpkg)
superpkg
property.
public void setClient(boolean client)
client
property.
public void setVersion(java.lang.String versionString)
version
property.
public void setEncoding(java.lang.String encoding)
encoding
property that allows to generate files using
non-default encoding.
public void setExcludeEntities(java.lang.String excludeEntitiesPattern)
excludeEntitiesPattern
property.
public void setIncludeEntities(java.lang.String includeEntitiesPattern)
includeEntitiesPattern
property.
public void setOutputPattern(java.lang.String outputPattern)
outputPattern
property.
public void setMode(java.lang.String mode)
outputPattern
property.
public java.lang.Object createConfig()
VPPConfig
objec to configure. (Written with
createConfig() instead of addConfig() to avoid run-time dependency on VPP).
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |