@ThreadSafe public final class DBUtils extends Object
| Modifier and Type | Method and Description |
|---|---|
static void |
closeResultSet(ResultSet rs)
Closes the result set capturing and ignoring any SQLExceptions that
occur.
|
static void |
closeStatement(Statement statement)
Closes the given statement object ignoring any exceptions that occur.
|
static int |
getGeneratedKey(PreparedStatement statement)
Returns the generated integer primary key for a newly inserted row.
|
public static int getGeneratedKey(PreparedStatement statement) throws DatabaseException
statement - a prepared statement that just executed an insertDatabaseException - thrown if there is an exception obtaining the
keypublic static void closeStatement(Statement statement)
statement - a Statement objectpublic static void closeResultSet(ResultSet rs)
rs - a ResultSet to closeCopyright © 2012–2020 OWASP. All rights reserved.