|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | 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 |
PBINDINGAPPENDER
|
static java.lang.String |
PCLASSMAPPINGAPPENDER
|
| Method Summary | |
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. |
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 |
getConnectionFactory()
Returns the connection factory associated to this mapper. |
java.lang.String |
getMapperName()
The name yielded by this method defines what kind of PMapper is used on a particular DS. |
java.lang.String |
getMappingName()
It retrieves the name of the mapping that is instanciated through this mapper. |
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. |
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,
byte cleanup)
It registers a PClassMapping associated to a particular JORM class within this PMapper. |
void |
map(java.lang.Object conn,
PClassMapping pcm,
byte cleanup,
boolean loadmeta)
It registers a PClassMapping associated to a particular JORM class within this PMapper. |
void |
map(PClassMapping pcm,
byte cleanup)
It registers a PClassMapping associated to a particular JORM class within this PMapper. |
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 |
setMappingName(java.lang.String mappingname)
It assigns the name of the mapping that is instanciated. |
void |
setMetaInfoManager(Manager m)
It assigns 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. |
void |
setParser(Parser p)
It assigns a Parser that may be used to create the meta-information associated to JORM classes mapped within this PMapper. |
void |
setPTypeSpace(PTypeSpace pts)
It assigns a PTypeSpace that may be used to create PType associated to JORM classes mapped within this PMapper. |
void |
unmap(java.lang.String classname)
It unmaps a particular JORM class within this PMapper. |
| Field Detail |
public static final java.lang.String PCLASSMAPPINGAPPENDER
public static final java.lang.String PBINDINGAPPENDER
| Method Detail |
public void closeConnection(java.lang.Object conn)
throws PException
conn - The concerned connection.public java.lang.String cn2mn(java.lang.String cn)
cn - The JORM class name.
public java.lang.Object getConnection()
throws PException
public java.lang.Object getConnection(java.lang.Object ctxt)
throws PException
ctxt - Context information used to allocate the connection.public java.lang.String getMapperName()
public java.lang.String getMappingName()
public PClassMapping lookup(java.lang.String classname)
public void map(PClassMapping pcm,
byte cleanup)
throws PException
pcm - The class mapping to add to this mapper.cleanup - Tells if structures and/or data should be removed at
initialization time.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.
public void map(java.lang.Object conn,
PClassMapping pcm,
byte cleanup)
throws PException
conn - The connection to access to the underlying DS.pcm - The class mapping to add to this mapper.cleanup - Tells if structures and/or data should be removed at
initialization time.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.
public void map(java.lang.Object conn,
PClassMapping pcm,
byte cleanup,
boolean loadmeta)
throws PException
conn - The connection to access to the underlying DS.pcm - The class mapping to add to this mapper.cleanup - Tells if structures and/or data should be removed at
initialization time.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.
public void setConnectionFactory(java.lang.Object cf)
throws PException
PExceptionProtocol - It is raised if a connection factory
has already been assigned.public java.lang.Object getConnectionFactory()
public void setMapperName(java.lang.String mappername)
mappingname - The name of the maping as defined within the XML
JORM definition files.public void setMappingName(java.lang.String mappingname)
mappingname - The name of the maping as defined within the XML
JORM definition files.public Manager getMetaInfoManager()
public void setMetaInfoManager(Manager m)
m - The meta-information Manager to be assigned.public void setParser(Parser p)
p - The Parser to be assigned.public void setPTypeSpace(PTypeSpace pts)
pts - The PTypeSpace to be assigned.public PTypeSpace getPTypeSpace()
public void unmap(java.lang.String classname)
throws PException
classname - The name of the JORM class to be unmapped.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: INNER | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||