org.objectweb.jorm.mapper.rdb.generator
Class RdbMOPFactory

java.lang.Object
  extended byorg.objectweb.jorm.mapper.rdb.generator.RdbMOPFactory
All Implemented Interfaces:
Loggable, MOPFactory

public class RdbMOPFactory
extends java.lang.Object
implements MOPFactory, Loggable


Constructor Summary
RdbMOPFactory()
           
 
Method Summary
 MOP createBindingMOP(JormCompilerParameter cp, java.lang.String mappername)
          This method must return a new instance of a BindingMOP
 java.lang.Object createClassGenerationContext(Mapping mo)
          Creates a generation context that can be shared between binding and mapping generation for a particular class.
 MOP createMappingMOP(JormCompilerParameter cp, java.lang.String mappername)
          This method must return a new instance of a MappingMOP
 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.
 void setLogger(Logger logger)
          Assigns a logger to an component that wants to log things.
 void setLoggerFactory(LoggerFactory loggerfactory)
          Assigns a logger factory that allows the creation of new loggers.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RdbMOPFactory

public RdbMOPFactory()
Method Detail

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

setLogger

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

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

setLoggerFactory

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

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

createMappingMOP

public MOP createMappingMOP(JormCompilerParameter cp,
                            java.lang.String mappername)
                     throws PException
This method must return a new instance of a MappingMOP

Specified by:
createMappingMOP in interface MOPFactory
Throws:
PException

createBindingMOP

public MOP createBindingMOP(JormCompilerParameter cp,
                            java.lang.String mappername)
                     throws PException
This method must return a new instance of a BindingMOP

Specified by:
createBindingMOP in interface MOPFactory
Throws:
PException

createClassGenerationContext

public java.lang.Object createClassGenerationContext(Mapping mo)
                                              throws PException
Creates a generation context that can be shared between binding and mapping generation for a particular class. If the current class has a parent class and if a vertical mapping has been defined: the main table of the current class then references cm.getRdbTable() returns the main table of one of the parent classes (P class). rcm.getRdbAllExternalTables() : returns all the external tables defines for the current class and for all the parent classes up to the P class.

Specified by:
createClassGenerationContext in interface MOPFactory
Throws:
PException