Here you can find the source of nvl(T value, T ifnull)
public static final <T> T nvl(T value, T ifnull)
//package com.java2s; //License from project: Apache License public class Main { /**//from w w w . j a va2 s .c o m * Replicates the Oracle NVL function, if the value is null, then substitute a different value in its place */ public static final <T> T nvl(T value, T ifnull) { return (value == null) ? ifnull : value; } public static final String nvl(String value) { return (value == null) ? "" : value; } }