public final class SQLHelper
extends java.lang.Object
| Constructor and Description |
|---|
SQLHelper() |
| Modifier and Type | Method and Description |
|---|---|
static java.sql.Date |
createDate(java.util.Date d) |
static java.sql.Timestamp |
createDateTime(java.util.Date d) |
static java.sql.Timestamp |
createTimestamp(java.util.Date d) |
static java.sql.Timestamp |
createTimestamp(long time) |
static java.util.Date |
createUtilDate(java.sql.Date d) |
static java.util.Date |
createUtilDate(java.sql.Timestamp ts) |
static java.lang.String |
encode(java.lang.String s)
encode a String so it can be inserted into an SQL database
by replacing every quote with two quotes
|
static java.lang.String |
limitIdentifier(java.lang.String s,
int length)
limit the identifier given by String to the length given.
|
static java.lang.String |
stripQuotes(java.lang.String s)
strip quotes from the beginning and end of a String
from an SQL database
|
public static final java.lang.String encode(java.lang.String s)
s - String, the String to encodepublic static final java.lang.String stripQuotes(java.lang.String s)
s - String, the String to strippublic static final java.lang.String limitIdentifier(java.lang.String s,
int length)
This is accomplished by removing as much non-vowels as needed from the String
s - String, the identifier to limitlength - int, the length to limit the identifier topublic static final java.sql.Timestamp createTimestamp(java.util.Date d)
public static final java.sql.Timestamp createTimestamp(long time)
public static final java.sql.Timestamp createDateTime(java.util.Date d)
public static final java.sql.Date createDate(java.util.Date d)
public static final java.util.Date createUtilDate(java.sql.Date d)
public static final java.util.Date createUtilDate(java.sql.Timestamp ts)