List of utility methods to do Object NVL
Object | nvl(Object value, Object substituteWhenNull) nvl method lets you substitute a value when a null value is encountered. return (value != null) ? value : substituteWhenNull;
|
String | nvl(Object value, String defaultValue) nvl String result = defaultValue; if (value != null) { result = value.toString(); return result; |
String | nvl(Object value, String valueWhenNull) Returns the string-representation of value , or valueWhenNull if value is null.
if (value != null) { return value.toString(); } else { return valueWhenNull; |
T | nvl(S obj, U nullObject) nvl if (obj != null) { return obj; return nullObject; |
String | nvl(String instr, String defaultValue) nvl return instr == null || "".equals(instr) ? defaultValue : instr; |
String | nvl(String instr, String defaultValue) nvl return instr != null && !"".equals(instr) ? instr : defaultValue; |
String | nvl(String pArg1, String pArg2) Returns arg2 if arg1 is null or empty, or arg1 otherwise. return !isNull(pArg1) ? pArg1 : pArg2;
|
String | nvl(String pValue) (OVERLOADED) SQL like Null value replace utility converts to "" return nvl(pValue, ""); |
String | nvl(String s) nvl return s == null ? "" : s; |
String | nvl(String s, String def) Returns s if it is not null and def otherwise.
if (s == null) return def; return s; |