org.objectweb.jorm.metainfo.lib
Class BasicClassMapping

java.lang.Object
  |
  +--org.objectweb.jorm.metainfo.lib.BasicClassMapping
All Implemented Interfaces:
ClassMapping, Loggable, MetaObject, java.io.Serializable
Direct Known Subclasses:
BasicRDBClassMapping, BasicRDBClassMapping

public class BasicClassMapping
extends java.lang.Object
implements ClassMapping, Loggable

BasicClassMapping is THE basic implementation of the ClassMapping interface. * Its defines basic methods, and must be extended to different mappers.

Author:
X. Spengler
See Also:
Serialized Form

Field Summary
 org.objectweb.util.monolog.api.Logger logger
          a simple logger to log
 MetaObject parent
          the parent object of the current object
 
Constructor Summary
BasicClassMapping(java.lang.String mapperName, java.lang.String mappingName, MetaObject parent)
          Builds a new BasicClassMapping.
 
Method Summary
 org.objectweb.util.monolog.api.Logger getLogger()
          Returns a logger to an component that wants to log things.
 org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
          Returns a logger factory that allows the creation of new loggers.
 java.lang.String getMapperName()
          Returns the complete name of the mapper used by the current class
 java.lang.String getMappingName()
          Returns the name of the mapping used by the current class.
 MetaObject getParent()
          Allows to know the parent MetaObject of the current MetaObject.
 void setLogger(org.objectweb.util.monolog.api.Logger logger)
          Defines a logger object.
 void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerFactory)
          Defines the logger factory to obtain new logger.
 void setParent(MetaObject itsParent)
          Set the parent of the current meta object if it is not yet done by the constructor of the meta object
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

parent

public MetaObject parent
the parent object of the current object

logger

public transient org.objectweb.util.monolog.api.Logger logger
a simple logger to log
Constructor Detail

BasicClassMapping

public BasicClassMapping(java.lang.String mapperName,
                         java.lang.String mappingName,
                         MetaObject parent)
Builds a new BasicClassMapping. This object is defined by the name of the mapper, the name of the mapping and its parent.
Parameters:
mapperName - the name of the mapper
mappingName - the name of the class mapping class
parent - the parent of the current object
Method Detail

getMapperName

public java.lang.String getMapperName()
Returns the complete name of the mapper used by the current class
Specified by:
getMapperName in interface ClassMapping
Returns:
the string representation of the mapper name

getMappingName

public java.lang.String getMappingName()
Returns the name of the mapping used by the current class.
Specified by:
getMappingName in interface ClassMapping
Returns:
the string representation of the mapping name

getParent

public MetaObject getParent()
Allows to know the parent MetaObject of the current MetaObject.
Specified by:
getParent in interface MetaObject
Returns:
the MetaObject corresponding to the parent of the current object. If there is no parent, null is returned.

setParent

public void setParent(MetaObject itsParent)
Set the parent of the current meta object if it is not yet done by the constructor of the meta object
Specified by:
setParent in interface MetaObject
Parameters:
itsParent - the parent MetaObject of the current object

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger logger)
Defines a logger object.
Specified by:
setLogger in interface Loggable
Parameters:
logger - the logger object

setLoggerFactory

public void setLoggerFactory(org.objectweb.util.monolog.api.LoggerFactory loggerFactory)
Defines the logger factory to obtain new logger.
Specified by:
setLoggerFactory in interface Loggable
Parameters:
loggerFactory - the LoggerFactory object to obtain a logger object

getLogger

public org.objectweb.util.monolog.api.Logger getLogger()
Description copied from interface: Loggable
Returns a logger to an component that wants to log things.
Specified by:
getLogger in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
logger - the logger object

getLoggerFactory

public org.objectweb.util.monolog.api.LoggerFactory getLoggerFactory()
Description copied from interface: Loggable
Returns a logger factory that allows the creation of new loggers.
Specified by:
getLoggerFactory in interface Loggable
Following copied from interface: org.objectweb.jorm.util.api.Loggable
Parameters:
loggerfactory - the LoggerFactory object to obtain new loggers