public class DataSourceImpl
extends java.lang.Object
implements javax.sql.DataSource
| Constructor and Description |
|---|
DataSourceImpl()
Creates a new data source
|
DataSourceImpl(Path path)
Creates a new data source
|
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
protected void |
finalize() |
java.sql.Connection |
getConnection()
Driver interface to create a new connection.
|
java.sql.Connection |
getConnection(java.lang.String user,
java.lang.String password)
Driver interface to create a new connection.
|
int |
getLoginTimeout() |
java.io.PrintWriter |
getLogWriter() |
java.util.logging.Logger |
getParentLogger() |
void |
init()
Initialize the data source.
|
boolean |
isWrapperFor(java.lang.Class<?> iface) |
void |
setCreateDatabase(boolean create)
If true, creates the database on init.
|
void |
setFlushDirtyBlocksOnCommit(boolean isFlush) |
void |
setLoginTimeout(int foo) |
void |
setLogWriter(java.io.PrintWriter log) |
void |
setPath(Path path)
Sets the path to the database.
|
void |
setRemoveOnError(boolean remove)
If true, removes bad tables on init.
|
java.lang.String |
toString() |
<T> T |
unwrap(java.lang.Class<T> iface) |
public DataSourceImpl()
public DataSourceImpl(Path path) throws java.sql.SQLException
java.sql.SQLExceptionpublic void setPath(Path path)
public void setCreateDatabase(boolean create)
public void setRemoveOnError(boolean remove)
public void setFlushDirtyBlocksOnCommit(boolean isFlush)
public void init()
throws java.sql.SQLException
java.sql.SQLExceptionpublic int getLoginTimeout()
getLoginTimeout in interface javax.sql.CommonDataSourcepublic void setLoginTimeout(int foo)
setLoginTimeout in interface javax.sql.CommonDataSourcepublic java.io.PrintWriter getLogWriter()
getLogWriter in interface javax.sql.CommonDataSourcepublic void setLogWriter(java.io.PrintWriter log)
setLogWriter in interface javax.sql.CommonDataSourcepublic java.sql.Connection getConnection(java.lang.String user,
java.lang.String password)
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic java.sql.Connection getConnection()
throws java.sql.SQLException
getConnection in interface javax.sql.DataSourcejava.sql.SQLExceptionpublic void close()
public java.lang.String toString()
toString in class java.lang.Objectprotected void finalize()
throws java.lang.Throwable
finalize in class java.lang.Objectjava.lang.Throwablepublic <T> T unwrap(java.lang.Class<T> iface)
throws java.sql.SQLException
unwrap in interface java.sql.Wrapperjava.sql.SQLExceptionpublic boolean isWrapperFor(java.lang.Class<?> iface)
throws java.sql.SQLException
isWrapperFor in interface java.sql.Wrapperjava.sql.SQLExceptionpublic java.util.logging.Logger getParentLogger()
getParentLogger in interface javax.sql.CommonDataSource