public class DB
extends java.lang.Object
Constructor and Description |
---|
DB() |
Modifier and Type | Method and Description |
---|---|
static java.sql.Connection |
getConnection()
Returns a connection from the default datasource, with auto-commit enabled.
|
static java.sql.Connection |
getConnection(boolean autocommit)
Returns a connection from the default datasource, with the specified auto-commit setting.
|
static java.sql.Connection |
getConnection(java.lang.String database)
Returns a connection from any datasource, with auto-commit enabled.
|
static java.sql.Connection |
getConnection(java.lang.String database,
boolean autocommit)
Get a connection from any datasource, with the specified auto-commit setting.
|
static javax.sql.DataSource |
getDataSource()
Returns the default datasource.
|
static javax.sql.DataSource |
getDataSource(java.lang.String database)
Returns any default datasource.
|
public static javax.sql.DataSource getDataSource()
public static javax.sql.DataSource getDataSource(java.lang.String database)
public static java.sql.Connection getConnection()
public static java.sql.Connection getConnection(boolean autocommit)
public static java.sql.Connection getConnection(java.lang.String database)
public static java.sql.Connection getConnection(java.lang.String database, boolean autocommit)