|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.enhydra.jdbc.util.JdbcUtil
org.enhydra.jdbc.core.CoreDataSource
org.enhydra.jdbc.standard.StandardDataSource
public class StandardDataSource
Provides a Data Source which can be used to generate JDBC connections.
This class is generic in the sense that it does not rely upon anything other than standard Java APIs. It uses java.sql.DriverManager and preconfigured properties to construct a JDBC connection. Important : networkProtocol, portNumber, serverName are not used. Please use instead the url property.
| Field Summary |
|---|
| Fields inherited from class org.enhydra.jdbc.core.CoreDataSource |
|---|
logWriter, password, user |
| Fields inherited from class org.enhydra.jdbc.util.JdbcUtil |
|---|
log |
| Constructor Summary | |
|---|---|
|
StandardDataSource()
Constructors |
protected |
StandardDataSource(Driver drv)
|
| Method Summary | |
|---|---|
boolean |
equals(Object obj)
|
Connection |
getConnection()
|
Connection |
getConnection(String u,
String p)
|
String |
getDriverName()
return the name of the driver |
Object |
getObjectInstance(Object refObj,
Name name,
Context nameCtx,
Hashtable env)
Methods inherited from ObjectFactory |
Reference |
getReference()
Methods inherited from referenceable |
int |
getTransactionIsolation()
return the transaction isolation level defined for the current database |
String |
getUrl()
return the url of the database |
int |
hashCode()
|
void |
setDriverName(String driverName)
set the name of the jdbc driver |
void |
setTransactionIsolation(int level)
set the level of the transaction isolation for the current database |
void |
setUrl(String url)
set the database url |
String |
toString()
|
| Methods inherited from class org.enhydra.jdbc.core.CoreDataSource |
|---|
getDescription, getLoginTimeout, getLogWriter, getPassword, getThreadFactory, getUser, isDebug, isVerbose, setDebug, setDescription, setLoginTimeout, setLogWriter, setPassword, setThreadFactory, setUser, setVerbose, shutdown |
| Methods inherited from class org.enhydra.jdbc.util.JdbcUtil |
|---|
setLogger |
| Methods inherited from class java.lang.Object |
|---|
clone, finalize, getClass, notify, notifyAll, wait, wait, wait |
| Methods inherited from interface javax.sql.CommonDataSource |
|---|
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
| Methods inherited from interface java.sql.Wrapper |
|---|
isWrapperFor, unwrap |
| Constructor Detail |
|---|
public StandardDataSource()
protected StandardDataSource(Driver drv)
throws SQLException
SQLException| Method Detail |
|---|
public String getDriverName()
public String getUrl()
public void setDriverName(String driverName)
throws SQLException
driverName - the string representation of the jdbc driver name
SQLExceptionpublic void setUrl(String url)
url - the string representation of the database urlpublic void setTransactionIsolation(int level)
level - the integer levelpublic int getTransactionIsolation()
public Connection getConnection()
throws SQLException
getConnection in interface DataSourceSQLException
public Connection getConnection(String u,
String p)
throws SQLException
getConnection in interface DataSourceu - p -
SQLException
public Reference getReference()
throws NamingException
getReference in interface ReferenceablegetReference in class CoreDataSourceNamingException
public Object getObjectInstance(Object refObj,
Name name,
Context nameCtx,
Hashtable env)
throws Exception
getObjectInstance in interface ObjectFactorygetObjectInstance in class CoreDataSourceExceptionpublic boolean equals(Object obj)
equals in class Objectpublic String toString()
toString in class CoreDataSourcepublic int hashCode()
hashCode in class Object
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||