public static java.lang.String escapeString(java.lang.String str)
Calls escapeString(str, int) with a length of 999999
escapeString
public static java.lang.String escapeString(java.lang.String str,
int length)
Escapes ' with '' and truncates the string to the length specified.
Parameters:
str - String to escape
length - Maximum allowable length of string
notNull
public static java.lang.String notNull(java.lang.String str)
Checks if str is null, and if it is returns an empty string. Otherwise
returns str itself. Useful for wrapping around calls to rs.getString()
since that will return null if the field is undefined.
formatMysqlDate
public static java.lang.String formatMysqlDate(java.util.Date date)
Formats a date using the SimpleDateFormat "yyyy-MM-dd"
parseMysqlDate
public static java.util.Date parseMysqlDate(java.lang.String date_str)
formatHiResMysqlDate
public static java.lang.String formatHiResMysqlDate(java.util.Date date)
Formats a date using the SimpleDateFormat "yyyy-MM-dd HH:mm:ss"
booleanToString
public static java.lang.String booleanToString(boolean b)
returns "y" if b is true. otherwise returns "n"
stringToBoolean
public static boolean stringToBoolean(java.lang.String str)
returns true if str is not null and equals "y"
otherwise returns true