public abstract class DBLib
extends java.lang.Object
To be installed on DB2 database server. Must be compiled for 1.1.8 VM.
| Modifier and Type | Method and Description |
|---|---|
static java.sql.Connection |
Close(java.sql.Connection connection)
Closes open connection.
|
static java.sql.ResultSet |
Close(java.sql.ResultSet rs)
Closes open results set.
|
static java.sql.Statement |
Close(java.sql.Statement stmt)
Closes open statement.
|
static java.lang.String |
DELIMIT(java.lang.String undelimited)
Encloses
undelimited in double quotes "". |
static boolean |
IsNotValue(java.lang.String value)
Is the passed
String is null,
empty string, or whitespace? |
static boolean |
IsValue(java.lang.String value)
Is the passed
String is something other than null,
empty string, or whitespace? |
static boolean |
LDAPMustEscapeDelimited(char ch)
Does a character need to be escaped if included in an LDAP-delimited
string?
|
static java.sql.Date |
NewDate(java.lang.String odbcDate)
Instantiates a date object.
|
static java.sql.Time |
NewTime(java.lang.String odbcTime)
Instantiates a time object.
|
static java.sql.Timestamp |
NewTimestamp(java.lang.String odbcTimestamp)
Instantiates a timestamp object.
|
public static boolean IsValue(java.lang.String value)
String is something other than null,
empty string, or whitespace?value - the value in questiontrue if value is a value;
false otherwisepublic static boolean IsNotValue(java.lang.String value)
String is null,
empty string, or whitespace?value - the value in questiontrue if value is not a value;
false otherwisepublic static java.sql.Connection Close(java.sql.Connection connection)
SQLExceptions are ignored.connection - may be nullpublic static java.sql.Statement Close(java.sql.Statement stmt)
SQLExceptions are ignored.stmt - may be nullpublic static java.sql.ResultSet Close(java.sql.ResultSet rs)
SQLExceptions are ignored.rs - may be nullpublic static boolean LDAPMustEscapeDelimited(char ch)
ch - the character to evaluatetrue if it does;
false otherwisepublic static java.lang.String DELIMIT(java.lang.String undelimited)
undelimited in double quotes "".
Provides a simple alternative to escaping LDAP DN characters
{'"' | '\' | ',' | '+' | '=' | '<' | '>' | ';'}.undelimited - an unquoted string; may be nullnull if undelimited is null;
undelimited enclosed in "" otherwise.public static java.sql.Timestamp NewTimestamp(java.lang.String odbcTimestamp)
throws java.lang.IllegalArgumentException
odbcTimestamp - a string of the format
yyyy-mm-dd hh:mm:ss.fffffffff;
MUST not be nullnulljava.lang.IllegalArgumentException - if odbcTimestamp
does not have the format yyyy-mm-dd hh:mm:ss.fffffffffpublic static java.sql.Time NewTime(java.lang.String odbcTime)
throws java.lang.IllegalArgumentException
odbcTime - a string of the format
hh:mm:ss;
MUST not be nullnulljava.lang.IllegalArgumentException - if odbcTime
does not have the format hh:mm:sspublic static java.sql.Date NewDate(java.lang.String odbcDate)
throws java.lang.IllegalArgumentException
odbcDate - a string of the format
yyyy-mm-dd;
MUST not be nullnulljava.lang.IllegalArgumentException - if odbcDate
does not have the format yyyy-mm-dd