|
JCas v0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object cas.sql.SQLTools
SQL Utilities. This class implements utilities for creating and retrieving information with SQL.
Constructor Summary | |
SQLTools()
|
Method Summary | |
static boolean |
getBoolean(String b)
Returns true if the string is not null and equals Y, false otherwise. |
static char |
getChar(String s)
Helper function for reading char values from database that can be NULL. |
static Date |
getDate(String s)
Returns the date given as string as a Java object. |
static int |
getInt(String s)
Helper function for reading int values from database that can be NULL. |
static long |
getLong(String s)
Helper function for reading long values from database that can be NULL. |
static String |
prepareBoolean(boolean b)
Returns 'Y' or 'N' for the argument. |
static String |
prepareBoolean(Boolean b)
Returns 'Y' or 'N' or NULL for the argument. |
static String |
prepareBoolean(Object b)
Returns 'Y' or 'N' or NULL for the argument. |
static String |
prepareChar(Object l)
Preapres a char value for a NULLable field. |
static String |
prepareComparableInt(Object l)
Preapres an int value for a NULLable field. |
static String |
prepareComparableLong(long l)
Prepares a long value for a NULLable field. |
static String |
prepareComparableLong(Object l)
Prepares a long value for a NULLable field. |
static String |
prepareDate(Date d)
Returns the Java Data as a formatted string for use in Oracle databases. |
static String |
prepareInt(Object l)
Preapres an int value for a NULLable field. |
static String |
prepareLong(Object l)
Prepares a long value for a NULLable field. |
static String |
prepareString(Object s)
Prepares a String for use in a SQL Statement. |
static String |
prepareString(String s)
Prepares a String for use in a SQL Statement. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
public SQLTools()
Method Detail |
public static String prepareString(Object s)
public static String prepareString(String s)
public static String prepareBoolean(boolean b)
public static String prepareBoolean(Boolean b)
public static String prepareBoolean(Object b)
public static boolean getBoolean(String b)
public static String prepareDate(Date d)
d
- date
TO_DATE('<date>', 'DDMMYYYYHH24MISS')
public static Date getDate(String s)
TO_CHAR(<column>, 'DDMMYYYYHH24MISS')
.
s
- date as a formatted string "ddMMyyyyHHmmss".public static long getLong(String s)
public static String prepareLong(Object l)
public static String prepareComparableLong(Object l)
public static String prepareComparableLong(long l)
public static int getInt(String s)
public static String prepareInt(Object l)
public static String prepareComparableInt(Object l)
public static char getChar(String s)
public static String prepareChar(Object l)
|
JCas v0.3.1 |
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |