List of utility methods to do Object NVL
T | nvl(final T t, final T def) Like Oracle's nvl, which is like coalesce with only two arguments return t == null ? def : t;
|
int | nvl(Integer value, Number valueWhenNull) Imitates the nvl function of Oracle SQL.
if (value != null) { return value; } else { return valueWhenNull.intValue(); |
long | NVL(Long l) NVL if (l == null) { return 0L; return l.longValue(); |
Object | nvl(Object a, Object b, Object c) nvl if (a != null) return a; if (b != null) return b; return c; |
Object | nvl(Object arg0, Object arg1) nvl return arg0 != null ? arg0 : arg1;
|
Object | nvl(Object inputObject, Object defaultObject) nvl return inputObject != null ? inputObject : defaultObject;
|
String | NVL(Object obj, String defaultVaue) NVL if (obj != null) return obj.toString(); else return defaultVaue; |
Object | nvl(Object objInput, Object objOutput) nvl if (objInput != null) { return objInput; } else { return objOutput; |
Object | nvl(Object source, Object alernative) nvl if (source == null) { return alernative; return source; |
String | NVL(Object str) NVL if (str == null) { return ""; return NVL(str.toString()); |