org.objectweb.jorm.metainfo.lib
Class BasicMapping

java.lang.Object
  |
  +--org.objectweb.jorm.metainfo.lib.BasicMetaObject
        |
        +--org.objectweb.jorm.metainfo.lib.BasicMapping
All Implemented Interfaces:
Loggable, Mapping, MetaObject, java.io.Serializable
Direct Known Subclasses:
BasicMemMapping, FosMapping, RdbMapping

public class BasicMapping
extends BasicMetaObject
implements Mapping, Loggable

Implementation of the mapping interface.

See Also:
Serialized Form

Field Summary
 Logger logger
          A simple logger to log
 
Constructor Summary
BasicMapping(java.lang.String mapperName, MetaObject parent)
          Builds a new BasicMapping object.
 
Method Summary
 void addGenClassMapping(java.lang.String genClassId, GenClassMapping genClassMapping)
          Adds a GenClassMapping object.
 ClassMapping getClassMapping()
          Returns the mapping structure of the class.
 GenClassMapping getGenClassMapping(java.lang.String genClassId)
          Returns the GenClassMapping object of a GenClass.
 java.util.Collection getGenClassMappings()
          Returns a collection of GenClassMapping objects.
 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 getMapperName()
          Returns the name of the mapper.
 void setClassMapping(ClassMapping classMapping)
          Sets the mapping structure of the class.
 void setLogger(Logger logger)
          Defines a logger object.
 void setLoggerFactory(LoggerFactory loggerFactory)
          Defines the logger factory to obtain new logger.
 void setMapperName(java.lang.String mapperName)
          Sets the mapper name.
 
Methods inherited from class org.objectweb.jorm.metainfo.lib.BasicMetaObject
getManager, getParent, setParent
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 
Methods inherited from interface org.objectweb.jorm.metainfo.api.MetaObject
getParent, setParent
 

Field Detail

logger

public transient Logger logger
A simple logger to log

Constructor Detail

BasicMapping

public BasicMapping(java.lang.String mapperName,
                    MetaObject parent)
Builds a new BasicMapping object. This object contains the mapping structures of a class. The parent object is a Project object.

Parameters:
mapperName - the mapper name, parent the parent of the current object.
Method Detail

getMapperName

public java.lang.String getMapperName()
Returns the name of the mapper.

Specified by:
getMapperName in interface Mapping
Returns:
the mapper name.

setMapperName

public void setMapperName(java.lang.String mapperName)
Sets the mapper name.

Specified by:
setMapperName in interface Mapping
Parameters:
mapperName - the mapper name.

getClassMapping

public ClassMapping getClassMapping()
Returns the mapping structure of the class.

Specified by:
getClassMapping in interface Mapping
Returns:
a ClassMapping object.

setClassMapping

public void setClassMapping(ClassMapping classMapping)
Sets the mapping structure of the class.

Specified by:
setClassMapping in interface Mapping
Parameters:
classMapping - a ClassMapping object.

getGenClassMapping

public GenClassMapping getGenClassMapping(java.lang.String genClassId)
Returns the GenClassMapping object of a GenClass.

Specified by:
getGenClassMapping in interface Mapping
Parameters:
genClassId - a GenClass identifier.
Returns:
a GenClassMapping object.

getGenClassMappings

public java.util.Collection getGenClassMappings()
Returns a collection of GenClassMapping objects.

Specified by:
getGenClassMappings in interface Mapping
Returns:
a collection.

addGenClassMapping

public void addGenClassMapping(java.lang.String genClassId,
                               GenClassMapping genClassMapping)
Adds a GenClassMapping object.

Specified by:
addGenClassMapping in interface Mapping
Parameters:
genClassId - a GenClass identifier, genClassMapping a GenClassMapping object.

setLogger

public void setLogger(Logger logger)
Defines a logger object.

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

setLoggerFactory

public void setLoggerFactory(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 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