|
|||||||||||
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
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(java.sql.Driver drv)
|
Method Summary | |
boolean |
equals(java.lang.Object obj)
|
java.sql.Connection |
getConnection()
|
java.sql.Connection |
getConnection(java.lang.String u,
java.lang.String p)
|
java.lang.String |
getDriverName()
return the name of the driver |
java.lang.Object |
getObjectInstance(java.lang.Object refObj,
javax.naming.Name name,
javax.naming.Context nameCtx,
java.util.Hashtable env)
Methods inherited from ObjectFactory |
javax.naming.Reference |
getReference()
Methods inherited from referenceable |
int |
getTransactionIsolation()
return the transaction isolation level defined for the current database |
java.lang.String |
getUrl()
return the url of the database |
int |
hashCode()
|
void |
setDriverName(java.lang.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(java.lang.String url)
set the database url |
java.lang.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.DataSource |
getLoginTimeout, getLogWriter, setLoginTimeout, setLogWriter |
Constructor Detail |
public StandardDataSource()
protected StandardDataSource(java.sql.Driver drv) throws java.sql.SQLException
Method Detail |
public java.lang.String getDriverName()
public java.lang.String getUrl()
public void setDriverName(java.lang.String driverName) throws java.sql.SQLException
driverName
- the string representation of the jdbc driver name
java.sql.SQLException
public void setUrl(java.lang.String url)
url
- the string representation of the database urlpublic void setTransactionIsolation(int level)
level
- the integer levelpublic int getTransactionIsolation()
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection(java.lang.String u, java.lang.String p) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
u
- p
-
java.sql.SQLException
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
getReference
in class CoreDataSource
javax.naming.NamingException
public java.lang.Object getObjectInstance(java.lang.Object refObj, javax.naming.Name name, javax.naming.Context nameCtx, java.util.Hashtable env) throws java.lang.Exception
getObjectInstance
in interface javax.naming.spi.ObjectFactory
getObjectInstance
in class CoreDataSource
java.lang.Exception
public boolean equals(java.lang.Object obj)
public java.lang.String toString()
toString
in class CoreDataSource
public int hashCode()
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |