org.apache.cayenne.gen
Class ClassGenerator

java.lang.Object
  extended by org.apache.cayenne.gen.ClassGenerator

Deprecated. since 3.0 template logic is merged into the code generation action.

public class ClassGenerator
extends Object

Class generation engine for ObjEntities based on Velocity templates . Instance of ClassGenerationInfo is available inside Velocity template under the key "classGen".

Author:
Andrus Adamchik

Field Summary
protected  ClassGenerationInfo classGenerationInfo
          Deprecated.  
protected  org.apache.velocity.Template classTemplate
          Deprecated.  
protected  org.apache.velocity.context.Context velCtxt
          Deprecated.  
static String VERSION_1_1
          Deprecated.  
static String VERSION_1_2
          Deprecated.  
protected  String versionString
          Deprecated.  
 
Constructor Summary
ClassGenerator(String template, String versionString)
          Deprecated. Creates a new ClassGenerationInfo that uses a specified Velocity template.
ClassGenerator(String template, String versionString, foundrylogic.vpp.VPPConfig vppConfig)
          Deprecated. Creates a new ClassGenerationInfo that uses a specified Velocity template.
 
Method Summary
 void generateClass(Writer out, DataMap dataMap, ObjEntity entity, String fqnBaseClass, String fqnSuperClass, String fqnSubClass)
          Deprecated. Generates Java code for the ObjEntity.
 void generateClass(Writer out, ObjEntity entity)
          Deprecated. Generates Java code for the ObjEntity.
 ClassGenerationInfo getClassGenerationInfo()
          Deprecated.  
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

VERSION_1_1

public static final String VERSION_1_1
Deprecated. 
See Also:
Constant Field Values

VERSION_1_2

public static final String VERSION_1_2
Deprecated. 
See Also:
Constant Field Values

versionString

protected String versionString
Deprecated. 

classTemplate

protected org.apache.velocity.Template classTemplate
Deprecated. 

velCtxt

protected org.apache.velocity.context.Context velCtxt
Deprecated. 

classGenerationInfo

protected ClassGenerationInfo classGenerationInfo
Deprecated. 
Constructor Detail

ClassGenerator

public ClassGenerator(String template,
                      String versionString)
               throws Exception
Deprecated. 
Creates a new ClassGenerationInfo that uses a specified Velocity template.

Parameters:
template - to use
versionString - of cgen
Throws:
Exception
Since:
1.2

ClassGenerator

public ClassGenerator(String template,
                      String versionString,
                      foundrylogic.vpp.VPPConfig vppConfig)
               throws Exception
Deprecated. 
Creates a new ClassGenerationInfo that uses a specified Velocity template.

Parameters:
template - to use
versionString - of cgen
vppConfig - for configuring VelocityEngine and VelocityContext
Throws:
Exception
Since:
1.2
Method Detail

generateClass

public void generateClass(Writer out,
                          ObjEntity entity)
                   throws Exception
Deprecated. 
Generates Java code for the ObjEntity. Output is written to the provided Writer.

Throws:
Exception

generateClass

public void generateClass(Writer out,
                          DataMap dataMap,
                          ObjEntity entity,
                          String fqnBaseClass,
                          String fqnSuperClass,
                          String fqnSubClass)
                   throws Exception
Deprecated. 
Generates Java code for the ObjEntity. Output is written to the provided Writer.

Throws:
Exception

getClassGenerationInfo

public ClassGenerationInfo getClassGenerationInfo()
Deprecated. 
Returns:
Returns the classGenerationInfo in template.


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