|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||
java.lang.Objectorg.nsdl.mptstore.util.DBUtil
public abstract class DBUtil
Database-related utilities.
| Method Summary | |
|---|---|
static java.lang.String |
getLongString(java.sql.ResultSet rs,
int pos)
Get a long string, which could be a TEXT or CLOB type. |
static java.lang.String |
quotedString(java.lang.String in,
boolean backslashIsEscape)
Provide a single-quoted, properly escaped String for the given value to be used in a SQL statement. |
static void |
release(java.sql.Connection conn)
Ensure the given connection is in auto-commit mode (default) and close/release it. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Method Detail |
|---|
public static java.lang.String getLongString(java.sql.ResultSet rs,
int pos)
throws java.sql.SQLException
rs - The ResultSet whose current row contains the desired value.pos - The position (column) of the value in the current row.
null if the value in the
ResultSet is null.
java.sql.SQLException - if there is an database error accessing the value
from the ResultSet.
public static java.lang.String quotedString(java.lang.String in,
boolean backslashIsEscape)
true.
in - The input value.backslashIsEscape - Whether backslash characters are treated
as escape characters by the underlying database implementation,
and thus need to be escaped themselves.
public static void release(java.sql.Connection conn)
conn - the connection.
|
|||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | ||||||||