org.objectweb.speedo.mapper.lib
Class DelegatePMapper

java.lang.Object
  extended byorg.objectweb.speedo.mapper.lib.DelegatePMapper
All Implemented Interfaces:
org.objectweb.jorm.api.PMapper, org.objectweb.jorm.api.PMappingStructuresManager

public class DelegatePMapper
extends java.lang.Object
implements org.objectweb.jorm.api.PMapper

This class is an implementation of the PMapper interface delegating all method to another PMapper, except for the lookup method. In this case the lookup method is done by the use of the JormFactory. The aim is to always have the PClassMapping instance. But only the JormFactory is able to build the PClassMapping instance of a Persistent class.

Author:
S.Chassande-Barrioz

Field Summary
 
Fields inherited from interface org.objectweb.jorm.api.PMapper
JORMPROPFILE, PBINDINGAPPENDER, PCLASSMAPPINGAPPENDER
 
Constructor Summary
DelegatePMapper(org.objectweb.jorm.api.PMapper mapper)
           
 
Method Summary
 void addDependency(java.lang.String s, java.lang.String s1)
           
 void addMapperEventListener(org.objectweb.jorm.api.PMapperListener pMapperListener)
           
 void classDefined(java.lang.String s)
           
 void closeConnection(java.lang.Object o)
           
 java.lang.String cn2mn(java.lang.String s)
           
 org.objectweb.jorm.api.PClassMapping createGenClassMapping()
           
 void declareClass(java.lang.String jcname)
           
 java.lang.ClassLoader getClassLoader()
           
 java.lang.Object getConnection()
           
 java.lang.Object getConnection(java.lang.Object o)
           
 java.lang.Object getConnection(java.lang.Object connectionContext, java.lang.Object user)
           
 java.lang.Object getConnectionFactory()
           
 JormFactory getJormFactory()
           
 java.lang.String[] getMappedClasses()
           
 org.objectweb.jorm.api.PMapper getMapper()
           
 java.lang.String getMapperName()
           
 org.objectweb.jorm.metainfo.api.Manager getMetaInfoManager()
           
 org.objectweb.jorm.api.PMapCluster getPMapCluster(java.lang.String s)
           
 java.util.Collection getPMapClusters()
           
 org.objectweb.jorm.api.PMappingStructuresManager getPMappingStructuresManager()
           
 org.objectweb.medor.eval.prefetch.api.PrefetchCache getPrefetchCache()
           
 org.objectweb.jorm.type.api.PTypeSpace getPTypeSpace()
           
 org.objectweb.jorm.api.PClassMapping lookup(java.lang.String s)
           
 void map(java.lang.Object o, org.objectweb.jorm.api.PClassMapping pClassMapping)
           
 void map(java.lang.Object o, org.objectweb.jorm.api.PClassMapping pClassMapping, boolean b)
           
 void map(org.objectweb.jorm.api.PClassMapping pClassMapping)
           
 void removeMapperEventListener(org.objectweb.jorm.api.PMapperListener pMapperListener)
           
 void setClassLoader(java.lang.ClassLoader classLoader)
           
 void setConnectionFactory(java.lang.Object o)
           
 void setJormFactory(JormFactory jf)
           
 void setLogger(org.objectweb.util.monolog.api.Logger l)
           
 void setMapper(org.objectweb.jorm.api.PMapper mapper)
           
 void setMapperName(java.lang.String s)
           
 void setPMapper(org.objectweb.jorm.api.PMapper pm)
           
 void setPrefetchCache(org.objectweb.medor.eval.prefetch.api.PrefetchCache prefetchCache)
           
 void start()
           
 void stop()
           
 void unmap(java.lang.String s)
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

DelegatePMapper

public DelegatePMapper(org.objectweb.jorm.api.PMapper mapper)
Method Detail

getJormFactory

public JormFactory getJormFactory()

setJormFactory

public void setJormFactory(JormFactory jf)

getMapper

public org.objectweb.jorm.api.PMapper getMapper()

setMapper

public void setMapper(org.objectweb.jorm.api.PMapper mapper)

getClassLoader

public java.lang.ClassLoader getClassLoader()

setClassLoader

public void setClassLoader(java.lang.ClassLoader classLoader)

lookup

public org.objectweb.jorm.api.PClassMapping lookup(java.lang.String s)
Specified by:
lookup in interface org.objectweb.jorm.api.PMapper

setPMapper

public void setPMapper(org.objectweb.jorm.api.PMapper pm)
Specified by:
setPMapper in interface org.objectweb.jorm.api.PMappingStructuresManager

setLogger

public void setLogger(org.objectweb.util.monolog.api.Logger l)
Specified by:
setLogger in interface org.objectweb.jorm.api.PMappingStructuresManager

setPrefetchCache

public void setPrefetchCache(org.objectweb.medor.eval.prefetch.api.PrefetchCache prefetchCache)
                      throws org.objectweb.jorm.api.PException
Specified by:
setPrefetchCache in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

getPrefetchCache

public org.objectweb.medor.eval.prefetch.api.PrefetchCache getPrefetchCache()
Specified by:
getPrefetchCache in interface org.objectweb.jorm.api.PMapper

closeConnection

public void closeConnection(java.lang.Object o)
                     throws org.objectweb.jorm.api.PException
Specified by:
closeConnection in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

cn2mn

public java.lang.String cn2mn(java.lang.String s)
Specified by:
cn2mn in interface org.objectweb.jorm.api.PMapper

getConnection

public java.lang.Object getConnection()
                               throws org.objectweb.jorm.api.PException
Specified by:
getConnection in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

getConnection

public java.lang.Object getConnection(java.lang.Object o)
                               throws org.objectweb.jorm.api.PException
Specified by:
getConnection in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

getConnection

public java.lang.Object getConnection(java.lang.Object connectionContext,
                                      java.lang.Object user)
                               throws org.objectweb.jorm.api.PException
Specified by:
getConnection in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

getMapperName

public java.lang.String getMapperName()
Specified by:
getMapperName in interface org.objectweb.jorm.api.PMapper

getPMappingStructuresManager

public org.objectweb.jorm.api.PMappingStructuresManager getPMappingStructuresManager()
Specified by:
getPMappingStructuresManager in interface org.objectweb.jorm.api.PMapper

map

public void map(org.objectweb.jorm.api.PClassMapping pClassMapping)
         throws org.objectweb.jorm.api.PException
Specified by:
map in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

map

public void map(java.lang.Object o,
                org.objectweb.jorm.api.PClassMapping pClassMapping)
         throws org.objectweb.jorm.api.PException
Specified by:
map in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

map

public void map(java.lang.Object o,
                org.objectweb.jorm.api.PClassMapping pClassMapping,
                boolean b)
         throws org.objectweb.jorm.api.PException
Specified by:
map in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

setConnectionFactory

public void setConnectionFactory(java.lang.Object o)
                          throws org.objectweb.jorm.api.PException
Specified by:
setConnectionFactory in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

getConnectionFactory

public java.lang.Object getConnectionFactory()
Specified by:
getConnectionFactory in interface org.objectweb.jorm.api.PMapper

setMapperName

public void setMapperName(java.lang.String s)
Specified by:
setMapperName in interface org.objectweb.jorm.api.PMapper

getMetaInfoManager

public org.objectweb.jorm.metainfo.api.Manager getMetaInfoManager()
Specified by:
getMetaInfoManager in interface org.objectweb.jorm.api.PMapper

getPTypeSpace

public org.objectweb.jorm.type.api.PTypeSpace getPTypeSpace()
Specified by:
getPTypeSpace in interface org.objectweb.jorm.api.PMapper

start

public void start()
           throws org.objectweb.jorm.api.PException
Specified by:
start in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

stop

public void stop()
          throws org.objectweb.jorm.api.PException
Specified by:
stop in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

unmap

public void unmap(java.lang.String s)
           throws org.objectweb.jorm.api.PException
Specified by:
unmap in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

addMapperEventListener

public void addMapperEventListener(org.objectweb.jorm.api.PMapperListener pMapperListener)
Specified by:
addMapperEventListener in interface org.objectweb.jorm.api.PMapper

removeMapperEventListener

public void removeMapperEventListener(org.objectweb.jorm.api.PMapperListener pMapperListener)
Specified by:
removeMapperEventListener in interface org.objectweb.jorm.api.PMapper

createGenClassMapping

public org.objectweb.jorm.api.PClassMapping createGenClassMapping()
                                                           throws org.objectweb.jorm.api.PException
Specified by:
createGenClassMapping in interface org.objectweb.jorm.api.PMapper
Throws:
org.objectweb.jorm.api.PException

getPMapCluster

public org.objectweb.jorm.api.PMapCluster getPMapCluster(java.lang.String s)
                                                  throws org.objectweb.jorm.api.PException
Specified by:
getPMapCluster in interface org.objectweb.jorm.api.PMappingStructuresManager
Throws:
org.objectweb.jorm.api.PException

getPMapClusters

public java.util.Collection getPMapClusters()
Specified by:
getPMapClusters in interface org.objectweb.jorm.api.PMappingStructuresManager

addDependency

public void addDependency(java.lang.String s,
                          java.lang.String s1)
                   throws org.objectweb.jorm.api.PException
Specified by:
addDependency in interface org.objectweb.jorm.api.PMappingStructuresManager
Throws:
org.objectweb.jorm.api.PException

classDefined

public void classDefined(java.lang.String s)
                  throws org.objectweb.jorm.api.PException
Specified by:
classDefined in interface org.objectweb.jorm.api.PMappingStructuresManager
Throws:
org.objectweb.jorm.api.PException

declareClass

public void declareClass(java.lang.String jcname)
Specified by:
declareClass in interface org.objectweb.jorm.api.PMappingStructuresManager

getMappedClasses

public java.lang.String[] getMappedClasses()
Specified by:
getMappedClasses in interface org.objectweb.jorm.api.PMapper