org.objectweb.speedo.mapper.lib
Class DelegatePMapper
java.lang.Object
org.objectweb.speedo.mapper.lib.DelegatePMapper
- All Implemented Interfaces:
- PMapper, PMappingStructuresManager
- public class DelegatePMapper
- extends java.lang.Object
- implements 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
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
DelegatePMapper
public DelegatePMapper(PMapper mapper)
getJormFactory
public JormFactory getJormFactory()
setJormFactory
public void setJormFactory(JormFactory jf)
getMapper
public PMapper getMapper()
setMapper
public void setMapper(PMapper mapper)
getClassLoader
public java.lang.ClassLoader getClassLoader()
setClassLoader
public void setClassLoader(java.lang.ClassLoader classLoader)
lookup
public PClassMapping lookup(java.lang.String s)
- Specified by:
lookup
in interface PMapper
setPMapper
public void setPMapper(PMapper pm)
- Specified by:
setPMapper
in interface PMappingStructuresManager
setLogger
public void setLogger(Logger l)
- Specified by:
setLogger
in interface PMappingStructuresManager
setPrefetchCache
public void setPrefetchCache(PrefetchCache prefetchCache)
throws PException
- Specified by:
setPrefetchCache
in interface PMapper
- Throws:
PException
getPrefetchCache
public PrefetchCache getPrefetchCache()
- Specified by:
getPrefetchCache
in interface PMapper
closeConnection
public void closeConnection(java.lang.Object o)
throws PException
- Specified by:
closeConnection
in interface PMapper
- Throws:
PException
cn2mn
public java.lang.String cn2mn(java.lang.String s)
- Specified by:
cn2mn
in interface PMapper
getConnection
public java.lang.Object getConnection()
throws PException
- Specified by:
getConnection
in interface PMapper
- Throws:
PException
getConnection
public java.lang.Object getConnection(java.lang.Object o)
throws PException
- Specified by:
getConnection
in interface PMapper
- Throws:
PException
getConnection
public java.lang.Object getConnection(java.lang.Object connectionContext,
java.lang.Object user)
throws PException
- Specified by:
getConnection
in interface PMapper
- Throws:
PException
getMapperName
public java.lang.String getMapperName()
- Specified by:
getMapperName
in interface PMapper
getPMappingStructuresManager
public PMappingStructuresManager getPMappingStructuresManager()
- Specified by:
getPMappingStructuresManager
in interface PMapper
map
public void map(PClassMapping pClassMapping)
throws PException
- Specified by:
map
in interface PMapper
- Throws:
PException
map
public void map(java.lang.Object o,
PClassMapping pClassMapping)
throws PException
- Specified by:
map
in interface PMapper
- Throws:
PException
map
public void map(java.lang.Object o,
PClassMapping pClassMapping,
boolean b)
throws PException
- Specified by:
map
in interface PMapper
- Throws:
PException
setConnectionFactory
public void setConnectionFactory(java.lang.Object o)
throws PException
- Specified by:
setConnectionFactory
in interface PMapper
- Throws:
PException
getConnectionFactory
public java.lang.Object getConnectionFactory()
- Specified by:
getConnectionFactory
in interface PMapper
setMapperName
public void setMapperName(java.lang.String s)
- Specified by:
setMapperName
in interface PMapper
getMetaInfoManager
public Manager getMetaInfoManager()
- Specified by:
getMetaInfoManager
in interface PMapper
getPTypeSpace
public PTypeSpace getPTypeSpace()
- Specified by:
getPTypeSpace
in interface PMapper
start
public void start()
throws PException
- Specified by:
start
in interface PMapper
- Throws:
PException
stop
public void stop()
throws PException
- Specified by:
stop
in interface PMapper
- Throws:
PException
unmap
public void unmap(java.lang.String s)
throws PException
- Specified by:
unmap
in interface PMapper
- Throws:
PException
addMapperEventListener
public void addMapperEventListener(PMapperListener pMapperListener)
- Specified by:
addMapperEventListener
in interface PMapper
removeMapperEventListener
public void removeMapperEventListener(PMapperListener pMapperListener)
- Specified by:
removeMapperEventListener
in interface PMapper
createGenClassMapping
public PClassMapping createGenClassMapping()
throws PException
- Specified by:
createGenClassMapping
in interface PMapper
- Throws:
PException
getPMapCluster
public PMapCluster getPMapCluster(java.lang.String s)
throws PException
- Specified by:
getPMapCluster
in interface PMappingStructuresManager
- Throws:
PException
getPMapClusters
public java.util.Collection getPMapClusters()
- Specified by:
getPMapClusters
in interface PMappingStructuresManager
addDependency
public void addDependency(java.lang.String s,
java.lang.String s1)
throws PException
- Specified by:
addDependency
in interface PMappingStructuresManager
- Throws:
PException
classDefined
public void classDefined(java.lang.String s)
throws PException
- Specified by:
classDefined
in interface PMappingStructuresManager
- Throws:
PException
declareClass
public void declareClass(java.lang.String jcname)
- Specified by:
declareClass
in interface PMappingStructuresManager
getMappedClasses
public java.lang.String[] getMappedClasses()
- Specified by:
getMappedClasses
in interface PMapper