|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--org.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 JormCompiler with the default JormCompilerParameter and JormCompilerParameter. |
|
Mapper(JormConfigurator c)
It builds a JormCompiler with the specified JormCompilerParameter instance. |
|
| 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. |
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. |
boolean |
equals(java.lang.Object o)
|
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()
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 |
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 |
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, 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 void scheduleEvent(java.util.EventObject e)
throws PException
scheduleEvent in interface PMappingCallbacke - The event to be scheduled.
PException - Cannot schedule this event.public java.lang.String getMapperName()
getMapperName in interface PMapperpublic PMappingStructuresManager getPMappingStructuresManager()
getPMappingStructuresManager in interface PMapperpublic PClassMapping lookup(java.lang.String classname)
lookup in interface PMapper
public void map(PClassMapping pcm)
throws PException
map in interface PMapperpcm - 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 PMapperconn - 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 PMapperconn - 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.
PExceptionpublic void setMapperName(java.lang.String mappername)
setMapperName in interface PMappermappername - The name of the maping as defined within the XML
JORM definition files.public PClassMapping createGenClassMapping()
PMapper
createGenClassMapping in interface PMapperpublic Manager getMetaInfoManager()
PMapper
getMetaInfoManager in interface PMapperpublic PTypeSpace getPTypeSpace()
getPTypeSpace in interface PMapper
public void start()
throws PException
start in interface PMapperPException
public void stop()
throws PException
stop in interface PMapperPException
public void unmap(java.lang.String classname)
throws PException
unmap in interface PMapperclassname - The name of the JORM class to be unmapped.
PException
public void setPrefetchCache(PrefetchCache pc)
throws PException
setPrefetchCache in interface PMapperPExceptionProtocol - It is raised if a prefetch cache
has already been assigned.
PExceptionpublic PrefetchCache getPrefetchCache()
getPrefetchCache in interface PMapper
public PMapCluster getPMapCluster(java.lang.String jcname)
throws PException
getPMapCluster in interface PMappingStructuresManagerjcname - 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 PMappingStructuresManagerjcname1 - is the class name of a defined classjcname2 - is the name of the class which the first depends on it.
PException - if the first jorm class name is not defined (no
cluster found)
public void classDefined(java.lang.String jcname)
throws PException
PMappingStructuresManager
classDefined in interface PMappingStructuresManagerjcname - which is defined.
PExceptionpublic void addMapperEventListener(PMapperListener listener)
addMapperEventListener in interface PMapperlistener - The corresponding listener.public void removeMapperEventListener(PMapperListener listener)
removeMapperEventListener in interface PMapperlistener - The corresponding listener.public void setPMapper(PMapper pm)
setPMapper in interface PMappingStructuresManagerpm - The concerned mapper.public void setLogger(Logger logger)
setLogger in interface PMappingStructuresManagerlogger - The logger object.public void setLoggerFactory(LoggerFactory loggerfactory)
setLoggerFactory in interface Loggableloggerfactory - The LoggerFactory object to obtain new loggers.public Logger getLogger()
Loggable
getLogger in interface Loggablepublic LoggerFactory getLoggerFactory()
Loggable
getLoggerFactory in interface Loggablepublic java.lang.String cn2mn(java.lang.String cn)
PMapper
cn2mn in interface PMappercn - The JORM class name.public boolean equals(java.lang.Object o)
equals in class java.lang.Objectpublic int hashCode()
hashCode in class java.lang.Object
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||