|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.dlese.dpc.services.mmd.DbConn
Provides a DB Connection and some low level access methods.
Constructor Summary | |
---|---|
DbConn(int bugs,
String dbUrl)
|
Method Summary | |
---|---|
void |
closeDb()
|
static String |
dbstring(double vv)
|
static String |
dbstring(int vv)
|
static String |
dbstring(long vv)
|
static String |
dbstring(String stg)
|
static String |
dbstring(Timestamp ts)
|
static String |
dbstringcom(double vv)
|
static String |
dbstringcom(int vv)
|
static String |
dbstringcom(long vv)
|
static String |
dbstringcom(String stg)
|
static String |
dbstringcom(Timestamp ts)
|
static String |
dbstringforce(String stg)
|
static String |
dbstringforcecom(String stg)
|
static String |
dbstringsub(String stg,
boolean forceit)
|
String |
getDbString(String sqlstg)
Retrieves a single String from the DB. |
Object[][] |
getDbTable(String sqlstg,
String[] types,
boolean allownull)
Retrieves a table from the DB: each array row represents one DB row, and each array column represents a DB column. |
void |
updateDb(String sqlstg)
Updates the DB. |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public DbConn(int bugs, String dbUrl) throws MmdException
Method Detail |
public void closeDb() throws MmdException
MmdException
public String getDbString(String sqlstg) throws MmdException
sqlstg
- The SQL string used to query the DB.
MmdException
public void updateDb(String sqlstg) throws MmdException
sqlstg
- The SQL string to be used.
MmdException
public Object[][] getDbTable(String sqlstg, String[] types, boolean allownull) throws MmdException
sqlstg
- The SQL string used to query the DB.types
- An array of the types of the returned columns.
Valid values are:
Specified type | Returned java type |
---|---|
"boolean" | Boolean |
"date" | Long (milliseconds since 1970) |
"double" | Double |
"int" | Integer |
"long" | Long |
"string" | String |
MmdException
public static String dbstringcom(Timestamp ts) throws MmdException
MmdException
public static String dbstring(Timestamp ts) throws MmdException
MmdException
public static String dbstringcom(double vv) throws MmdException
MmdException
public static String dbstring(double vv) throws MmdException
MmdException
public static String dbstringcom(int vv) throws MmdException
MmdException
public static String dbstring(int vv) throws MmdException
MmdException
public static String dbstringcom(long vv) throws MmdException
MmdException
public static String dbstring(long vv) throws MmdException
MmdException
public static String dbstringcom(String stg) throws MmdException
MmdException
public static String dbstring(String stg) throws MmdException
MmdException
public static String dbstringforce(String stg) throws MmdException
MmdException
public static String dbstringforcecom(String stg) throws MmdException
MmdException
public static String dbstringsub(String stg, boolean forceit) throws MmdException
MmdException
|
DLESE Tools v1.2 |
||||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |