|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||
This interface defines the functionality usually provided by a specific data source, eg Castor, oracle etc. In particular it allows clients to obtain a Data Access Object (a connection rather than object-specific DAOs). Note that only what might be termed "common" persistence layer methods are presently included.
| Method Summary | |
java.lang.ClassLoader |
getClassLoader()
|
java.lang.String |
getConfig()
|
DAO |
getDAO()
This method returns a connection to the data source. |
DAO |
getDAO(java.lang.String user,
java.lang.String password)
Returns a connection made using the specified user details. |
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)
sets the configuration data for the data source. |
void |
setLogger(org.apache.log4j.Logger logger)
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. |
| Method Detail |
public void setConfig(java.util.Map configFiles)
throws DataSourceException
sets the configuration data for the data source. If configuration fails then an exception is thrown back to the caller.
configFiles - - the collection of configuration files to be used
DataSourceException - - thrown if there are configuration problemspublic void setUser(java.lang.String user)
user - the username to use for connection (overrides any default)public java.lang.String getUser()
public void setPassword(java.lang.String password)
password - the password to be used for persistent store connection.public java.lang.String getPassword()
public DAO getDAO()
throws DataSourceException
DataSourceException - - thrown if a DAO cannot be obtained
public DAO getDAO(java.lang.String user,
java.lang.String password)
throws DataSourceException
user - username to make a connection withpassword - the user's password (null values are allowed)
DataSourceException - - thrown if a DAO cannot be obtainedpublic java.lang.String getDataSourceName()
public java.lang.ClassLoader getClassLoader()
public java.lang.String getConfig()
public void setAutoSave(boolean val)
public boolean isAutoSaveSet()
public void setLogger(org.apache.log4j.Logger logger)
logger - A log4j Logger for logging outputpublic org.apache.log4j.Logger getLogger()
|
|||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||||