org.objectweb.jorm.generator.lib
Class CommonGenerator

java.lang.Object
  |
  +--org.objectweb.jorm.generator.lib.CommonGenerator
All Implemented Interfaces:
Loggable
Direct Known Subclasses:
AccessorGenerator, BinderGenerator, BindingGenerator, MappingGenerator, PNameGenerator, PNameGetterGenerator

public abstract class CommonGenerator
extends java.lang.Object
implements Loggable

This class contains the common elements for generating jorm objects (mapping, binding, accessors).


Field Summary
static java.lang.String GEN_TEMPLATE_DIR
           
protected  Logger logger
          The logger instance which logs the traces of the generator.
protected  LoggerFactory loggerFactory
          The logger factory instance which permits to fetch Logger instance.
static java.lang.String MAPPER_TEMPLATE_DIR
          The base directory where to find velocity template.
protected  VelocityEngine velocityEngine
           
 
Constructor Summary
CommonGenerator()
           
 
Method Summary
 Logger getLogger()
          Returns a logger to an component that wants to log things.
 LoggerFactory getLoggerFactory()
          Returns a logger factory that allows the creation of new loggers.
 java.lang.String[][] getTemplateLibraries()
           
 void setLogger(Logger l)
          Assigns a logger to an component that wants to log things.
 void setLoggerFactory(LoggerFactory lf)
          Assigns a logger factory that allows the creation of new loggers.
 void setVelocityEngine(VelocityEngine ve)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MAPPER_TEMPLATE_DIR

public static final java.lang.String MAPPER_TEMPLATE_DIR
The base directory where to find velocity template.

See Also:
Constant Field Values

GEN_TEMPLATE_DIR

public static final java.lang.String GEN_TEMPLATE_DIR
See Also:
Constant Field Values

logger

protected Logger logger
The logger instance which logs the traces of the generator.


loggerFactory

protected LoggerFactory loggerFactory
The logger factory instance which permits to fetch Logger instance.


velocityEngine

protected VelocityEngine velocityEngine
Constructor Detail

CommonGenerator

public CommonGenerator()
Method Detail

setLoggerFactory

public void setLoggerFactory(LoggerFactory lf)
Description copied from interface: Loggable
Assigns a logger factory that allows the creation of new loggers.

Specified by:
setLoggerFactory in interface Loggable
Parameters:
lf - the LoggerFactory object to obtain new loggers

setLogger

public void setLogger(Logger l)
Description copied from interface: Loggable
Assigns a logger to an component that wants to log things.

Specified by:
setLogger in interface Loggable
Parameters:
l - the logger object

getLogger

public Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.

Specified by:
getLogger in interface Loggable

getLoggerFactory

public LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.

Specified by:
getLoggerFactory in interface Loggable

setVelocityEngine

public void setVelocityEngine(VelocityEngine ve)

getTemplateLibraries

public java.lang.String[][] getTemplateLibraries()