Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## org.apache.cayenne.tools
Class CayenneGenerator

    java.lang.Object
      org.apache.tools.ant.ProjectComponent
          org.apache.tools.ant.Task
              org.apache.cayenne.tools.CayenneTask
                  org.apache.cayenne.tools.CayenneGenerator

    public class CayenneGenerator

extends CayenneTask

Ant task to perform class generation from data map. This class is an Ant adapter to DefaultClassGenerator class.

Author:
  Andrus Adamchik

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

### includeEntitiesPattern

    protected java.lang.String includeEntitiesPattern

### excludeEntitiesPattern

    protected java.lang.String excludeEntitiesPattern

### vppConfig

    protected foundrylogic.vpp.VPPConfig vppConfig

### map

    protected java.io.File map

### additionalMaps

    protected java.io.File[] additionalMaps

### generator

    protected DefaultClassGenerator generator

Constructor Detail

### CayenneGenerator

    public CayenneGenerator()

Method Detail

### createGenerator

    protected DefaultClassGenerator createGenerator()

  Factory method to create internal class generator. Called from constructor.

### execute

    public void execute()
                 throws org.apache.tools.ant.BuildException

  Executes the task. It will be called by ant framework.

  Overrides:
    `execute` in class `org.apache.tools.ant.Task`
  Throws:
    `org.apache.tools.ant.BuildException`

### processMap

    protected void processMap()
                       throws java.lang.Exception

  Throws:
    `java.lang.Exception`

### loadDataMap

    protected DataMap loadDataMap(java.io.File mapName)
                           throws java.lang.Exception

  Loads and returns a DataMap by File.

  Throws:
    `java.lang.Exception`

### loadDataMap

    protected DataMap loadDataMap()
                           throws java.lang.Exception

  Loads and returns DataMap based on `map` attribute.

  Throws:
    `java.lang.Exception`

### loadAdditionalDataMaps

    protected DataMap[] loadAdditionalDataMaps()
                                        throws java.lang.Exception

  Loads and returns DataMap based on `map` attribute.

  Throws:
    `java.lang.Exception`

### validateAttributes

    protected void validateAttributes()
                               throws org.apache.tools.ant.BuildException

  Validates atttributes that are not related to internal DefaultClassGenerator. Throws BuildException if attributes are invalid.

  Throws:
    `org.apache.tools.ant.BuildException`

### setMap

    public void setMap(java.io.File map)

  Sets the map.

  Parameters:
    `map` - The map to set

### setAdditionalMaps

    public void setAdditionalMaps(org.apache.tools.ant.types.Path additionalMapsPath)

  Sets the additional DataMaps.

  Parameters:
    `additionalMapsPath` - The additional DataMaps to set

### setDestDir

    public void setDestDir(java.io.File destDir)

  Sets the destDir.

### setOverwrite

    public void setOverwrite(boolean overwrite)

  Sets `overwrite` property.

### setMakepairs

    public void setMakepairs(boolean makepairs)

  Sets `makepairs` property.

### setTemplate

    public void setTemplate(java.lang.String template)

  Sets `template` property.

### setSupertemplate

    public void setSupertemplate(java.lang.String supertemplate)

  Sets `supertemplate` property.

### setUsepkgpath

    public void setUsepkgpath(boolean usepkgpath)

  Sets `usepkgpath` property.

### setSuperpkg

    public void setSuperpkg(java.lang.String superpkg)

  Sets `superpkg` property.

### setClient

    public void setClient(boolean client)

  Sets `client` property.

  Since:
    1.2

### setVersion

    public void setVersion(java.lang.String versionString)

  Sets `version` property.

  Since:
    1.2

### setEncoding

    public void setEncoding(java.lang.String encoding)

  Sets `encoding` property that allows to generate files using non-default encoding.

  Since:
    1.2

### setExcludeEntities

    public void setExcludeEntities(java.lang.String excludeEntitiesPattern)

  Sets `excludeEntitiesPattern` property.

  Since:
    1.2

### setIncludeEntities

    public void setIncludeEntities(java.lang.String includeEntitiesPattern)

  Sets `includeEntitiesPattern` property.

  Since:
    1.2

### setOutputPattern

    public void setOutputPattern(java.lang.String outputPattern)

  Sets `outputPattern` property.

  Since:
    1.2

### setMode

    public void setMode(java.lang.String mode)

  Sets `outputPattern` property.

  Since:
    1.2

### createConfig

    public java.lang.Object createConfig()

  Provides a `VPPConfig` objec to configure. (Written with createConfig() instead of addConfig() to avoid run-time dependency on VPP).

  Since:
    1.2

Overview | Package | Class | Tree | Deprecated | Index | Help
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright © 2001-2006 Apache.org All Rights Reserved.