org.objectweb.speedo.generation.generator.proxy
Class ProxyGenerator
java.lang.Object
org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
org.objectweb.speedo.generation.generator.lib.AbstractVelocityGenerator
org.objectweb.speedo.generation.generator.lib.SpeedoGenerator
org.objectweb.speedo.generation.generator.proxy.ProxyGenerator
- All Implemented Interfaces:
- GeneratorComponent, SupportedGenClass, VelocityGenerator
- public class ProxyGenerator
- extends SpeedoGenerator
This class is used to generate the file proxy.
This file will represent the persistent instance.
- Author:
- S. Chassande-Barrioz
Method Summary |
void |
generate(SpeedoClass sClass,
java.lang.String fileName)
This method generates the new file. |
protected org.apache.velocity.context.Context |
getContext(SpeedoClass jdoClass)
This method initialises the Velocity context. |
boolean |
init()
|
Methods inherited from class org.objectweb.speedo.generation.generator.lib.SpeedoGenerator |
computeUserCaches, computeUserCaches, fillFetchGroupInfo, fillFieldInfo, fillFieldInfo4FetchGroup, fillReferenceInfo, fillRelationInfo, fillUserFieldMappingInfo, getClassNameDef, getCollectionClass, getJavaLangType, getMapping, getPNameGetter, getValueGetter |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
LOGGER_NAME
public static final java.lang.String LOGGER_NAME
- See Also:
- Constant Field Values
TEMPLATE_NAME
public static final java.lang.String TEMPLATE_NAME
- See Also:
- Constant Field Values
ProxyGenerator
public ProxyGenerator()
init
public boolean init()
throws SpeedoException
- Specified by:
init
in interface GeneratorComponent
- Specified by:
init
in class AbstractVelocityGenerator
- Throws:
SpeedoException
generate
public void generate(SpeedoClass sClass,
java.lang.String fileName)
throws SpeedoException
- This method generates the new file.
- Specified by:
generate
in interface VelocityGenerator
- Specified by:
generate
in class AbstractVelocityGenerator
- Parameters:
sClass
- is the SpeedoClassfileName
- name of the new file.
- Throws:
SpeedoGenerationException
- if there is a problem during writing
the new file.
SpeedoException
getContext
protected org.apache.velocity.context.Context getContext(SpeedoClass jdoClass)
throws SpeedoException
- This method initialises the Velocity context.
- Overrides:
getContext
in class SpeedoGenerator
- Parameters:
jdoClass
- : the jdoClass which represents the class to generate.
- Returns:
- a Velocity context.
- Throws:
SpeedoException