|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
oracle.javatools.db.DBObjectProviderFactory
public final class DBObjectProviderFactory
Factory class for creating DBObjectProviders. The providers are cached by an identifier which must be unique per provider. Different provider implementations will use different keys. For example the the Database support (always available) uses a String (Database.getQualifiedName()
) as the identifier while the offline database (when available) will use its URL.
Nested Class Summary | |
---|---|
static class |
DBObjectProviderFactory.Creator Factory creator class used to create provider instances when there isn't one already in the cache. |
static interface |
DBObjectProviderFactory.Listener Listener interface that can be registered against this factory to be notified of provider create and uncache events. |
Method Summary | ||
---|---|---|
static
|
findFactory(java.lang.Class<T> clz) Deprecated. use getCreator(String) instead as it doesn't load classes. |
|
static DBObjectProvider |
findOrCreateProvider(java.lang.Object identifier) Deprecated. use findOrCreateProvider(String,Object) |
|
static DBObjectProvider |
findOrCreateProvider(java.lang.String providerType, java.lang.Object identifier) Finds or creates a provider with the given type and identifier. |
|
static DBObjectProvider |
findProvider(java.lang.Object identifier) Deprecated. use findProvider(String,Object) |
|
static DBObjectProvider |
findProvider(java.lang.String providerType, java.lang.Object identifier) Finds a provider using the given identifier key. |
|
static DBObjectProviderFactory.Creator |
getCreator(java.lang.String providerType) Internal use only. |
|
static java.lang.String |
getDescription(java.lang.String type, java.lang.Object identifier) Gets a displayable string to represent the provider with the given identifier. |
|
static java.lang.Class<? extends DBObjectProvider> |
loadProviderClass(java.lang.String clzName) Loads the given provider class using the class name. |
|
static void |
registerFactory(DBObjectProviderFactory.Creator factory) Register the given Creator to be available for creating providers. |
|
static void |
registerListener(DBObjectProviderFactory.Listener l) Registers a listener to be notified of any providers being created or removed from the cache. |
|
static DBObjectProvider |
uncacheProvider(java.lang.Object identifier) |
|
static DBObjectProvider |
uncacheProvider(java.lang.String providerType, java.lang.Object identifier) |
|
static void |
unregisterFactory(DBObjectProviderFactory.Creator factory) Unregisters the given Creator. |
|
static void |
unregisterListener(DBObjectProviderFactory.Listener l) Unregister the specified listener. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Method Detail |
---|
public static void registerListener(DBObjectProviderFactory.Listener l)
l
-public static void unregisterListener(DBObjectProviderFactory.Listener l)
public static void registerFactory(DBObjectProviderFactory.Creator factory)
public static void unregisterFactory(DBObjectProviderFactory.Creator factory)
@Deprecated
public static <T extends DBObjectProviderFactory.Creator> T findFactory(java.lang.Class<T> clz)
getCreator(String)
instead as it doesn't load classes.
@Deprecated
public static DBObjectProvider findProvider(java.lang.Object identifier)
findProvider(String,Object)
public static DBObjectProvider findProvider(java.lang.String providerType, java.lang.Object identifier)
providerType
- the type of provider to findidentifier
- the identifier for the provider - e.g. connection name or offline database urlDatabase.PROVIDER_TYPE
@Deprecated
public static DBObjectProvider findOrCreateProvider(java.lang.Object identifier)
throws DBException
findOrCreateProvider(String,Object)
DBException
public static DBObjectProvider findOrCreateProvider(java.lang.String providerType, java.lang.Object identifier) throws DBException
providerType
- the type of provider to find - e.g. Database.PROVIDER_TYPE
or OfflineDBObjectProvider.PROVIDER_TYPE
.identifier
- the identifier for the provider - e.g. connection name or offline database urlDBException
Database.PROVIDER_TYPE
public static final DBObjectProviderFactory.Creator getCreator(java.lang.String providerType)
public static final DBObjectProvider uncacheProvider(java.lang.Object identifier)
public static final DBObjectProvider uncacheProvider(java.lang.String providerType, java.lang.Object identifier)
public static java.lang.String getDescription(java.lang.String type, java.lang.Object identifier)
public static final java.lang.Class<? extends DBObjectProvider> loadProviderClass(java.lang.String clzName) throws java.lang.ClassNotFoundException
Class.forName( clzName )
because the given provider class may not be on the classpath of the api (e.g. in osgi mode).clzName
- the name of the provider class to loadjava.lang.ClassNotFoundException
- if the class cannot be found on any of the available classpaths.
|
Oracle Fusion Middleware Java API Reference for Oracle Extension SDK 11g Release 2 (11.1.2.2.0) E17493-03 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |