|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.apache.cayenne.gen.ClassGenerator
public class ClassGenerator
Class generation engine for ObjEntities based on Velocity templates . Instance of ClassGenerationInfo is available inside Velocity template under the key "classGen".
Field Summary | |
---|---|
protected ClassGenerationInfo |
classGenerationInfo
|
protected org.apache.velocity.Template |
classTemplate
|
protected org.apache.velocity.context.Context |
velCtxt
|
static String |
VERSION_1_1
|
static String |
VERSION_1_2
|
protected String |
versionString
|
Constructor Summary | |
---|---|
ClassGenerator(String template,
String versionString)
Creates a new ClassGenerationInfo that uses a specified Velocity template. |
|
ClassGenerator(String template,
String versionString,
foundrylogic.vpp.VPPConfig vppConfig)
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)
Generates Java code for the ObjEntity. |
void |
generateClass(Writer out,
ObjEntity entity)
Generates Java code for the ObjEntity. |
ClassGenerationInfo |
getClassGenerationInfo()
|
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Field Detail |
---|
public static final String VERSION_1_1
public static final String VERSION_1_2
protected String versionString
protected org.apache.velocity.Template classTemplate
protected org.apache.velocity.context.Context velCtxt
protected ClassGenerationInfo classGenerationInfo
Constructor Detail |
---|
public ClassGenerator(String template, String versionString) throws Exception
template
- to useversionString
- of cgen
Exception
public ClassGenerator(String template, String versionString, foundrylogic.vpp.VPPConfig vppConfig) throws Exception
template
- to useversionString
- of cgenvppConfig
- for configuring VelocityEngine and VelocityContext
Exception
Method Detail |
---|
public void generateClass(Writer out, ObjEntity entity) throws Exception
Exception
public void generateClass(Writer out, DataMap dataMap, ObjEntity entity, String fqnBaseClass, String fqnSuperClass, String fqnSubClass) throws Exception
Exception
public ClassGenerationInfo getClassGenerationInfo()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |