|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.javasimon.jdbcx.AbstractSimonDataSource
public abstract class AbstractSimonDataSource
SimonCommonDataSource is parent for all three datasource implementation classes.
It contains getters and setters for basic properties which all three datasource types needs to impelement.
| Field Summary | |
|---|---|
protected int |
loginTimeout
|
protected PrintWriter |
logWriter
|
protected String |
password
|
protected String |
prefix
|
protected String |
realDataSourceClassName
|
protected String |
url
|
protected String |
user
|
| Constructor Summary | |
|---|---|
AbstractSimonDataSource()
|
|
| Method Summary | |
|---|---|
int |
getLoginTimeout()
Gets the maximum time in seconds that this data source can wait while attempting to connect to a database. |
PrintWriter |
getLogWriter()
Retrieves the log writer for this DataSource object. |
String |
getPassword()
Returns database password to autenticate connection. |
String |
getPrefix()
Returns Simon prefix for constructing names of Simons. |
String |
getRealDataSourceClassName()
Returns real datasource class name. |
String |
getUrl()
Returns JDBC connection URL. |
String |
getUser()
Returns database user to autenticate connection. |
void |
setLoginTimeout(int seconds)
Sets the maximum time in seconds that this data source will wait while attempting to connect to a database. |
void |
setLogWriter(PrintWriter out)
Sets the log writer for this DataSource
object to the given java.io.PrintWriter object. |
void |
setPassword(String password)
Setter for password property. |
void |
setPrefix(String prefix)
Setter for prefix property. |
void |
setRealDataSourceClassName(String className)
Setter for realDataSourceClassName property. |
void |
setUrl(String url)
Setter for URL property. |
void |
setUser(String user)
Setter for user property. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Field Detail |
|---|
protected transient PrintWriter logWriter
protected String url
protected String user
protected String password
protected int loginTimeout
protected String realDataSourceClassName
protected String prefix
| Constructor Detail |
|---|
public AbstractSimonDataSource()
| Method Detail |
|---|
public final PrintWriter getLogWriter()
throws SQLException
Retrieves the log writer for this DataSource object.
SQLException - if a database access error occursCommonDataSource.getLogWriter(),
setLogWriter(java.io.PrintWriter)
public final void setLogWriter(PrintWriter out)
throws SQLException
Sets the log writer for this DataSource
object to the given java.io.PrintWriter object.
out - the new log writer; to disable logging, set to null
SQLException - if a database access error occursCommonDataSource.setLogWriter(java.io.PrintWriter),
getLogWriter()public final String getUrl()
public final void setUrl(String url)
url - JDBC connection URLpublic final String getUser()
public final void setUser(String user)
user - database userpublic final String getPassword()
public final void setPassword(String password)
password - database password
public final void setLoginTimeout(int seconds)
throws SQLException
Sets the maximum time in seconds that this data source will wait
while attempting to connect to a database. A value of zero
specifies that the timeout is the default system timeout
if there is one; otherwise, it specifies that there is no timeout.
When a DataSource object is created, the login timeout is
initially zero.
seconds - the data source login time limit
SQLException - if a database access error occurs.getLoginTimeout()
public final int getLoginTimeout()
throws SQLException
DataSource object is created, the login timeout is
initially zero.
SQLException - if a database access error occurs.setLoginTimeout(int)public final String getRealDataSourceClassName()
public final void setRealDataSourceClassName(String className)
className - class name of real datasourcepublic final String getPrefix()
public final void setPrefix(String prefix)
prefix - Simon prefix
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||