|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.opensubsystems.core.persist.db.DatabaseDependentClassManager
public class DatabaseDependentClassManager
Class responsible for instantiation of classes whose implementation depends on currently used database. It creates new instance if it wasn't created yet and caches created instances. This of course assumes that the data dependent classes are implemented to be stateless and reentrant.
| Field Summary | |
|---|---|
protected ClassFactory |
m_classFactory
Class factory used to instantiate database dependent classes. |
| Constructor Summary | |
|---|---|
DatabaseDependentClassManager()
Default constructor. |
|
| Method Summary | |
|---|---|
java.lang.Object |
getDependentInstance(java.lang.Class dependentClass)
Method to create actual database dependent instance based on specified class. |
static java.lang.Object |
getInstance(java.lang.Class dependentClass)
Create database dependent instance for specified class. |
static DatabaseDependentClassManager |
getManagerInstance()
Get the default instance. |
static void |
setManagerInstance(DatabaseDependentClassManager defaultInstance)
Set default instance. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected ClassFactory m_classFactory
| Constructor Detail |
|---|
public DatabaseDependentClassManager()
| Method Detail |
|---|
public static java.lang.Object getInstance(java.lang.Class dependentClass)
throws OSSException
dependentClass - - the database dependent class for which we want
applicable instance. This is usually database
independent class and we will try to create
database dependent class.
OSSException - - an error has occured
public static DatabaseDependentClassManager getManagerInstance()
throws OSSException
OSSException - - cannot get current databasepublic static void setManagerInstance(DatabaseDependentClassManager defaultInstance)
defaultInstance - - new default instancegetInstance(java.lang.Class)
public java.lang.Object getDependentInstance(java.lang.Class dependentClass)
throws OSSException
dependentClass - - the database dependent class for which we want
applicable instance. This is usually database
independent class and we will try to create
database dependent class.
OSSException - - an error has occured
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||