1 10 package mondrian.udf; 11 12 import mondrian.olap.*; 13 import mondrian.olap.type.*; 14 import mondrian.rolap.RolapUtil; 15 import mondrian.spi.UserDefinedFunction; 16 17 24 public class NullValueUdf implements UserDefinedFunction { 25 26 public String getName() { 27 return "NullValue"; 28 } 29 30 public String getDescription() { 31 return "Returns the null value"; 32 } 33 34 public Syntax getSyntax() { 35 return Syntax.Function; 36 } 37 38 public Type getReturnType(Type[] parameterTypes) { 39 return new NumericType(); 40 } 41 42 public Type[] getParameterTypes() { 43 return new Type[0]; 44 } 45 46 public Object execute(Evaluator evaluator, Argument[] arguments) { 47 return Util.nullValue; 48 } 49 50 public String [] getReservedWords() { 51 return null; 53 } 54 } 55 56 | Popular Tags |