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.SQLException
public 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.SQLException
public int getLoginTimeout()
getLoginTimeout
in interface javax.sql.CommonDataSource
public void setLoginTimeout(int foo)
setLoginTimeout
in interface javax.sql.CommonDataSource
public java.io.PrintWriter getLogWriter()
getLogWriter
in interface javax.sql.CommonDataSource
public void setLogWriter(java.io.PrintWriter log)
setLogWriter
in interface javax.sql.CommonDataSource
public java.sql.Connection getConnection(java.lang.String user, java.lang.String password) throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public java.sql.Connection getConnection() throws java.sql.SQLException
getConnection
in interface javax.sql.DataSource
java.sql.SQLException
public void close()
public java.lang.String toString()
toString
in class java.lang.Object
protected void finalize() throws java.lang.Throwable
finalize
in class java.lang.Object
java.lang.Throwable
public <T> T unwrap(java.lang.Class<T> iface) throws java.sql.SQLException
unwrap
in interface java.sql.Wrapper
java.sql.SQLException
public boolean isWrapperFor(java.lang.Class<?> iface) throws java.sql.SQLException
isWrapperFor
in interface java.sql.Wrapper
java.sql.SQLException
public java.util.logging.Logger getParentLogger()
getParentLogger
in interface javax.sql.CommonDataSource