public final class JDBCUtils extends Object
| Modifier and Type | Field and Description |
|---|---|
static String |
DATASOURCE |
static String |
JNDI |
static String |
OSGI |
| Modifier and Type | Method and Description |
|---|---|
static DataSource |
createDatasource(org.osgi.framework.BundleContext bc,
String url)
Look up a datasource from the url.
|
protected static Object |
doCreateDatasource(org.osgi.framework.BundleContext bc,
String url) |
protected static List<String> |
rawSelect(Connection connection,
String query,
String... params) |
protected static List<String> |
rawSelect(DataSource dataSource,
String query,
String... params) |
protected static int |
rawUpdate(Connection connection,
String query,
String... params) |
protected static int |
rawUpdate(DataSource dataSource,
String query,
String... params) |
public static final String DATASOURCE
public static final String JNDI
public static final String OSGI
public static DataSource createDatasource(org.osgi.framework.BundleContext bc, String url) throws Exception
bc - the bundle context.url - the datasource URL.DataSource object.Exception - in case of datasource creation failure.protected static Object doCreateDatasource(org.osgi.framework.BundleContext bc, String url) throws Exception
Exceptionprotected static int rawUpdate(DataSource dataSource, String query, String... params) throws SQLException
SQLExceptionprotected static int rawUpdate(Connection connection, String query, String... params) throws SQLException
SQLExceptionprotected static List<String> rawSelect(DataSource dataSource, String query, String... params) throws SQLException
SQLExceptionprotected static List<String> rawSelect(Connection connection, String query, String... params) throws SQLException
SQLExceptionCopyright © 2007–2019 The Apache Software Foundation. All rights reserved.