|
i-net DB2 drivers | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object com.inet.drda.DRDADataSource
public class DRDADataSource
This class is an implementation of a simple DataSource.
Constructor Summary | |
---|---|
DRDADataSource()
Attempt to create a Datasource. |
|
DRDADataSource(java.util.Properties info)
Attempt to create a Datasource with the given properties. |
Method Summary | |
---|---|
void |
addWarning(java.sql.SQLWarning warning)
|
java.lang.Object |
clone()
Create a new object of the same class like this DataSource. |
boolean |
equals(java.lang.Object obj)
Compare this DataSource to the specified object. |
java.sql.Connection |
getConnection()
Attempt to establish a connection to the database. |
java.sql.Connection |
getConnection(java.lang.String username,
java.lang.String password)
Attempt to establish a connection to the database. |
java.lang.String |
getDatabaseName()
Return the first database name of the connection after login. |
java.lang.String |
getDescription()
Return a one line description of the DataSource. |
java.lang.String |
getInitSQL()
Get the init SQL expresion. |
int |
getLoginTimeout()
Returns the timeout for login. |
java.io.PrintWriter |
getLogWriter()
|
java.lang.String |
getPassword()
Return the password for the connection. |
java.lang.String |
getPort()
Return the TCP/IP port number of the MS SQL Server. |
int |
getPortNumber()
Return the TCP/IP port number of the MS SQL Server. |
java.util.Properties |
getProperties()
Get all properties of the DataSource without LoginTimeout and LogWriter. |
java.lang.String |
getProperty(java.lang.String name)
Get any property of the DataSource without LoginTimeout and LogWriter. |
int |
getQueryTimeout()
Returns the default query timeout for all statements. |
javax.naming.Reference |
getReference()
|
java.lang.String |
getServerName()
Return the server name of the MS SQL Server. |
java.lang.String |
getUser()
Return the user for the connection. |
void |
setDatabaseName(java.lang.String databaseName)
Set the first database name of the connection after login. |
void |
setDescription(java.lang.String description)
Set the description of the DataSource. |
void |
setInitSQL(java.lang.String initSQL)
Set the init SQL expresion. |
void |
setLoginTimeout(int seconds)
Set the login timeout for the connection. 5 is also the default query timeout for all statements. |
void |
setLogWriter(java.io.PrintWriter out)
|
void |
setPassword(java.lang.String password)
Set the password for the connection. |
void |
setPort(java.lang.String port)
Set TCP/IP port number of the MS SQL Server. |
void |
setPortNumber(int portNumber)
Set TCP/IP port number of the MS SQL Server. |
void |
setProperties(java.util.Properties properties)
Set all properties of the DataSource without LoginTimeout and LogWriter. |
void |
setProperty(java.lang.String name,
java.lang.Object value)
Set any property of the DataSource without LogWriter. |
void |
setProperty(java.lang.String name,
java.lang.String value)
Set any property of the DataSource without LogWriter. |
void |
setQueryTimeout(int seconds)
Set the default query timeout for all statements. |
void |
setServerName(java.lang.String serverName)
Set the server name of the MS SQL Server. |
void |
setUser(java.lang.String user)
Set the user account for the connection. |
java.lang.String |
toString()
|
Methods inherited from class java.lang.Object |
---|
getClass, hashCode, notify, notifyAll, wait, wait, wait |
Methods inherited from interface java.sql.Wrapper |
---|
isWrapperFor, unwrap |
Constructor Detail |
---|
public DRDADataSource() throws java.sql.SQLException
java.sql.SQLException
public DRDADataSource(java.util.Properties info) throws java.sql.SQLException
info
- a list of arbitrary string tag/value pairs as connection arguments; normally at least a "user" and "password" property should be included
java.sql.SQLException
Method Detail |
---|
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 username, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
username
- the database user on whose behalf the Connection is being made.password
- the user's password.
java.sql.SQLException
public java.lang.String getServerName()
public void setServerName(java.lang.String serverName)
serverName
- the host name or IP-Address.public java.lang.String getDatabaseName()
public void setDatabaseName(java.lang.String databaseName)
databaseName
- the name of database.public java.lang.String getDescription()
public void setDescription(java.lang.String description)
description
- a one line description.public int getPortNumber()
public java.lang.String getPort()
public void setPortNumber(int portNumber)
portNumber
- the port number.public void setPort(java.lang.String port)
port
- the port number.public java.lang.String getPassword()
public void setPassword(java.lang.String password)
password
- the password for the MS SQL Server.public java.lang.String getUser()
public void setUser(java.lang.String user)
user
- the user for the MS SQL Server.public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
public void setLogWriter(java.io.PrintWriter out)
setLogWriter
in interface javax.sql.CommonDataSource
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
public void setLoginTimeout(int seconds)
setLoginTimeout
in interface javax.sql.CommonDataSource
seconds
- the login timeout for the connection.public int getQueryTimeout()
public void setQueryTimeout(int seconds)
seconds
- the query timeoutpublic void setProperty(java.lang.String name, java.lang.String value)
name
- The name of the property.value
- The value of the property.getProperty(String)
,
getProperties()
public void setProperty(java.lang.String name, java.lang.Object value)
name
- The name of the property.value
- The value of the property.getProperty(String)
,
getProperties()
public java.lang.String getProperty(java.lang.String name)
name
- The name of the property.
setProperty(String,String)
,
getProperties()
public void setProperties(java.util.Properties properties)
getProperty(String)
,
getProperties()
public java.util.Properties getProperties()
setProperty(String,String)
,
getProperty(String)
public void setInitSQL(java.lang.String initSQL)
getInitSQL()
public java.lang.String getInitSQL()
setInitSQL(java.lang.String)
public java.lang.Object clone() throws java.lang.CloneNotSupportedException
clone
in class java.lang.Object
java.lang.CloneNotSupportedException
public boolean equals(java.lang.Object obj)
equals
in class java.lang.Object
obj
- the object to compare.public void addWarning(java.sql.SQLWarning warning) throws java.sql.SQLException
java.sql.SQLException
public javax.naming.Reference getReference() throws javax.naming.NamingException
getReference
in interface javax.naming.Referenceable
javax.naming.NamingException
public java.lang.String toString()
toString
in class java.lang.Object
|
i-net DB2 drivers | |||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |