|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.objectweb.jorm.lib.Mapper
Field Summary | |
protected Logger |
logger
The logger associated with this mapper. |
protected LoggerFactory |
loggerFactory
The logger factory associated with this mapper. |
Fields inherited from interface org.objectweb.jorm.api.PMapper |
JORMPROPFILE, PBINDINGAPPENDER, PCLASSMAPPINGAPPENDER |
Constructor Summary | |
Mapper()
It builds a JormConfigurator with the default JormCompilerParameter and JormCompilerParameter. |
|
Mapper(JormConfigurator c)
|
Method Summary | |
void |
addDependency(java.lang.String jcname1,
java.lang.String jcname2)
Adds a dependency between a defined class and another class. |
void |
addMapperEventListener(PMapperListener listener)
Adds the given mapper listener to this mapper. |
void |
classDefined(java.lang.String jcname)
Indicates that a jorm class is defined. |
void |
clean()
Clean the mapper: forget all classes previously mapped. |
void |
clear()
Clean the mapping structure manager: forget all classes. |
java.lang.String |
cn2mn(java.lang.String cn)
Constructs a "mapped name" starting from a JORM class name. |
PClassMapping |
createGenClassMapping()
Creates a new PClassMapping for a gen class. |
void |
declareClass(java.lang.String jcname)
Declares a persistent class. |
boolean |
equals(java.lang.Object o)
|
JormConfigurator |
getJormConfigurator()
|
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[] |
getMappedClasses()
|
java.lang.String |
getMapperName()
The name yielded by this method defines what kind of PMapper is used on a particular DS. |
Manager |
getMetaInfoManager()
It retrieves a meta-information Manager that may used by a parser in order to load the meta-information associated to JORM classes mapped within this PMapper. |
PMapCluster |
getPMapCluster(java.lang.String jcname)
Asks for the map cluster associated with a JORM class. |
java.util.Collection |
getPMapClusters()
Asks for all the map clusters defined within this mapper. |
PMappingStructuresManager |
getPMappingStructuresManager()
Retrieves the PMappingStructuresManager associated with this mapper. |
PrefetchCache |
getPrefetchCache()
Returns the prefetch cache associated to this mapper. |
PTypeSpace |
getPTypeSpace()
It returns a PTypeSpace that may be used to create PType associated to JORM classes mapped within this PMapper. |
int |
hashCode()
|
PClassMapping |
lookup(java.lang.String classname)
It looks for the PClassMapping object associated to a JORM class within this PMapper. |
void |
map(java.lang.Object conn,
PClassMapping pcm)
It registers a PClassMapping associated to a particular JORM class within this PMapper. |
void |
map(java.lang.Object conn,
PClassMapping pcm,
boolean loadmeta)
It registers a PClassMapping associated to a particular JORM class within this PMapper. |
void |
map(PClassMapping pcm)
It registers a PClassMapping associated to a particular JORM class within this PMapper. |
void |
removeMapperEventListener(PMapperListener listener)
Removes the given mapper listener from this mapper. |
void |
scheduleEvent(java.util.EventObject e)
Schedules an mapper-related event. |
void |
setDTDLocations(java.util.ArrayList dtdlocs)
It assigns a set of locations where DTD files may be found in order to allow the mapper to parse ".pd" files for loading meta-information. |
void |
setJormConfigurator(JormConfigurator jormConfigurator)
|
void |
setLogger(Logger logger)
It assigns a logger to an component that wants to log things. |
void |
setLoggerFactory(LoggerFactory loggerfactory)
It assigns a logger factory that allows the creation of new loggers. |
void |
setMapperName(java.lang.String mappername)
It assigns the name of the mapper that is instanciated. |
void |
setPathsToPdFiles(PathExplorer paths)
It assigns a set of paths to locations where jorm descriptor files may be found. |
void |
setPMapper(PMapper pm)
Assigns a mapper to this schema manager. |
void |
setPrefetchCache(PrefetchCache pc)
Assigns a prefetch cache to this mapper. |
void |
start()
Starts this mapper. |
void |
stop()
Stops this mapper. |
void |
unmap(java.lang.String classname)
It unmaps a particular JORM class within this PMapper. |
Methods inherited from class java.lang.Object |
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait |
Methods inherited from interface org.objectweb.jorm.api.PMapper |
closeConnection, getConnection, getConnection, getConnection, getConnectionFactory, setConnectionFactory |
Field Detail |
protected Logger logger
protected LoggerFactory loggerFactory
Constructor Detail |
public Mapper() throws PException
public Mapper(JormConfigurator c)
Method Detail |
public void setJormConfigurator(JormConfigurator jormConfigurator)
public JormConfigurator getJormConfigurator()
public void scheduleEvent(java.util.EventObject e) throws PException
scheduleEvent
in interface PMappingCallback
e
- The event to be scheduled.
PException
- Cannot schedule this event.public java.lang.String getMapperName()
getMapperName
in interface PMapper
public PMappingStructuresManager getPMappingStructuresManager()
getPMappingStructuresManager
in interface PMapper
public PClassMapping lookup(java.lang.String classname)
lookup
in interface PMapper
public void map(PClassMapping pcm) throws PException
map
in interface PMapper
pcm
- The class mapping to add to this mapper.
PExceptionIO
- It is raised when an I/O problem occurs within
the underlying DS.
PExceptionProtocol
- It is raised when a problem occurs
during initialisation of the class
mapping.
PExceptionTyping
- It is raised when a typing problem occurs
during initialisation of the class mapping.
PException
public void map(java.lang.Object conn, PClassMapping pcm) throws PException
map
in interface PMapper
conn
- The connection to access to the underlying DS.pcm
- The class mapping to add to this mapper.
PExceptionIO
- It is raised when an I/O problem occurs within
the underlying DS.
PExceptionProtocol
- It is raised when a problem occurs
during initialisation of the class
mapping.
PExceptionTyping
- It is raised when a typing problem occurs
during initialisation of the class mapping.
PException
public void map(java.lang.Object conn, PClassMapping pcm, boolean loadmeta) throws PException
map
in interface PMapper
conn
- The connection to access to the underlying DS.pcm
- The class mapping to add to this mapper.loadmeta
- It specifies that meta-information should be loaded for
this class to map.
PExceptionIO
- It is raised when an I/O problem occurs within
the underlying DS.
PExceptionProtocol
- It is raised when a problem occurs
during initialisation of the class
mapping.
PExceptionTyping
- It is raised when a typing problem occurs
during initialisation of the class mapping.
PException
public void setMapperName(java.lang.String mappername)
setMapperName
in interface PMapper
mappername
- The name of the maping as defined within the XML
JORM definition files.public void setDTDLocations(java.util.ArrayList dtdlocs)
setDTDLocations
in interface PMapper
public void setPathsToPdFiles(PathExplorer paths)
setPathsToPdFiles
in interface PMapper
paths
- The potential location where to find ".pd" files in order
to allow the mapper to load meta-information if needed.public PClassMapping createGenClassMapping() throws PException
PMapper
createGenClassMapping
in interface PMapper
PException
public Manager getMetaInfoManager()
PMapper
getMetaInfoManager
in interface PMapper
public PTypeSpace getPTypeSpace()
getPTypeSpace
in interface PMapper
public void start() throws PException
start
in interface PMapper
PException
public void stop() throws PException
stop
in interface PMapper
PException
public void unmap(java.lang.String classname) throws PException
unmap
in interface PMapper
classname
- The name of the JORM class to be unmapped.
PException
public void setPrefetchCache(PrefetchCache pc) throws PException
setPrefetchCache
in interface PMapper
PExceptionProtocol
- It is raised if a prefetch cache
has already been assigned.
PException
public PrefetchCache getPrefetchCache()
getPrefetchCache
in interface PMapper
public void clean() throws PException
PMapper
clean
in interface PMapper
PException
public PMapCluster getPMapCluster(java.lang.String jcname) throws PException
getPMapCluster
in interface PMappingStructuresManager
jcname
- The JORM class name.
PException
- This class has not been mapped.public java.util.Collection getPMapClusters()
getPMapClusters
in interface PMappingStructuresManager
public void addDependency(java.lang.String jcname1, java.lang.String jcname2) throws PException
PMappingStructuresManager
addDependency
in interface PMappingStructuresManager
jcname1
- is the class name of a defined classjcname2
- is the name of the class which the first depends on it.
PException
public void declareClass(java.lang.String jcname)
PMappingStructuresManager
declareClass
in interface PMappingStructuresManager
jcname
- public void classDefined(java.lang.String jcname) throws PException
PMappingStructuresManager
classDefined
in interface PMappingStructuresManager
jcname
- which is defined.
PException
public void addMapperEventListener(PMapperListener listener)
addMapperEventListener
in interface PMapper
listener
- The corresponding listener.public void removeMapperEventListener(PMapperListener listener)
removeMapperEventListener
in interface PMapper
listener
- The corresponding listener.public java.lang.String[] getMappedClasses()
getMappedClasses
in interface PMapper
public void setPMapper(PMapper pm)
setPMapper
in interface PMappingStructuresManager
pm
- The concerned mapper.public void clear() throws PException
PMappingStructuresManager
clear
in interface PMappingStructuresManager
PException
public void setLogger(Logger logger)
setLogger
in interface PMappingStructuresManager
logger
- The logger object.public void setLoggerFactory(LoggerFactory loggerfactory)
setLoggerFactory
in interface Loggable
loggerfactory
- The LoggerFactory object to obtain new loggers.public Logger getLogger()
Loggable
getLogger
in interface Loggable
public LoggerFactory getLoggerFactory()
Loggable
getLoggerFactory
in interface Loggable
public java.lang.String cn2mn(java.lang.String cn)
PMapper
cn2mn
in interface PMapper
cn
- The JORM class name.public boolean equals(java.lang.Object o)
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |