org.objectweb.jorm.mapper.fos.generator
Class FosMappingMOP

java.lang.Object
  extended byTypeHelper
      extended byorg.objectweb.jorm.generator.lib.CommonHelper
          extended byorg.objectweb.jorm.mapper.fos.generator.FosMappingMOP
All Implemented Interfaces:
Loggable, MOP

public class FosMappingMOP
extends CommonHelper
implements MOP

Author:
P. Dechamboux
See Also:
Serialized Form

Field Summary
 
Fields inherited from class org.objectweb.jorm.generator.lib.CommonHelper
debug, logger, loggerFactory, PN_GET_TYPES
 
Constructor Summary
FosMappingMOP(Logger logger)
           
 
Method Summary
 java.lang.String getDirName(FosClassMapping m, java.lang.String cn)
           
 Logger getLogger()
          Its retrives the current logger.
 LoggerFactory getLoggerFactory()
          Its retrives the current logger factory.
 java.lang.String getSerObjectCast(PType type)
           
 java.lang.String getSerRead(PType type)
           
 java.lang.String getSerWrite(PType type)
           
 java.lang.String[] getTemplateLibraries()
           
 void initContext(Context ctx, Class clazz, java.lang.String projectName, java.lang.String mapperName)
          Initializes a velocity context
 void setLogger(Logger l)
          Its assigns a logger.
 void setLoggerFactory(LoggerFactory lf)
          Its assigns a logger factory.
 
Methods inherited from class org.objectweb.jorm.generator.lib.CommonHelper
buildPemList, canBeNullValue, comparePE, containsCharArrayField, containsCompositeName, containsFieldWhichCanBeNull, containsGenClassRef, containsReference, containsSerializedField, debug, getCNPackageName, getCoderName, getCompositeNameDefEntries, getCompositeReferences, getCTDeclaration, getFQNOfCompositeName, getInheritedClasses, getPaGetMethod, getPaSetMethod, getPemPos, getPNameDecodeFunction, getPNameEncodeFunction, getPNameGetterGetFunction, getPNGTypes, getPrimitiveElement, getPrimitiveElement, getProjectionField, getPType, getPTypeBigDecimal, getPTypeBigInteger, getPTypeBoolean, getPTypeByte, getPTypeByteArray, getPTypeChar, getPTypeCharArray, getPTypeDate, getPTypeDouble, getPTypeFloat, getPTypeInt, getPTypeLong, getPTypeOboolean, getPTypeObyte, getPTypeOchar, getPTypeOdouble, getPTypeOfloat, getPTypeOint, getPTypeOlong, getPTypeOshort, getPTypeReference, getPTypeSerialized, getPTypeShort, getPTypeSpaceFieldName, getPTypeString, getRefNameDef, getTupleDecoding, getTupleDecoding, getTupleGetter, isCharArrayType, isClass, isClassRef, isCompositeName, isFieldName, isGenClassRef, isHiddenField, isNull, isPrimitiveElement, isReference, isSerializedField, isSerializedType, isValidString, log, not, upperFL
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

FosMappingMOP

public FosMappingMOP(Logger logger)
Method Detail

initContext

public void initContext(Context ctx,
                        Class clazz,
                        java.lang.String projectName,
                        java.lang.String mapperName)
                 throws PException
Description copied from interface: MOP
Initializes a velocity context

Specified by:
initContext in interface MOP
Parameters:
ctx - is the context to initialize
Throws:
PException

getTemplateLibraries

public java.lang.String[] getTemplateLibraries()
Specified by:
getTemplateLibraries in interface MOP
Returns:
the list of .vm which contains velocity macros

getDirName

public java.lang.String getDirName(FosClassMapping m,
                                   java.lang.String cn)

getSerRead

public java.lang.String getSerRead(PType type)
                            throws java.lang.Exception
Throws:
java.lang.Exception

getSerWrite

public java.lang.String getSerWrite(PType type)
                             throws java.lang.Exception
Throws:
java.lang.Exception

getSerObjectCast

public java.lang.String getSerObjectCast(PType type)

getLogger

public Logger getLogger()
Description copied from class: CommonHelper
Its retrives the current logger.

Specified by:
getLogger in interface Loggable
Overrides:
getLogger in class CommonHelper

getLoggerFactory

public LoggerFactory getLoggerFactory()
Description copied from class: CommonHelper
Its retrives the current logger factory.

Specified by:
getLoggerFactory in interface Loggable
Overrides:
getLoggerFactory in class CommonHelper

setLogger

public void setLogger(Logger l)
Description copied from class: CommonHelper
Its assigns a logger.

Specified by:
setLogger in interface Loggable
Overrides:
setLogger in class CommonHelper

setLoggerFactory

public void setLoggerFactory(LoggerFactory lf)
Description copied from class: CommonHelper
Its assigns a logger factory.

Specified by:
setLoggerFactory in interface Loggable
Overrides:
setLoggerFactory in class CommonHelper