org.objectweb.jorm.runtime
Class MapperJDBC

java.lang.Object
  |
  +--org.objectweb.jorm.runtime.Mapper
        |
        +--org.objectweb.jorm.runtime.MapperJDBC
All Implemented Interfaces:
Loggable, PMapper

public class MapperJDBC
extends Mapper

This mapper supports JDBC connection management.

Author:
P. D?chamboux

Fields inherited from interface org.objectweb.jorm.api.PMapper
PBINDINGAPPENDER, PCLASSMAPPINGAPPENDER
 
Constructor Summary
MapperJDBC()
           
 
Method Summary
 void closeConnection(java.lang.Object conn)
          Closes the given connection which has been allocated previously using getConnection.
 java.lang.Object getConnection()
          Allocates a connection for accessing the underlying relational DB.
 java.lang.Object getConnection(java.lang.Object ctxt)
          Allocates a connection for accessing the underlying relational DB.
 java.lang.Object getConnectionFactory()
          Returns the connection factory associated to this mapper.
 void setConnectionFactory(java.lang.Object cf)
          Assigns the information about the JDBC connection to be allocated through this mapper.
 
Methods inherited from class org.objectweb.jorm.runtime.Mapper
cn2mn, equals, getLogger, getLoggerFactory, getMapperName, getMappingName, getMetaInfoManager, getPTypeSpace, hashCode, lookup, map, map, map, setLogger, setLoggerFactory, setMapperName, setMappingName, setMetaInfoManager, setParser, setPTypeSpace, unmap
 
Methods inherited from class java.lang.Object
clone, finalize, getClass, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

MapperJDBC

public MapperJDBC()
Method Detail

closeConnection

public void closeConnection(java.lang.Object conn)
                     throws PException
Closes the given connection which has been allocated previously using getConnection.
Parameters:
conn - The concerned JDBC connection.

getConnection

public java.lang.Object getConnection()
                               throws PException
Allocates a connection for accessing the underlying relational DB.

getConnection

public java.lang.Object getConnection(java.lang.Object ctxt)
                               throws PException
Allocates a connection for accessing the underlying relational DB.
Parameters:
ctxt - The connection specification for the connection to be allocated.

setConnectionFactory

public void setConnectionFactory(java.lang.Object cf)
                          throws PException
Assigns the information about the JDBC connection to be allocated through this mapper.
Throws:
PExceptionProtocol - It is raised if a connection factory has already been assigned.

getConnectionFactory

public java.lang.Object getConnectionFactory()
Returns the connection factory associated to this mapper.