|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.jpox.store.rdbms.adapter.RDBMSAdapterFactory
public class RDBMSAdapterFactory
Factory of RDBMS datastore adapters for JPOX. Acts as a registry of adapters to RDBMS that can be selected for use in JPOX. Uses a singleton pattern, and the factory can be accessed using the getInstance() method.
| Constructor Summary | |
|---|---|
protected |
RDBMSAdapterFactory()
Protected constructor to prevent outside instantiation |
| Method Summary | |
|---|---|
void |
addAdapter(java.lang.String alias,
java.lang.String adapterClassName,
boolean secondary)
Method to add support for a RDBMS product via an adapter. |
protected java.lang.String |
getAdapterClassNameForProductName(java.lang.String productName)
Method to "autodetect" the adapter to be used, based on the supplied "product name". |
DatastoreAdapter |
getDatastoreAdapter(ClassLoaderResolver clr,
java.sql.Connection conn,
java.lang.String adapterClassName,
Dictionary dictionary,
PluginManager pluginMgr)
Accessor for an adapter, given a Connection to the datastore. |
static RDBMSAdapterFactory |
getInstance()
Accessor for the RDBMSAdapterFactory for JPOX (singleton) |
protected DatastoreAdapter |
getNewDatastoreAdapter(ClassLoaderResolver clr,
java.sql.DatabaseMetaData metadata,
java.lang.String adapterClassName,
Dictionary dictionary)
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 void addAdapter(java.lang.String alias,
java.lang.String adapterClassName,
boolean secondary)
alias - Naming string found as part of the "product name" of the JDBC DatabaseMetaDataadapterClassName - Name of the adapter class to usesecondary - Whether this naming alias is secondary level
public DatastoreAdapter getDatastoreAdapter(ClassLoaderResolver clr,
java.sql.Connection conn,
java.lang.String adapterClassName,
Dictionary dictionary,
PluginManager pluginMgr)
throws java.sql.SQLException
clr - ClassLoader resolver for resolving the adapter classconn - The ConnectionadapterClassName - Name of the class of the database adapter to usedictionary - The dictionary to usepluginMgr - the Plug-in manager
java.sql.SQLException - Thrown if a DB error occurs.protected java.lang.String getAdapterClassNameForProductName(java.lang.String productName)
productName - The product name
protected DatastoreAdapter getNewDatastoreAdapter(ClassLoaderResolver clr,
java.sql.DatabaseMetaData metadata,
java.lang.String adapterClassName,
Dictionary dictionary)
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)dictionary - The Dictionary to use
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||