|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Objectorg.brains2b.data.sql.SqlDataHelper
public class SqlDataHelper
Class with static functions to help with SQL datatypes
Oracle has no support for boolean types and those are usually implemented
as VARCHAR2(1)
containing either Y
or N
.
two functions getYesNo(boolean)
and getBoolean(String)
are implemented to
make that conversion
Constructor Summary | |
---|---|
SqlDataHelper()
|
Method Summary | |
---|---|
static boolean |
getBoolean(java.lang.String yesNo)
Function getBoolean, returns true if the String consist of the letter Y or y and return false in all other cases. |
static java.lang.String |
getYesNo(boolean b)
Function getYesNo returns the character 'Y' for boolean true and 'N' for boolean false |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public SqlDataHelper()
Method Detail |
---|
public static final java.lang.String getYesNo(boolean b)
b
- boolean value,
public static final boolean getBoolean(java.lang.String yesNo)
yesNo
- String, that needs to be evaluated to true or false
java.lang.NullPointerException
- if String is null
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |