org.h2.engine
Class FunctionAlias.JavaMethod

java.lang.Object
  extended by org.h2.engine.FunctionAlias.JavaMethod
All Implemented Interfaces:
java.lang.Comparable<FunctionAlias.JavaMethod>
Enclosing class:
FunctionAlias

public static class FunctionAlias.JavaMethod
extends java.lang.Object
implements java.lang.Comparable<FunctionAlias.JavaMethod>

There may be multiple Java methods that match a function name. Each method must have a different number of parameters however. This helper class represents one such method.


Method Summary
 int compareTo(FunctionAlias.JavaMethod m)
           
 java.lang.Class<?>[] getColumnClasses()
           
 int getDataType()
           
 int getParameterCount()
           
 Value getValue(Session session, Expression[] args, boolean columnList)
          Call the user-defined function and return the value.
 boolean hasConnectionParam()
          Check if this function requires a database connection.
 boolean isVarArgs()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Method Detail

toString

public java.lang.String toString()
Overrides:
toString in class java.lang.Object

hasConnectionParam

public boolean hasConnectionParam()
Check if this function requires a database connection.

Returns:
if the function requires a connection

getValue

public Value getValue(Session session,
                      Expression[] args,
                      boolean columnList)
Call the user-defined function and return the value.

Parameters:
session - the session
args - the argument list
columnList - true if the function should only return the column list
Returns:
the value

getColumnClasses

public java.lang.Class<?>[] getColumnClasses()

getDataType

public int getDataType()

getParameterCount

public int getParameterCount()

isVarArgs

public boolean isVarArgs()

compareTo

public int compareTo(FunctionAlias.JavaMethod m)
Specified by:
compareTo in interface java.lang.Comparable<FunctionAlias.JavaMethod>