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

## org.apache.cayenne.gen
Class ClassGenerationAction1_1

    java.lang.Object
      org.apache.cayenne.gen.ClassGenerationAction
          org.apache.cayenne.gen.ClassGenerationAction1_1

Deprecated. since 3.0

    public class ClassGenerationAction1_1

extends ClassGenerationAction

A backwards compatible class generation action that delegates to the deprecated `DefaultClassGenerator`.

Since:
  3.0
Author:
  Andrus Adamchik

Field Summary
`protected List<ObjEntity>` | `entities` Deprecated.
`protected DefaultClassGenerator` | `generator` Deprecated.
`protected org.apache.commons.logging.Log` | `logger` Deprecated.
`static String` | `SINGLE_CLASS_TEMPLATE` Deprecated.
`static String` | `SUBCLASS_TEMPLATE` Deprecated.
`static String` | `SUPERCLASS_TEMPLATE` Deprecated.

Fields inherited from class org.apache.cayenne.gen.ClassGenerationAction
`artifacts, artifactsGenerationMode, context, dataMap, destDir, EMBEDDABLE_SINGLE_CLASS_TEMPLATE, EMBEDDABLE_SUBCLASS_TEMPLATE, EMBEDDABLE_SUPERCLASS_TEMPLATE, embeddableSuperTemplate, embeddableTemplate, encoding, makePairs, outputPattern, overwrite, SUPERCLASS_PREFIX, superPkg, superTemplate, template, templateCache, timestamp, usePkgPath`

Constructor Summary
`ClassGenerationAction1_1()` Deprecated.

Method Summary
`void` | `addEmbeddables(Collection<Embeddable> embeddables)` Deprecated.
`void` | `addEntities(Collection<ObjEntity> entities)` Deprecated. Adds entities to the internal entity list.
`protected String` | `customTemplateName(TemplateType type)` Deprecated.
`protected String` | `defaultTemplateName(TemplateType type)` Deprecated.
`void` | `execute()` Deprecated. Executes class generation once per each artifact.
`protected void` | `execute(Artifact artifact)` Deprecated. Executes class generation for a single artifact.
`protected File` | `fileForClass()` Deprecated. Returns a target file where a generated class must be saved.
`protected File` | `fileForSuperclass()` Deprecated. Returns a target file where a generated superclass must be saved.
`protected String` | `getSuperclassPrefix()` Deprecated. Returns a String used to prefix class name to create a generated superclass.
`protected org.apache.velocity.Template` | `getTemplate(TemplateType type)` Deprecated.
`protected boolean` | `isOld(File file)` Deprecated. Returns true if `file` parameter is older than internal timestamp of this class generator.
`protected File` | `mkpath(File dest, String pkgName)` Deprecated. Returns a File object corresponding to a directory where files that belong to `pkgName` package should reside.
`protected Writer` | `openWriter(TemplateType templateType)` Deprecated. Opens a Writer to write generated output.
`protected void` | `resetContextForArtifact(Artifact artifact)` Deprecated. VelocityContext initialization method called once per artifact.
`void` | `setArtifactsGenerationMode(String mode)` Deprecated.
`void` | `setContext(org.apache.velocity.VelocityContext context)` Deprecated. Sets an optional shared VelocityContext.
`void` | `setDataMap(DataMap dataMap)` Deprecated.
`void` | `setDestDir(File destDir)` Deprecated. Sets the destDir.
`void` | `setEmbeddableSuperTemplate(String embeddableSuperTemplate)` Deprecated.
`void` | `setEmbeddableTemplate(String embeddableTemplate)` Deprecated.
`void` | `setEncoding(String encoding)` Deprecated. Sets file encoding.
`void` | `setLogger(org.apache.commons.logging.Log logger)` Deprecated. Injects an optional logger that will be used to trace generated files at the info level.
`void` | `setMakePairs(boolean makePairs)` Deprecated. Sets `makepairs` property.
`void` | `setOutputPattern(String outputPattern)` Deprecated. Sets `outputPattern` property.
`void` | `setOverwrite(boolean overwrite)` Deprecated. Sets `overwrite` property.
`void` | `setSuperPkg(String superPkg)` Deprecated. Sets "superPkg" property value.
`void` | `setSuperTemplate(String superTemplate)` Deprecated. Sets `superTemplate` property.
`void` | `setTemplate(String template)` Deprecated. Sets `template` property.
`void` | `setTimestamp(long timestamp)` Deprecated.
`void` | `setUsePkgPath(boolean usePkgPath)` Deprecated. Sets `usepkgpath` property.
`protected void` | `validateAttributes()` Deprecated. Validates the state of this class generator.

Methods inherited from class org.apache.cayenne.gen.ClassGenerationAction
`resetContextForArtifactTemplate`

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Field Detail

### SINGLE_CLASS_TEMPLATE

    public static final String SINGLE_CLASS_TEMPLATE

  Deprecated.
  See Also:
    Constant Field Values

### SUBCLASS_TEMPLATE

    public static final String SUBCLASS_TEMPLATE

  Deprecated.
  See Also:
    Constant Field Values

### SUPERCLASS_TEMPLATE

    public static final String SUPERCLASS_TEMPLATE

  Deprecated.
  See Also:
    Constant Field Values

### generator

    protected DefaultClassGenerator generator

  Deprecated.

### entities

    protected List<ObjEntity> entities

  Deprecated.

### logger

    protected org.apache.commons.logging.Log logger

  Deprecated.

Constructor Detail

### ClassGenerationAction1_1

    public ClassGenerationAction1_1()

  Deprecated.

Method Detail

### addEmbeddables

    public void addEmbeddables(Collection<Embeddable> embeddables)

  Deprecated.
  Overrides:
    `addEmbeddables` in class `ClassGenerationAction`

### addEntities

    public void addEntities(Collection<ObjEntity> entities)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Adds entities to the internal entity list.

  Overrides:
    `addEntities` in class `ClassGenerationAction`

### customTemplateName

    protected String customTemplateName(TemplateType type)

  Deprecated.
  Overrides:
    `customTemplateName` in class `ClassGenerationAction`

### defaultTemplateName

    protected String defaultTemplateName(TemplateType type)

  Deprecated.
  Overrides:
    `defaultTemplateName` in class `ClassGenerationAction`

### execute

    public void execute()
                 throws Exception

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Executes class generation once per each artifact.

  Overrides:
    `execute` in class `ClassGenerationAction`
  Throws:
    `Exception`

### execute

    protected void execute(Artifact artifact)
                    throws Exception

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Executes class generation for a single artifact.

  Overrides:
    `execute` in class `ClassGenerationAction`
  Throws:
    `Exception`

### fileForClass

    protected File fileForClass()
                         throws Exception

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Returns a target file where a generated class must be saved. If null is returned, class shouldn't be generated.

  Overrides:
    `fileForClass` in class `ClassGenerationAction`
  Throws:
    `Exception`

### fileForSuperclass

    protected File fileForSuperclass()
                              throws Exception

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Returns a target file where a generated superclass must be saved. If null is returned, class shouldn't be generated.

  Overrides:
    `fileForSuperclass` in class `ClassGenerationAction`
  Throws:
    `Exception`

### getSuperclassPrefix

    protected String getSuperclassPrefix()

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Returns a String used to prefix class name to create a generated superclass. Default value is "_".

  Overrides:
    `getSuperclassPrefix` in class `ClassGenerationAction`

### getTemplate

    protected org.apache.velocity.Template getTemplate(TemplateType type)
                                                throws Exception

  Deprecated.
  Overrides:
    `getTemplate` in class `ClassGenerationAction`
  Throws:
    `Exception`

### resetContextForArtifact

    protected void resetContextForArtifact(Artifact artifact)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  VelocityContext initialization method called once per artifact.

  Overrides:
    `resetContextForArtifact` in class `ClassGenerationAction`

### isOld

    protected boolean isOld(File file)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Returns true if `file` parameter is older than internal timestamp of this class generator.

  Overrides:
    `isOld` in class `ClassGenerationAction`

### mkpath

    protected File mkpath(File dest,
                          String pkgName)
                   throws Exception

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Returns a File object corresponding to a directory where files that belong to `pkgName` package should reside. Creates any missing diectories below `dest`.

  Overrides:
    `mkpath` in class `ClassGenerationAction`
  Throws:
    `Exception`

### openWriter

    protected Writer openWriter(TemplateType templateType)
                         throws Exception

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Opens a Writer to write generated output. Returned Writer is mapped to a filesystem file (although subclasses may override that). File location is determined from the current state of VelocityContext and the TemplateType passed as a parameter. Writer encoding is determined from the value of the "encoding" property.

  Overrides:
    `openWriter` in class `ClassGenerationAction`
  Throws:
    `Exception`

### setArtifactsGenerationMode

    public void setArtifactsGenerationMode(String mode)

  Deprecated.
  Overrides:
    `setArtifactsGenerationMode` in class `ClassGenerationAction`

### setContext

    public void setContext(org.apache.velocity.VelocityContext context)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets an optional shared VelocityContext. Useful with tools like VPP that can set custom values in the context, not known to Cayenne.

  Overrides:
    `setContext` in class `ClassGenerationAction`

### setDataMap

    public void setDataMap(DataMap dataMap)

  Deprecated.
  Overrides:
    `setDataMap` in class `ClassGenerationAction`
  Parameters:
    `dataMap` - The dataMap to set.

### setDestDir

    public void setDestDir(File destDir)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets the destDir.

  Overrides:
    `setDestDir` in class `ClassGenerationAction`

### setEmbeddableSuperTemplate

    public void setEmbeddableSuperTemplate(String embeddableSuperTemplate)

  Deprecated.
  Overrides:
    `setEmbeddableSuperTemplate` in class `ClassGenerationAction`

### setEmbeddableTemplate

    public void setEmbeddableTemplate(String embeddableTemplate)

  Deprecated.
  Overrides:
    `setEmbeddableTemplate` in class `ClassGenerationAction`

### setEncoding

    public void setEncoding(String encoding)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets file encoding. If set to null, default system encoding will be used.

  Overrides:
    `setEncoding` in class `ClassGenerationAction`

### setLogger

    public void setLogger(org.apache.commons.logging.Log logger)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Injects an optional logger that will be used to trace generated files at the info level.

  Overrides:
    `setLogger` in class `ClassGenerationAction`

### setMakePairs

    public void setMakePairs(boolean makePairs)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets `makepairs` property.

  Overrides:
    `setMakePairs` in class `ClassGenerationAction`

### setOutputPattern

    public void setOutputPattern(String outputPattern)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets `outputPattern` property.

  Overrides:
    `setOutputPattern` in class `ClassGenerationAction`

### setOverwrite

    public void setOverwrite(boolean overwrite)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets `overwrite` property.

  Overrides:
    `setOverwrite` in class `ClassGenerationAction`

### setSuperPkg

    public void setSuperPkg(String superPkg)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets "superPkg" property value.

  Overrides:
    `setSuperPkg` in class `ClassGenerationAction`

### setSuperTemplate

    public void setSuperTemplate(String superTemplate)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets `superTemplate` property.

  Overrides:
    `setSuperTemplate` in class `ClassGenerationAction`

### setTemplate

    public void setTemplate(String template)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets `template` property.

  Overrides:
    `setTemplate` in class `ClassGenerationAction`

### setTimestamp

    public void setTimestamp(long timestamp)

  Deprecated.
  Overrides:
    `setTimestamp` in class `ClassGenerationAction`

### setUsePkgPath

    public void setUsePkgPath(boolean usePkgPath)

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Sets `usepkgpath` property.

  Overrides:
    `setUsePkgPath` in class `ClassGenerationAction`

### validateAttributes

    protected void validateAttributes()

  Deprecated.
  Description copied from class: `ClassGenerationAction`
  Validates the state of this class generator. Throws CayenneRuntimeException if it is in an inconsistent state. Called internally from "execute".

  Overrides:
    `validateAttributes` in class `ClassGenerationAction`

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

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