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.proxy.ProxyGenerator
All Implemented Interfaces:
GeneratorComponent, VelocityGenerator

public class ProxyGenerator
extends AbstractVelocityGenerator

This class is used to generate the file proxy. This file will represent the persistent instance.

Author:
F. Dhumeaux

Inner Class Summary
 class ProxyGenerator.Const
           
 class ProxyGenerator.Field
           
 
Field Summary
static java.lang.String CID_BINDER_CLASS_NAME
           
static java.lang.String LOGGER_NAME
           
static java.lang.String PNAME_SINGLE_BINDER_CLASS_NAME
           
 java.lang.Class[][] PRIMITIVE_TYPES
           
static java.lang.String SPEEDO_ID_NAME
          is the name of the composite name used for the identifiers in case of container identifier management.
static java.lang.String TEMPLATE_NAME
           
 
Fields inherited from class org.objectweb.speedo.generation.generator.lib.AbstractVelocityGenerator
fs, TEMPLATE_DIR, templateFN, ve
 
Fields inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
logger, scp
 
Constructor Summary
ProxyGenerator()
           
 
Method Summary
 void generate(SpeedoClass sClass, java.lang.String fileName)
          This method generates the new file.
 org.objectweb.jorm.metainfo.api.NameDef getElemNameDef(org.objectweb.jorm.metainfo.api.GenClassRef gcr, org.objectweb.jorm.metainfo.api.Class clazz)
           
 org.objectweb.jorm.metainfo.api.NameDef getRefNameDef(org.objectweb.jorm.metainfo.api.ClassRef cr, org.objectweb.jorm.metainfo.api.Class clazz)
           
 org.objectweb.jorm.metainfo.api.NameDef getRefNameDef(org.objectweb.jorm.metainfo.api.GenClassRef gcr, org.objectweb.jorm.metainfo.api.Class clazz)
           
 void init()
           
 
Methods inherited from class org.objectweb.speedo.generation.generator.lib.AbstractVelocityGenerator
getExternalsTemplate, getVelocityEngine, isClassicalType, isContainerIdField, process, setVelocityEngine
 
Methods inherited from class org.objectweb.speedo.generation.lib.AbstractGeneratorComponent
getLogger, getSpeedoCompilerParameter, setSpeedoCompilerParameter
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.speedo.generation.api.GeneratorComponent
getSpeedoCompilerParameter, setSpeedoCompilerParameter
 

Field Detail

LOGGER_NAME

public static final java.lang.String LOGGER_NAME

TEMPLATE_NAME

public static final java.lang.String TEMPLATE_NAME

CID_BINDER_CLASS_NAME

public static final java.lang.String CID_BINDER_CLASS_NAME

PNAME_SINGLE_BINDER_CLASS_NAME

public static final java.lang.String PNAME_SINGLE_BINDER_CLASS_NAME

SPEEDO_ID_NAME

public static final java.lang.String SPEEDO_ID_NAME
is the name of the composite name used for the identifiers in case of container identifier management.

PRIMITIVE_TYPES

public final java.lang.Class[][] PRIMITIVE_TYPES
Constructor Detail

ProxyGenerator

public ProxyGenerator()
Method Detail

init

public void init()
          throws SpeedoException
Overrides:
init in class AbstractVelocityGenerator

generate

public void generate(SpeedoClass sClass,
                     java.lang.String fileName)
              throws SpeedoException
This method generates the new file.
Overrides:
generate in class AbstractVelocityGenerator
Parameters:
sClass - is the SpeedoClass
fileName - name of the new file.
Throws:
SpeedoGenerationException - if there is a problem during writing the new file.

getRefNameDef

public org.objectweb.jorm.metainfo.api.NameDef getRefNameDef(org.objectweb.jorm.metainfo.api.GenClassRef gcr,
                                                             org.objectweb.jorm.metainfo.api.Class clazz)
                                                      throws SpeedoException

getElemNameDef

public org.objectweb.jorm.metainfo.api.NameDef getElemNameDef(org.objectweb.jorm.metainfo.api.GenClassRef gcr,
                                                              org.objectweb.jorm.metainfo.api.Class clazz)
                                                       throws SpeedoException

getRefNameDef

public org.objectweb.jorm.metainfo.api.NameDef getRefNameDef(org.objectweb.jorm.metainfo.api.ClassRef cr,
                                                             org.objectweb.jorm.metainfo.api.Class clazz)
                                                      throws SpeedoException