|
Oracle® TimesTen In-Memory Database JDBC Extensions Java API Reference 11g Release 2 (11.2.2) E21647-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object
com.timesten.jdbc.JdbcOdbcObject
com.timesten.jdbc.TimesTenDriverBase
com.timesten.jdbc.TimesTenDataSource
public class TimesTenDataSource
TimesTenDataSource
provides a TimesTen implementation of the javax.sql.DataSource
interface, part of the JDBC 2.0 extension. The DataSource
interface is the preferred way of obtaining a database connection. The old way of using the Driver
interface will be deprecated someday. A DataSource
object has properties that can be modified. Setters and Getters must be defined for each modifiable property using a stylized naming convention so that third party application builders can obtain the list of modifiable properties through Java Introspection.
Field Summary |
---|
Fields inherited from class com.timesten.jdbc.JdbcOdbcObject |
---|
TT_JAVA_TIME_DIFFERENCE |
Constructor Summary | |
---|---|
TimesTenDataSource() Constructs a TimesTenDataSource object. |
Method Summary | ||
---|---|---|
java.sql.Connection |
getConnection() This method is a required part of the DataSource interface. |
|
java.sql.Connection |
getConnection(java.lang.String user, java.lang.String password) This method is a required part of the DataSource interface. |
|
java.lang.String |
getDescription() DataSource property Description. |
|
int |
getLoginTimeout() This method is a required part of the DataSource interface. |
|
java.io.PrintWriter |
getLogWriter() This method is a required part of the DataSource interface. |
|
java.lang.String |
getOraclePassword() DataSource property OraclePassword. |
|
java.lang.String |
getPassword() DataSource property password. |
|
java.lang.String |
getUrl() DataSource property url. |
|
java.lang.String |
getUser() DataSource property user. |
|
boolean |
isWrapperFor(java.lang.Class<?> iface) |
|
void |
setDescription(java.lang.String description) DataSource property Description. |
|
void |
setLoginTimeout(int timeout) This method is a required part of the DataSource interface. |
|
void |
setLogWriter(java.io.PrintWriter writer) This method is a required part of the DataSource interface. |
|
void |
setOraclePassword(java.lang.String oraPwd) DataSource property OraclePassword. |
|
void |
setPassword(java.lang.String pwd) DataSource property password. |
|
void |
setUrl(java.lang.String url) DataSource property url. |
|
void |
setUser(java.lang.String user) DataSource property user. |
|
|
unwrap(java.lang.Class<T> iface) |
Methods inherited from class com.timesten.jdbc.TimesTenDriverBase |
---|
getProtocol, getSubName, getSubProtocol, getSubProtocolType, isCSConnection, isDirectConnection |
Methods inherited from class com.timesten.jdbc.JdbcOdbcObject |
---|
BytesToChars, CharsToBytes, CharsToBytes, hexPad, hexPairToInt, hexStringToByteArray, isConnectionBroken, toHex |
Methods inherited from class java.lang.Object |
---|
equals, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TimesTenDataSource()
TimesTenDataSource
object. Initializes all properties to their default values.Method Detail |
---|
public java.sql.Connection getConnection() throws java.sql.SQLException
DataSource
interface. Attempts to establish a connection with the data source that this DataSource object represents.getConnection
in interface javax.sql.DataSource
java.sql.SQLException
- if a database access error occurspublic java.sql.Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
DataSource
interface. Attempts to establish a connection with the data source that this DataSource object represents.getConnection
in interface javax.sql.DataSource
user
- the database user on whose behalf the connection is being madepassword
- the user's passwordjava.sql.SQLException
- if a database access error occurspublic java.io.PrintWriter getLogWriter() throws java.sql.SQLException
DataSource
interface. 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 javax.sql.CommonDataSource
java.sql.SQLException
- if a database access error occurspublic void setLogWriter(java.io.PrintWriter writer) throws java.sql.SQLException
DataSource
interface. Sets the log writer for this DataSource object to the given java.io.PrintWriter object.setLogWriter
in interface javax.sql.CommonDataSource
writer
- the new log writer; to disable logging, set to nulljava.sql.SQLException
- if a database access error occurspublic void setLoginTimeout(int timeout) throws java.sql.SQLException
DataSource
interface. 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 javax.sql.CommonDataSource
timeout
- the data source login time limitjava.sql.SQLException
- if a database access error occurspublic int getLoginTimeout() throws java.sql.SQLException
DataSource
interface. Gets the maximum time in seconds that this data source can wait while attempting to connect to a database.getLoginTimeout
in interface javax.sql.CommonDataSource
java.sql.SQLException
- if a database access error occurspublic void setDescription(java.lang.String description)
public java.lang.String getDescription()
public void setUser(java.lang.String user)
user
- Oracle TimesTen user namepublic java.lang.String getUser()
public void setPassword(java.lang.String pwd)
pwd
- DataSource property password.public java.lang.String getPassword()
public void setOraclePassword(java.lang.String oraPwd)
oraPwd
- DataSource property OraclePassword.public java.lang.String getOraclePassword()
public void setUrl(java.lang.String url)
url
- DataSource property url.public java.lang.String getUrl()
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
|
Oracle® TimesTen In-Memory Database JDBC Extensions Java API Reference 11g Release 2 (11.2.2) E21647-02 |
||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES All Classes | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |