|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.compass.gps.device.jdbc.JdbcUtils
public abstract class JdbcUtils
A set of Jdbc utilities.
| Constructor Summary | |
|---|---|
JdbcUtils()
|
|
| Method Summary | |
|---|---|
static void |
closeConnection(Connection con)
Close the given JDBC connection and ignore any thrown exception. |
static void |
closeResultSet(ResultSet rs)
Close the given JDBC ResultSet and ignore any thrown exception. |
static void |
closeStatement(Statement stmt)
Close the given JDBC Statement and ignore any thrown exception. |
static int |
getColumnIndexFromColumnName(ResultSetMetaData metaData,
String columnName)
Returns the column index for the guven column name. |
static Connection |
getConnection(DataSource dataSource)
Returns a jdbc connection, and in case of failure, wraps the sql exception with a Jdbc device exception. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public JdbcUtils()
| Method Detail |
|---|
public static Connection getConnection(DataSource dataSource)
throws JdbcGpsDeviceException
dataSource -
JdbcGpsDeviceExceptionpublic static void closeConnection(Connection con)
con - The JDBC Connection to closepublic static void closeStatement(Statement stmt)
stmt - The JDBC Statement to closepublic static void closeResultSet(ResultSet rs)
rs - the JDBC ResultSet to close
public static int getColumnIndexFromColumnName(ResultSetMetaData metaData,
String columnName)
throws SQLException
-1 is returned if none is found.
SQLException
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||