Java Utililty Methods Object NVL

List of utility methods to do Object NVL

Description

The list of methods to do Object NVL are organized into topic(s).

Method

StringNVL(String s, String valorPorDefecto)
NVL
if (s == null) {
    return valorPorDefecto;
} else {
    return s;
StringNVL(String source, String def)
Implements Oracle style NVL function
if (source == null || source.length() == 0) {
    return def;
return source;
Stringnvl(String source, String defaultString)
Method nvl.
return (source != null) ? source.trim() : defaultString;
Stringnvl(String str)
nvl
return isNull(str) ? "" : str;
Stringnvl(String str, String nullString)
nvl
return (str == null || "null".equals(str)) ? nullString : str;
StringNVL(String str, String replace)
NVL - fix null value
if (str == null || str.trim().equals("") || str.trim().toUpperCase().equals("NULL"))
    return replace;
return str;
Stringnvl(String string)
If the parameter is null, it will return no-string value(eg.
return nvl(string, "");
Stringnvl(String value)
nvl
if (value == null) {
    return "";
} else {
    return value.trim();
Stringnvl(String value, String defaultValue)
nvl
return value == null ? defaultValue : value;
StringNVL(String value, String replace)
NVL
return (value == null || value.equals("") ? replace : value.trim());