|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
java.lang.Object | +--uk.ac.ebi.intact.persistence.ObjectBridgeDAOSource
This class effectively wraps an ObjectBridge broker factory instance and abstracts away the details of the ObjectBridge creation mechanism.
| Field Summary | |
static java.lang.String |
OJB_LOGGER_NAME
|
| Constructor Summary | |
ObjectBridgeDAOSource()
|
|
| Method Summary | |
java.lang.ClassLoader |
getClassLoader()
|
java.lang.String |
getConfig()
|
DAO |
getDAO()
This method returns a connection to the data source, ie in this case a broker instance which provides database connection. |
DAO |
getDAO(java.lang.String user,
java.lang.String password)
Returns a connection to the data source, and connects to it using the supplied username and password. |
java.lang.String |
getDataSourceName()
|
org.apache.log4j.Logger |
getLogger()
Returns the log destination being used for this data source |
java.lang.String |
getPassword()
|
java.lang.String |
getUser()
|
boolean |
isAutoSaveSet()
|
void |
setAutoSave(boolean val)
Defines whether or not data are saved automatically |
void |
setConfig(java.util.Map configFiles)
This method sets up the configuration of ObjectBridge, based on the content of the configuration file whose name is passed in as a parameter. |
void |
setLogger(org.apache.log4j.Logger l)
allows a logging destination to be specified |
void |
setPassword(java.lang.String password)
Used to define a password which overrides any default supplied via config data. |
void |
setUser(java.lang.String user)
Used to specify a user for connecting to the persistent store. |
| Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
public static final java.lang.String OJB_LOGGER_NAME
| Constructor Detail |
public ObjectBridgeDAOSource()
| Method Detail |
public void setConfig(java.util.Map configFiles)
throws DataSourceException
This method sets up the configuration of ObjectBridge, based on the content of the configuration file whose name is passed in as a parameter.
setConfig in interface DAOSourceconfigFiles - - a collection of config filenames (this is only one for ObjectBridge)
DataSourceException - - thrown if there are problems obtaining
configuration datapublic void setUser(java.lang.String user)
setUser in interface DAOSourceuser - the username to use for connection (overrides any default)public java.lang.String getUser()
getUser in interface DAOSourcepublic void setPassword(java.lang.String password)
setPassword in interface DAOSourcepassword - the password to be used for persistent store connection.public java.lang.String getPassword()
getPassword in interface DAOSource
public DAO getDAO()
throws DataSourceException
getDAO in interface DAOSourceDataSourceException - - thrown if a DAO cannot be obtained
public DAO getDAO(java.lang.String user,
java.lang.String password)
throws DataSourceException
getDAO in interface DAOSourceuser - - the username to connect withpassword - - user's password (null values allowed)
DataSourceException - - thrown if a DAO cannot be obtainedpublic java.lang.String getDataSourceName()
getDataSourceName in interface DAOSourcepublic java.lang.ClassLoader getClassLoader()
getClassLoader in interface DAOSourcepublic java.lang.String getConfig()
getConfig in interface DAOSourcepublic void setAutoSave(boolean val)
DAOSource
setAutoSave in interface DAOSourcepublic boolean isAutoSaveSet()
isAutoSaveSet in interface DAOSourcepublic void setLogger(org.apache.log4j.Logger l)
DAOSource
setLogger in interface DAOSourcel - A log4j Logger for logging outputpublic org.apache.log4j.Logger getLogger()
DAOSource
getLogger in interface DAOSource
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||