org.objectweb.jorm.mapper.rdb.adapter

Class RdbAdapterFactory


public class RdbAdapterFactory
extends java.lang.Object

This factory permits to create new instances of RdbAdapter.

Author:
S. Chassande-Barrioz

Field Summary

static String
DATABASE_NAME_JDBC
This constant represents the data base name for a standard jdbc database
private static Properties
product2adapter
Map between DatabaseProductName to adapter class name

Method Summary

static Map
getProductName2Adapter()
static RdbAdapter
getTypeConverter(DataSource ds)
static RdbAdapter
getTypeConverter(String dbn)
This first possibility permits to specify the name for which a RdbAdapter is needed.

Field Details

DATABASE_NAME_JDBC

public static final String DATABASE_NAME_JDBC
This constant represents the data base name for a standard jdbc database


product2adapter

private static Properties product2adapter
Map between DatabaseProductName to adapter class name

Method Details

getProductName2Adapter

public static Map getProductName2Adapter()


getTypeConverter

public static RdbAdapter getTypeConverter(DataSource ds)
            throws RdbAdapterException


getTypeConverter

public static RdbAdapter getTypeConverter(String dbn)
            throws RdbAdapterException
This first possibility permits to specify the name for which a RdbAdapter is needed.

Parameters:
dbn - : the data base name

Returns:
: the type converter linked to the data base name is associated to the name, a PException is throwing.