|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.datanucleus.store.rdbms.adapter.RDBMSAdapterFactory
public class RDBMSAdapterFactory
Factory of RDBMS datastore adapters. Acts as a registry of adapters to RDBMS that can be selected for use. Uses a singleton pattern, and the factory can be accessed using the getInstance() method.
org.datanucleus.store_datastoreadapter
extension point. These extension can define a priority, so if multiple adapter match for the
given database connection the one with the highest priority is chosen.
getDatastoreAdapter(ClassLoaderResolver, Connection, String, PluginManager)
passing the adapter class name directly if you know which you want to use. This allows for
user-defined database adapters.
| Constructor Summary | |
|---|---|
protected |
RDBMSAdapterFactory()
Protected constructor to prevent outside instantiation |
| Method Summary | |
|---|---|
protected Class |
getAdapterClass(org.datanucleus.plugin.PluginManager pluginMgr,
String adapterClassName,
String productName,
org.datanucleus.ClassLoaderResolver clr)
Accessor for the adapter class for a specified datastore product. |
org.datanucleus.store.mapped.DatastoreAdapter |
getDatastoreAdapter(org.datanucleus.ClassLoaderResolver clr,
Connection conn,
String adapterClassName,
org.datanucleus.plugin.PluginManager pluginMgr)
Accessor for an adapter, given a Connection to the datastore. |
static RDBMSAdapterFactory |
getInstance()
Accessor for the RDBMSAdapterFactory. |
protected org.datanucleus.store.mapped.DatastoreAdapter |
getNewDatastoreAdapter(org.datanucleus.ClassLoaderResolver clr,
DatabaseMetaData metadata,
String adapterClassName,
org.datanucleus.plugin.PluginManager pluginMgr)
Accessor for the adapter for a specified datastore product. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
protected RDBMSAdapterFactory()
| Method Detail |
|---|
public static RDBMSAdapterFactory getInstance()
public org.datanucleus.store.mapped.DatastoreAdapter getDatastoreAdapter(org.datanucleus.ClassLoaderResolver clr,
Connection conn,
String adapterClassName,
org.datanucleus.plugin.PluginManager pluginMgr)
throws SQLException
clr - ClassLoader resolver for resolving the adapter classconn - The ConnectionadapterClassName - Name of the class of the database adapter to usepluginMgr - the Plug-in manager
SQLException - Thrown if a DB error occurs.
protected org.datanucleus.store.mapped.DatastoreAdapter getNewDatastoreAdapter(org.datanucleus.ClassLoaderResolver clr,
DatabaseMetaData metadata,
String adapterClassName,
org.datanucleus.plugin.PluginManager pluginMgr)
clr - ClassLoader resolver for resolving the adapter classmetadata - Database MetaData for the RDBMSadapterClassName - Name of the class of the database adapter (null implies use autodetect)pluginMgr - the Plug-in manager
protected Class getAdapterClass(org.datanucleus.plugin.PluginManager pluginMgr,
String adapterClassName,
String productName,
org.datanucleus.ClassLoaderResolver clr)
pluginMgr - the Plug-in manageradapterClassName - Name of the class of the database adapter (null implies use autodetect)productName - the database product nameclr - ClassLoader resolver for resolving the adapter class
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||