org.objectweb.jorm.metainfo.lib
Class BasicValueMapping

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

public class BasicValueMapping
extends java.lang.Object
implements ValueMapping, Loggable

BasicValueMapping is the implementation of the ValueMapping interface which defines the mapping of ScalarField and PrimitiveField.

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
BasicValueMapping(java.lang.String mapperName, java.lang.String mappingName, MetaObject parent)
          Builds a new BasicValueMapping object to map fields.
 
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.
 java.lang.String getMappingName()
          Returns the name of the mapping.
 MetaObject getParent()
          Allows to know the parent MetaObject of the current MetaObject.
 void setLogger(org.objectweb.util.monolog.api.Logger logger)
          Defines a logger name and a list of aliases for a specific 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

BasicValueMapping

public BasicValueMapping(java.lang.String mapperName,
                         java.lang.String mappingName,
                         MetaObject parent)
Builds a new BasicValueMapping object to map fields.
Parameters:
mapperName - the name of the mapper
mappingName - the name of the mapping
parent - the parent meta-object of the current mapping
Method Detail

getMapperName

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

getMappingName

public java.lang.String getMappingName()
Returns the name of the mapping.
Specified by:
getMappingName in interface ValueMapping
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 name and a list of aliases for a specific 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