|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
The PMapper interface defines a JORM mapper as an object that mainly maintains the set of JORM classes that it maps on a particular DS. It relies on JCA as a means to access a DS. It enables to access to the meta-information associated to JORM classes at runtime. Before being able to request the load of meta-information at mapping time, the mapper should have been assigned a mapping name, a meta-information manager, as well as a parser.
Field Summary | |
static java.lang.String |
JORMPROPFILE
|
static java.lang.String |
PBINDINGAPPENDER
|
static java.lang.String |
PCLASSMAPPINGAPPENDER
|
Method Summary | |
void |
addMapperEventListener(PMapperListener listener)
Adds the given mapper listener to this mapper. |
void |
closeConnection(java.lang.Object conn)
Closes the given connection which has been allocated previously using getConnection. |
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. |
java.lang.Object |
getConnection()
Allocates a connection for accessing the underlying DS. |
java.lang.Object |
getConnection(java.lang.Object ctxt)
Allocates a connection for accessing the underlying DS knowing additional context information. |
java.lang.Object |
getConnection(java.lang.Object connectionContext,
java.lang.Object user)
Allocates a connection for accessing the underlying DS knowing additional context information. |
java.lang.Object |
getConnectionFactory()
Returns the connection factory associated to this mapper. |
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. |
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. |
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 |
setConnectionFactory(java.lang.Object cf)
Assigns a connection factory to this mapper. |
void |
setMapperName(java.lang.String mappername)
It assigns the name of the mapper that is instanciated. |
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 interface org.objectweb.jorm.api.PMappingStructuresManager |
addDependency, classDefined, declareClass, getPMapCluster, getPMapClusters, setLogger, setPMapper |
Field Detail |
public static final java.lang.String PCLASSMAPPINGAPPENDER
public static final java.lang.String PBINDINGAPPENDER
public static final java.lang.String JORMPROPFILE
Method Detail |
public void closeConnection(java.lang.Object conn) throws PException
conn
- The concerned connection.
PException
public java.lang.String cn2mn(java.lang.String cn)
cn
- The JORM class name.public java.lang.Object getConnection() throws PException
PException
public java.lang.Object getConnection(java.lang.Object ctxt) throws PException
ctxt
- Context information used to allocate the connection.
PException
public java.lang.Object getConnection(java.lang.Object connectionContext, java.lang.Object user) throws PException
connectionContext
- Context information used to allocate the connection.user
- is the identifier of the connection user (working set
or transaction id).
PException
public java.lang.String getMapperName()
public PMappingStructuresManager getPMappingStructuresManager()
public PClassMapping lookup(java.lang.String classname)
public void map(PClassMapping pcm) throws PException
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
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
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 setConnectionFactory(java.lang.Object cf) throws PException
PExceptionProtocol
- It is raised if a connection factory
has already been assigned.
PException
public java.lang.Object getConnectionFactory()
public void setPrefetchCache(PrefetchCache pc) throws PException
PExceptionProtocol
- It is raised if a prefetch cache
has already been assigned.
PException
public PrefetchCache getPrefetchCache()
public void setMapperName(java.lang.String mappername)
mappername
- The name of the mapper.public Manager getMetaInfoManager()
public PTypeSpace getPTypeSpace()
public void start() throws PException
PException
public void stop() throws PException
PException
public void unmap(java.lang.String classname) throws PException
classname
- The name of the JORM class to be unmapped.
PException
public void addMapperEventListener(PMapperListener listener)
listener
- The corresponding listener.public void removeMapperEventListener(PMapperListener listener)
listener
- The corresponding listener.public PClassMapping createGenClassMapping() throws PException
PException
public java.lang.String[] getMappedClasses()
|
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |