|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectnet.sf.sapjcosupport.jdbc.SapDataSource
Created by IntelliJ IDEA. User: NDE1677 Date: Jul 5, 2006 Time: 12:50:26 PM To change this template use File | Settings | File Templates.
Constructor Summary | |
SapDataSource()
|
Method Summary | |
String |
getClient()
|
Connection |
getConnection()
Attempts to establish a connection with the data source that this DataSource object represents. |
Connection |
getConnection(String username,
String password)
Attempts to establish a connection with the data source that this DataSource object represents. |
String |
getHost()
|
String |
getLanguage()
|
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()
|
protected Connection |
getSapConnection()
|
String |
getSystemNr()
|
String |
getUsername()
|
void |
setClient(String client)
|
void |
setHost(String host)
|
void |
setLanguage(String language)
|
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)
|
void |
setProperties(String username,
String password,
String host,
String client,
String systemNr,
String language)
|
void |
setSystemNr(String systemNr)
|
void |
setUsername(String username)
|
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SapDataSource()
Method Detail |
public int getLoginTimeout() throws SQLException
DataSource
object is created, the login timeout is
initially zero.
getLoginTimeout
in interface DataSource
SQLException
- if a database access error occurs.setLoginTimeout(int)
public 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.
setLoginTimeout
in interface DataSource
seconds
- the data source login time limit
SQLException
- if a database access error occurs.getLoginTimeout()
public PrintWriter getLogWriter() throws SQLException
Retrieves the log writer for this DataSource
object.
The log writer is a character output stream to which all logging
and tracing messages for this data source will be
printed. This includes messages printed by the methods of this
object, messages printed by methods of other objects manufactured
by this object, and so on. Messages printed to a data source
specific log writer are not printed to the log writer associated
with the java.sql.Drivermanager
class. When a
DataSource
object is
created, the log writer is initially null; in other words, the
default is for logging to be disabled.
getLogWriter
in interface DataSource
SQLException
- if a database access error occurssetLogWriter(java.io.PrintWriter)
public void setLogWriter(PrintWriter out) throws SQLException
Sets the log writer for this DataSource
object to the given java.io.PrintWriter
object.
The log writer is a character output stream to which all logging
and tracing messages for this data source will be
printed. This includes messages printed by the methods of this
object, messages printed by methods of other objects manufactured
by this object, and so on. Messages printed to a data source-
specific log writer are not printed to the log writer associated
with the java.sql.Drivermanager
class. When a
DataSource
object is created the log writer is
initially null; in other words, the default is for logging to be
disabled.
setLogWriter
in interface DataSource
out
- the new log writer; to disable logging, set to null
SQLException
- if a database access error occursgetLogWriter()
protected Connection getSapConnection() throws SQLException
SQLException
public Connection getConnection() throws SQLException
Attempts to establish a connection with the data source that
this DataSource
object represents.
getConnection
in interface DataSource
SQLException
- if a database access error occurspublic Connection getConnection(String username, String password) throws SQLException
Attempts to establish a connection with the data source that
this DataSource
object represents.
getConnection
in interface DataSource
username
- the database user on whose behalf the connection is
being madepassword
- the user's password
SQLException
- if a database access error occurspublic void setProperties(String username, String password, String host, String client, String systemNr, String language)
public String getUsername()
public void setUsername(String username)
public String getPassword()
public void setPassword(String password)
public String getHost()
public void setHost(String host)
public String getClient()
public void setClient(String client)
public String getSystemNr()
public void setSystemNr(String systemNr)
public String getLanguage()
public void setLanguage(String language)
|
|||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |